Mobile Archives - TatvaSoft Blog https://www.tatvasoft.com/blog/category/mobile/feed/ Wed, 02 Aug 2023 05:44:20 +0000 en-US hourly 1 Notification Extensions in iOS Apps https://www.tatvasoft.com/blog/notification-extensions-in-ios-apps/ https://www.tatvasoft.com/blog/notification-extensions-in-ios-apps/#respond Fri, 28 Sep 2018 09:49:00 +0000 https://www.tatvasoft.com/blog/?p=8503 Apple has introduced two notification extensions through which as an iOS developer can customize local and remote push notification. These two extensions are

The post Notification Extensions in iOS Apps appeared first on TatvaSoft Blog.

]]>
Apple has introduced two notification extensions through which as an iOS developer can customize local and remote push notification. These two extensions are,

  1. UNNotificationContent Extension
  2. UNNotificationService Extension

Now, Let’s discuss each in detail below:

1. UNNotificationContent Extension

Overview

The protocol UNNotificationContentExtension provides the entry point for a Notification Content app extension, which displays a custom interface for your app’s notifications. You can implement this protocol in the custom UIViewController subclass that you use to present your interface. By having this type of extension, you can improve the way your notifications are presented, possibly by adding custom colors and branding or by incorporating media and other dynamic content into your notification interface.

To integrate a Notification Content app extension, add a Notification Content extension target to the Xcode project containing your app. Extension’s Info.plist file comes mostly configured. Identifically, the NSExtensionPointIdentifier key is set to the value com.apple.usernotifications.content-extension and the NSExtensionMainStoryboard key is set to the name of the project’s storyboard file. However, the NSExtensionAttribute key contains a dictionary of additional keys and values, some of which you must configure manually:

  • UNNotificationExtensionCategory. (Required Key) The value of this key is a string or an array of strings. Every string contains the identifier of a category declared by the app using the UNNotificationCategory class.
  • UNNotificationExtensionInitialContentSizeRatio. (Required) The value of this key is a floating-point number that represents the initial size of your view controller’s view expressed as a ratio of its height to its width. This value is used by the system to set the initial size of the view controller while your extension is loading. E.g., a value of 0.5 results in a view controller whose height is half its width. After your extension loads, you can change the size of your view controller.
  • UNNotificationExtensionDefaultContentHidden. (Optional) This key has a Boolean value. When you set to true, the system displays only your custom view controller in the notification interface. When you set to false, the system displays the default notification content in addition to your view controller’s content. The Dismiss button and Custom action buttons are always displayed, regardless of this setting. The default value of this key is false.
  • UNNotificationExtensionOverridesDefaultTitle. (Optional) This key has a Boolean value. When you set to true, the system uses the title property of your view controller as the title of the notification. When you set to false, the system sets the notification’s title to the name of your app. The default value of this key is false.

You can include multiple Notification Content extensions in your app’s bundle. When a notification arrives, the system checks the UNNotificationExtensionCategory key of each extension’s Info.plist file and launches the extension that supports the notification’s category. At that time, the system loads your extension, instantiates and configures your view controller, and calls the view controller’s didReceive(_:) method. You must implement that method and use it to configure your notification interface. The method may be called multiple times if new notifications arrive while your view controller is visible.

If the notification category includes custom actions, the system automatically adds action buttons to your notification interface; do not create those buttons yourself. If you implement the optional didReceive(_:completionHandler:) method, the system calls that method to respond to any selected actions. If your view controller does not implement that method, the system delivers the selected action to your app for handling.

Media Interface

To support the playback of audio or video from your interface, implement the mediaPlayPauseButtonType property and return the type of button you want. You must also implement the mediaPlayPauseButtonFrame property and provide a frame rectangle for your button. The system draws the button for you and handles all user interactions with it, calling the mediaPlay() and mediaPause() methods of this protocol at appropriate times so that you can start and stop playback.

If you start or stop playback of your media file programmatically, call the mediaPlayingStarted() and mediaPlayingPaused() methods of the current NSExtensionContext object. The extensionContext property of your view controller object contains a reference to the extension context object.

Methods, Constants and Variables of UNNotificationContent Extension

  • func didReceive(_ notification: UNNotification)
    This method will be called to deliver notifications to your Notification Content app extension. Using this method you can configure the contents of your view controller or incorporate content from a new notification. This method can be called multiple times while your view controller is visible. Identically, it is called again when a new notification arrives whose threadIdentifier value matches the thread identifier of the notification already being displayed. You can adjust the size of your view controller’s view after it is onscreen to accommodate new content. When changing the size, change only the height. (Values for width are ignored.) You can then add subviews to fill the additional space with your content.
  • optional func didReceive(_ response: UNNotificationResponse, completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) Use this method when you want your view controller to handle actions selected by the user. Use your implementation to perform the associated task and then execute the completion block. If you go with this method, you must handle all actions defined in all categories managed by your Notification Content app extension. If you do not implement this method, the system notifies your app when the user selects an action.
  • optional var mediaPlayPauseButtonType: UNNotificationContentExtensionMediaPlayPauseButtonType { get } Use this property when you want the system to display a media playback button in your notification interface. Return a constant indicating the type of button you want. The system assumes the value none for this property if you do not implement this property.
  • optional var mediaPlayPauseButtonFrame: CGRect { get }
    If you give support to the playback of media directly from your notification interface, implement this property and use it to return a non-empty rectangle specified in the coordinate system of your view controller’s view. A button is drawn by the system in the provided rectangle that lets the user play and pauses your media content. The system does the drawing of the button for you and calls the mediaPlay() and mediaPause() methods in response to user interactions. You can put this button anywhere in your view controller’s view. If you do not implement this property, the system does not draw a media playback button.
  • NSCopying optional var mediaPlayPauseButtonTintColor: UIColor { get } If you use the mediaPlayPauseButtonFrame property, you can also implement this property and use it to specify the tint color to apply to the button. If you do not implement this property, the system uses a default color for the tint color.
  • optional func mediaPlay() If you implement the mediaPlayPauseButtonFrame property, implement this method and use it to begin the playback of your media. Do not call this method yourself. The system calls it in response to user interactions with the media playback button.
  • optional func mediaPause() If you implement the mediaPlayPauseButtonFrame property, implement this method and use it to stop the playback of your media. Do not call this method yourself. The system calls it in response to user interactions with the media playback button.
  • UNNotificationContentExtensionMediaPlayPauseButtonType
    • UNNotificationContentExtensionMediaPlayPauseButtonTypeNone
      No media button. Specify this option when you do not want a media button. This is the default option.
    • UNNotificationContentExtensionMediaPlayPauseButtonTypeDefault
      A standard play/pause button. This button is always visible. When this button is tapped, its appearance changes between the play and pause icons and triggers the appropriate play and pause actions.
    • UNNotificationContentExtensionMediaPlayPauseButtonTypeOverlay
      A play/pause button with partially transparent that is layered on top of your media content. When playback begins, the button disappears. Tapping the button again pauses playback and displays the play button again.
  • UNNotificationContentExtensionResponseOption
    • UNNotificationContentExtensionResponseOptionDoNotDismiss
      Do not dismiss the notification interface. The content extension handles the selected action.
    • UNNotificationContentExtensionResponseOptionDismiss
      This will dismiss the notification interface. The content extension handles the selected action.
    • UNNotificationContentExtensionResponseOptionDismissAndForwardAction
      In this, dismiss the notification interface and forward the notification to the app. Select this option when you want the app to respond to the action or handle it.

Let’s have a look on example.

With the new project open in Xcode, navigate to File > New > Target in the menu bar. From the dialog that appears, select the iOS > Application Extension > Notification Content extension type:

Notification Content Extension

Name your extension whatever you require and click Finish:

Notification Extension Finish

If a popup appears requesting you to initiate your new scheme, click the Activate button to set it up for debugging:

Activate notification extension

You will now have a new folder with the name of your extension in the Xcode File Navigator for your project. This folder contains the following files:

  • NotificationViewController.swift, this contains the NotificationViewController class (a UIViewController subclass) for your custom interface. Initially , Xcode also automatically makes this class conform to the required protocol from the UserNotificationUI framework.
  • MainInterface.storyboard, this is a storyboard file containing a single view controller. This interface will be shown when a user interacts with your notification. By Default , Xcode automatically links this interface up to the NotificationViewController class so that does not have to be done manually.
  • Info.plist, this contains many important details about your extension. By opening up this file, you will see it contains a lot of items. The only one you need to worry about, however, is the NSExtensiondictionary which contains the following:
notification extension dictionary
  • You can see that Xcode automatically links your notification content extension to the correct system extension point, com.apple.usernotifications.content-extension, and storyboard interface file, MainInterface. Inside the NSExtensionAttributes sub-dictionary, there are two attributes you must define:
  • UNNotificationExtensionCategory, this is a string value identical to the notification category you want to display the custom interface for. In your Info.plist file, change this value to name which you are going to use in notification payload.
  • UNNotificationExtensionInitialContentSizeRatio, this is a number between 0 and 1 defining the aspect ratio of your custom interface. The value 1, which is default, tells the system that your interface has a total height equal to its width. With 0.5 value, for example, would result in an interface with a height equal to half of its total width. It is required to note that the height of your interface can be changed dynamically when it is loaded. The value defined in the Info.plist is just an estimate number so that the system can display a better-looking animation.

To create the interface, open up your MainInterface.storyboard file. First thing to do is, select the view controller and in the Attributes inspector, change its height to be equal to its width.
Secondly, change the background colour of the main view to white. At last, change the existing label’s text colour property to black and the text size to 96.

Now write the code to fire local notification in your app delegate as below. Make sure it’s category is same you defined Info.plist file.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: 
[UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  let center = UNUserNotificationCenter.current()
  let options: UNAuthorizationOptions = [.alert]
       
    center.requestAuthorization(options: options) { (authorized, error) in
    if authorized {
      let categoryId = "category"
                
      let category = UNNotificationCategory(identifier: categoryId, actions: [] 
      ,intentIdentifiers: [], options: [])
      center.setNotificationCategories([category])
                
      let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 30, repeats: false)
      let content = UNMutableNotificationContent()
      content.categoryIdentifier = categoryId
      content.title = "Notification Title"
      content.subtitle = "Notification Subtitle"
      content.body = "Notification body text"
      content.userInfo = ["customNumber": 33]
                
      let request = UNNotificationRequest(identifier: "extensionNotification"
      ,content: content, trigger: trigger)
      center.add(request, withCompletionHandler: nil)
    }
  }    
  return true
}

The local notification that created by the starter project includes a custom number in the notification’s userInfo property, and this is what we are going to display in the custom interface. For this, replace your NotificationViewController class’s didReceive(_:) method with the following:

func didReceive(_ notification: UNNotification) {
    if let number = notification.request.content.userInfo["customNumber"] as? Int {
        label?.text = "\(number)"
    }
}

Now run the project and move app to background once launched. After 30 sec you will get notification and drag that notification and you will get below interface.

Notification Extension Preview

2. UNNotificationService Extension

Overview

This UNNotificationServiceExtension class provides the entry point for a Notification Service app extension, which lets you customize the content of a remote notification before it is delivered to the user. This Notification Service app extension does not present any UI of its own. Instead of, it is launched on demand when a notification of the appropriate type is delivered to the user’s device. You can use this extension to modify the notification’s content or download content related to the extension. E.g., you could use the extension to decrypt an encrypted data block or to download images associated with the notification.

You do not create instances of the UNNotificationServiceExtension class yourself. Instead of, the Xcode template for a Notification Service Extension target contains a subclass for you to modify. By using this methods of that subclass you can implement your app extension’s behavior. Once remote notification for your app is received, the system loads your extension and calls its didReceive(_:withContentHandler:) method only when both of the following conditions are met:

  • The remote notification is configured to display an alert.
  • The remote notification’s payload includes the mutable-content key with the value set to 1.

Note: Silent notifications or those that only play a sound or badge the app’s icon, cannot be modified.

The didReceive(_:withContentHandler:) method is used to performs the main work of your extension. You can use that method to make any changes to the notification’s content. This method has a limited amount of time to perform its task and execute the provided completion block. If your method fail to do in time, the system calls the serviceExtensionTimeWillExpire() method to give you one last chance to submit your changes. If you do not update the notification content before time expires, the system displays the original content.

For any of your app extension, you deliver a Notification Service app extension class as a bundle inside your app. By using the template provided by Xcode configures the Info.plist file automatically for this app extension type. Specifically, it sets the value of the NSExtensionPointIdentifier key to com.apple.usernotifications.service and sets the value of the NSExtensionPrincipalClass key to the name of your UNNotificationServiceExtension subclass.

Methods of UNNotificationService Extension

  • func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void)

    You must need to Override this method and use it to modify the UNNotificationContent object that was delivered with the notification. At some point during your integration, execute the contentHandler block and pass it your modified content. If you do not want to modify the content, call the contentHandler block with the original content from the request parameter.

    If you want to modify any of the content , you can do it from the original request. You can customize the content for the current user or replace it altogether. By using this method you can download images or movies and add them as attachments to the content. You can also modify the alert text as long as you do not remove it. The system ignores your modifications and delivers the original notification content, If the content object does not contain any alert text.

    This extension has a limited amount of time (no more than 30 seconds) to modify the content and execute the contentHandler block. If your block is not executed in a timely manner, the system calls your extension’s serviceExtensionTimeWillExpire() method to give you one last chance to execute the block. If you fail to do that, the system presents the notification’s original content to the user.

    Check below code that shows an example implementation of this method:

    Suppose the payload of aps is as below.

    {
      "aps":{
              "alert":{
                        "title":"Imagica",
                        "body":"Let’s feel thrill on ride."
               },
               "badge":42,
               "sound":"default",
               "category":"imagica.category",
               "mutable-content":1
            },
              "rides":["Amusement Park", "Family Theme Park"],
              "subtitle":"Your ride is ready",
    }
    
    // Update this property as you manipulate the content
    
    var bestAttemptContent: UNMutableNotificationContent?
    
    override func didReceive(_ request: UNNotificationRequest
    , withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
      if let copy = request.content.mutableCopy() as? UNMutableNotificationContent {
        bestAttemptContent = copy
    
        // Edit properties of copy
        let userInfo = bestAttemptContent.userInfo as! [String:Any]
    
        //change the content to the rides
        if let rideEntry = userInfo["rides"] {
          let rides = rideEntry as! [String]
          var body = ""
          for item in rides {
            body += item + "\n "
          }
          bestAttemptContent.body = body
        }
        contentHandler(bestAttemptContent)
        }
    }
    
  • func serviceExtensionTimeWillExpire()

    If your didReceive(_:withContentHandler:) method takes to long to execute its completion block, the system calls this method on a separate thread to give you one last chance to execute the block. This method is used to execute the block as quickly as possible. Doing so might mean providing some fallback content. E.g., if your extension is still downloading an image file with the intent of attaching it to the notification’s content, you might update the notification’s alert text to indicate that an image is being downloaded. The system displays the notification’s original content,if you fail to execute the completion block from the didReceive(_:withContentHandler:) method in time.

    var contentHandler: ((UNNotificationContent) -> Void)?
     
    // Update this property as you manipulate the content
    var bestAttemptContent: UNMutableNotificationContent?
     
    override func serviceExtensionTimeWillExpire() {
        if let contentHandlerObj = contentHandler, let bestAttemptContent =  bestAttemptContent {
            contentHandlerObj (bestAttemptContent)
        }
    }
    

Limitation:

The important thing to consider when using a notification service extension is the conditions under which the extension will operate.

First one, your extension will only be launched for notifications which are configured to show on-screen alerts to the user. It means that any silent notifications (like the ones used to update app badges) will not trigger your extension.

Secondly, the incoming notification’s aps dictionary within its payload must include the mutable-contentkey with a value of 1.

The post Notification Extensions in iOS Apps appeared first on TatvaSoft Blog.

]]>
https://www.tatvasoft.com/blog/notification-extensions-in-ios-apps/feed/ 0
Handle Background Service Limitations of Oreo https://www.tatvasoft.com/blog/handle-background-service-limitations-of-oreo/ https://www.tatvasoft.com/blog/handle-background-service-limitations-of-oreo/#respond Fri, 21 Sep 2018 04:51:00 +0000 https://www.tatvasoft.com/blog/?p=8524 With the introduction of Android 8 (Oreo), we get to know some new and interesting features and behaviour changes of the Android new OS. One of them is “Background execution limits” and in this post, we look specifically at this new restriction that has been introduced for background services.

The post Handle Background Service Limitations of Oreo appeared first on TatvaSoft Blog.

]]>
With the introduction of Android 8 (Oreo), we get to know some new and interesting features and behaviour changes of the Android new OS. One of them is “Background execution limits” and in this post, we look specifically at this new restriction that has been introduced for background services. Due to this behaviour change now apps that are running in the background now have limitations on how to access background services and the broadcasts that are defined in Manifest. So if you’re using background services in your app then this change could affect your app. So now let’s have a look at what the actual change is, how it will affect the development and how we can handle it.

Reason behind the Limitation

This behaviour change is introduced to improve the battery life and the usage of RAM when apps are in the background, which can result in better user experiences. Moreover, this change is introduced because background services are also unfavourable for application performance. When more than one app is performing any task in the background then it will affect the performance of the application which is running in the foreground. Also if some additional apps or services are running in background puts extra load on the device system which again affects UI.

How does it Effects on Android App development?

There could be so many reasons we are using background services or broadcasts like to keep your data updated as per the server changes or UI changes on the particular event or may be for performing some long-running task. For whatever reason we are using background task it will be affected by development. Overcoming this limitation will be majorly helpful for client application development for any Android app development company.

What are the Changes?

  • The ‘startService()’ method now throws an ‘IllegalStateException’. If we try to use this method in the case of background services it will not allow.
  • For starting foreground service we now have the ‘Context.startForegroundService()’ method. This method can be called even when the app is in the background but the app must call that service’s method ‘startForeground()’ within five seconds after the service is created.

How to Handle Limitation?

There are three ways to overcome from this limitation, namely –

  1. Job Scheduler
  2. FCM
  3. Foreground Service

Now let’s discuss each in detail below:

1. Job Scheduler

Job Scheduler is introduced in API 21 for performing background tasks. This allows us to move away from background service implementation and just to focus on execution. Using this we can run scheduled services and the Android system will set all the services from different apps in one group or set and execute them together at a particular time. The reason behind this is to reduce the amount of time the phone’s CPU and radio wakes up by batching the tasks together. This will consume less battery. The only drawback of Job Scheduler is it can only be run API 21 or above.

Advantages:

  • Once the device is connected to a power supply, the task should be done.
  • Tasks that require network availability or a Wi-Fi reachability.
  • The task that is not user-facing or critical.
  • Where the timing is not critical the Tasks should be running on a regular basis as the batch

Implementation:
To implement a Job, extend the JobService class and implement the onStartJob and onStopJob. If the job scheduler fails for some reason, return true from on the onStopJob to restart the job. The method onStartJob is performed in the main thread, if you start asynchronous processing in this method, return True otherwise False.

The new JobService must be registered in the Android manifest with the BIND_JOB_SERVICE permission.

And now, below is the snippet to schedule the job.

ComponentName serviceComponent = new ComponentName(context,TestJobService.class);
JobInfo.Builder builder = new JobInfo.Builder(0,serviceComponent);
builder.setMinimumLatency(1 * 1000);
builder.setOverrideDeadline(3 * 1000);
JobScheduler jobScheduler = context.getSystemService(JobScheduler.class);
jobScheduler.schedule(builder.build());

2. FCM

Here to overcome the drawback of Job Scheduler we can use FCM, FCM is supported from API Level 19.

When services are running in the background there are some scenarios which allow applications to temporarily run in the background as if they were running in the foreground. Applications will be included on these scenarios in situations when they are:

  • To trigger high priority FCM/GCM notification
  • To perform SMS/MMS delivery
  • Capture Notification Action

We can send FCM notifications to trigger a service of our application. For this, using High Priority messages allows our application to be added to a service in those scenarios which allows our services to run as if they were in the foreground because High Priority message will be received even when the system is in Doze Mode so by doing this we can start our service to update our application’s data if our application was not running in the background or killed. In FCM we must remember to set messages to High Priority otherwise messages will be received when the device screen is turned back on or during the Doze maintenance window.

3. Foreground Services:

Another simple way is to make service foreground. Sometimes running a service carrying out the task which may require user interaction or monitoring the task which is being executed. Like users downloading some data, using a timer to perform some time-based operation or receiving navigational directions from your application, these are the cases where we can use foreground service. When running foreground services use a persistent notification to acknowledge the user aware that they are currently running.

Implementation:
Before Android Oreo, if you wish to create a foreground service, you mostly start a background service by calling startService(). Then we can start our foreground service by assigning an ongoing notification using the startForeground() method. But from Android Orio startService() will not be working nowadays, so for starting foreground service we must use startForegroundService() method, this method is static and belongs to the class NotificationManager. This method is the same as creating background service and promoting it to the foreground service combine. The method itself is called startService(), but with the contract that startForeground () will be called. The main difference with using this method as compared to startService () is that we can call it at any time, even if our application is not currently in the foreground.

Using the startForegroundService() method, passing an intent for our service task to be carried out. These tricks will create our background service that we must immediately promote to the foreground. Within use of this service, we need to create a notification to be displayed for our foreground service. This must be of at least higher priority or Low so that is shown to the user on screen — if the priority is set to PRIORITY_MIN then the notification will not be displayed to the user. And then, android app developers can call startForeground(id, notification) from within the service —  this will promote our service to the foreground.

Conclusion:

These limitations applied to the background service might lead to some difficulties in development but these will definitely provide extended battery life and also lower RAM usage. So ultimately it will make your applications smooth and your user happy.

The post Handle Background Service Limitations of Oreo appeared first on TatvaSoft Blog.

]]>
https://www.tatvasoft.com/blog/handle-background-service-limitations-of-oreo/feed/ 0
Navigation Controller – An Android StoryBoard https://www.tatvasoft.com/blog/navigation-controller-an-android-storyboard/ https://www.tatvasoft.com/blog/navigation-controller-an-android-storyboard/#respond Wed, 12 Sep 2018 04:40:00 +0000 https://www.tatvasoft.com/blog/?p=8518 The Navigation Architecture Components define a set of principles which helps you to build an in-app-navigation with a consistent and predictable user experience.

The post Navigation Controller – An Android StoryBoard appeared first on TatvaSoft Blog.

]]>
The Navigation Architecture Components define a set of principles which helps you to build an in-app-navigation with a consistent and predictable user experience.

The Navigation Architecture Component is designed to have a single activity with multiple Fragments. The Activity hosts a Navigation Graph. If the app has multiple Activities each Activity hosts its own Navigation Graph.

Principles of Navigation:

  1. The app should have a fixed starting destination.
  2. A stack is used to represent the navigation state of an app.
  3. The Up button never exits the app.
  4. Up and Back are equivalent within the app’s task.
  5. Deep linking to a destination or navigating to the same destination should yield the same stack.

Implement Navigation

  • Add the Google repository to the projects build.gradle(Project level).
    allprojects {
       repositories {
           google()
           jcenter()
       }
    }
    
  • Add the following dependencies to the app or module build.gradle(App level).

Implementation ‘android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha01

Components of Navigation

  1. Navigation Graph: Blueprint of the Navigation destinations and actions that link them.
  2. Destinations: List of all the fragments. One can define arguments, actions and deep link URLs to these addresses.
    Deep Link URL Destination

  3. Host: The parent activity and entry point for the application logic.
  4. Actions: Specifies the destination fragment, transitions to that fragment, arguments and pop behavior.
    Destination Fragement

Navigation Graph XML

  • With Android Studio 3.2 android app programmers can now add a Navigation Resource File. Right click on the res directory and select New -> Android resource file. Select a title for the file and select Navigation from the Resource type dropdown.
  • Now one will have a new file with a new root element type
    
    

Navigation Host Fragment

In the MainActivity layout one have to add a fragment as NavHost and define where the NavHostFragment finds the navigation graph.

   

 
   
 

Defining Destinations

  • Back in the Navigation Graph android app developers can add new destinations. One can switch between Design and Text. If one choose Design then can see a three columns layout.
  • One can now add existing Fragments/Activities to the Navigation Graph (Icon on the top left) or add a new blank destination.

Perform Navigation

  • To perform a navigation one have to define an action (right side of the Design View). One will use a simple navigation without transitions and params (In the next Part one will create more complex transactions).
  • Therefore, one will have to select the source fragment, afterwards click on the + next to the Actions and choose Add Action. Now one will see an Add Action Wizard. One have to choose a destination (the id will be generated for us) and click Add.
  • One can now navigate with the NavigationController.navigate(id: Int) method. To retrieve the NavigationController one have to call findNavController() in the Source Fragment.

The findNavController method is an extension function in Kotlin.

detailButton.setOnClickListener { view ->
       view.findNavController().navigate(R.id.action_list_to_detail)
}

Deep links

  • One can provide Explicit Deep Links for the destinations from application widget or notification with the help of a Pending Intent as follows,
    PendingIntent deeplink = Navigation.findNavController(v).createDeepLink()
           .setDestination(R.id.android)
           .setArguments(args)
           .createPendingIntent();
    
  • One can also provide Implicit Deep Links to redirect a URL to a particular destination of the app with the help of <deepLink> tag as,
       
    
       
    
    

Purpose or Use Cases of Navigation

  1. Fragment Transaction takes place asynchronously. Though it is generally a good thing, it might lead to a data race when another piece of code tries to read the state of the fragment, those painful IllegalStateException.
  2. Guidelines state that Deep Linked screen on back pressed will have to lead back to their previous logical screen. And one have to handle that manually.
  3. For android development company to test the android app gets much easier and simpler.
  4. arguments is much safer (save from refractor).

The post Navigation Controller – An Android StoryBoard appeared first on TatvaSoft Blog.

]]>
https://www.tatvasoft.com/blog/navigation-controller-an-android-storyboard/feed/ 0
3D Touch is a New Generation of Gestures https://www.tatvasoft.com/blog/3d-touch-is-a-new-generation-of-gestures/ https://www.tatvasoft.com/blog/3d-touch-is-a-new-generation-of-gestures/#respond Mon, 24 Jul 2017 13:08:30 +0000 https://www.tatvasoft.com/blog/?p=2015 Gestures to perform actions like to wake up device or to open camera or to ON the flashlight amazed touch screen device users. Though gestures eased the actions, but they were limited to particular in-built applications only. What if, you can read the message without opening the app or can view the animated lock screen wallpaper?

The post 3D Touch is a New Generation of Gestures appeared first on TatvaSoft Blog.

]]>
Gestures to perform actions like to wake up device or to open camera or to ON the flashlight amazed touch screen device users. Though gestures eased the actions, but they were limited to particular in-built applications only. What if, you can read the message without opening the app or can view the animated lock screen wallpaper? Apple with 3D Touch surprised users with system-level gestures where actions can be performed sensing hard or soft taps.

iphone

Beyond tap or pinch gestures, 3D Touch caters something fascinating, where users can press app icon and access immediate actions provided, can view recent or frequents in widget or press notifications and perform quick functionalities of it or press brief views to get detail preview. 3D Touch, an extension dimension of Multi touch accelerated access to ios applications.

Even though, 3D Touch is implemented in individual iPhone app development, it is not just the software based. Flabbergast? Have a brief look how 3D Touch is also hardware-based execution and not just software-based.

Tech appended for 3D Touch

With other hardware improvements like Apple A9 chip with embedded M9 motion coprocessor, 12MP rear-facing iSight camera, second-generation Touch ID in iPhones 6S and iPhone 6S plus, Apple also showcased major transfiguration in screen – making phone compatible to 3D Touch technology.

The transfiguration is adding up 4-layered sensitive display which responds based on the type of touch – Light, Medium and Firm. Four layers, based on their response system-level application developed reverts, incorporates –

glass

  • Retina HD Display with 3D Touch: It helps in detecting the finger pressure applied by the user.Retina HD display on backlight is attached with the capacitive pressure sensors.
  • Capacitive Pressure Sensors:When cover glass is pressed,sensors measures the pressure from the space between cover glass and backlight,accordingly it will respond back.
  • Taptic Engine:For elegant haptic feedback engine,Taptic Engine is used.It is capable enough to precisely respond to each measure of pressures on the screen.

Subject to such changes in hardware, 3D Touch technology is executed in iOS App Development. Apps are upgraded accordingly to make it compatible to 3D Touch.

Implementing 3D Touch in iPhone App Development

iOS 9 or later supports 3D Touch. To start implementing 3D Touch, it is necessary to download Xcode projects namely – ApplicationShortcuts, ViewControllerPreviews and TouchCanvas. 3D Touch comes with three categories – Home screen Quick Actions, Peek and Pop and Pressure and Intensity Sensitivity

Home Screen Quick Actions

Tap an app icon on Home screen and access static or dynamic quick actions. UIApplicationShortcutItems array is used to define static or dynamic quick action in iPhone application development Info.plist file.

app

Dynamic quick actions come up with additional shortcuts in app’s shared UIApplication, so add it in shortcutItems property. Define dynamic quick actions using UIApplicationShortcutItem, UIMutableApplicationShortcutItem, and UIApplicationShortcutIcon classes.

Peek and Pop

To support view and preview, iOS 9 SDK includes support in UIViewController class. registerForPreviewing(with:sourceView) method registers the view controller to participate in 3D Touch preview (peek) and commit (pop) behaviors. UIViewControllerPreviewing Protocol Reference justifies interface for 3D Touch-enabled view controller. UIViewControllerPreviewingDelegate Protocol Reference is used to define peek and if screen is hard pressed, it shows preview of the view. Below is mentioned the demo snippet for peek and pop actions.

let contactName = "Robert Garero"
        var icon: UIApplicationShortcutIcon? = nil
        self.requestForAccess { (true) in
            let predicate = CNContact.predicateForContacts(matchingName: contactName)
            let contacts = try? CNContactStore().unifiedContacts(matching: predicate, keysToFetch: [])
            if let contact = contacts?.first {
                icon = UIApplicationShortcutIcon(contact: contact)
            }
        }
 
        let type = "com.company.app.sendChatTo"
        let subtitle = "Send a chat"
        let shortcutItem1 = UIApplicationShortcutItem(type: type, localizedTitle: contactName, localizedSubtitle: subtitle, icon: icon, userInfo: nil)
 
        let shortcutitems = [shortcutItem1]
        UIApplication.shared.shortcutItems = shortcutitems

let type = “com.company.app.sendChatTo”
let subtitle = “Send a chat”
let shortcutItem1 = UIApplicationShortcutItem(type: type, localizedTitle: contactName, localizedSubtitle: subtitle, icon: icon, userInfo: nil)

let shortcutitems = [shortcutItem1]
UIApplication.shared.shortcutItems = shortcutitems

app2

The messages previewed are not marked as read. Also, if arrow is available at the top – means additional power shortcuts like reply, save or add to read later are available. Even like or dislike can be done and replies or comment can also be mentioned.

Pressure and Intensity Sensitivity

UITouch class’s properties force and maximumPossibleForce are used to detect the touch pressure and accordingly, the app responds. iPhone app developers use this class for performing touch effective event like dragging icon or keyboard text selection or tapping a link or image and adding to read later list.

All above this, 3D Touch accessibility is optional for a user. User can disable 3D Touch. User can also set 3D Touch sensitivity from Light, Medium and Firm.

3D Touch indeed came up with a revolution in mobile app development. Right from built-in apps to social media apps and image editing apps have adopted this technique in their iPhone applications. 3D Touch refined the basic features and let users have quick access to the apps.

The post 3D Touch is a New Generation of Gestures appeared first on TatvaSoft Blog.

]]>
https://www.tatvasoft.com/blog/3d-touch-is-a-new-generation-of-gestures/feed/ 0
The Importance of Mobile App Testing https://www.tatvasoft.com/blog/importance-mobile-app-testing/ https://www.tatvasoft.com/blog/importance-mobile-app-testing/#comments Wed, 14 Sep 2016 07:24:40 +0000 https://www.tatvasoft.com/blog/?p=2007 Mobile app testing has always been an inseparable part of software application development. It has visibly gained much attention and growth for businesses to reap benefits from it. Every business wants to make its way in the ever-growing digital world and stay ahead of the competition by developing unique applications.

The post The Importance of Mobile App Testing appeared first on TatvaSoft Blog.

]]>
Mobile app testing has always been an inseparable part of software application development. It has visibly gained much attention and growth for businesses to reap benefits from it. Every business wants to make its way in the ever-growing digital world and stay ahead of the competition by developing unique applications. But the approach is different in each case.

It wouldn’t be incorrect to say that convenience is the key to customer success. Hence, mobile applications are in demand. But developing an app is not easy. The most common complaint that businesses receive from customers is that they are not handy, or easy, or that a mobile application could be prevented with complete mobile app testing before launch.

 If we were to talk directly about the facts then here it goes

What exactly should we assume from these facts? It is a simple, easiest and faster way of communication are mobile phones and hence they should be up-to-date without errors. Thus, we must test mobile apps thoroughly so that they deliver the best results. Mobile testing has advanced and there are numerous testing tools available in the market that would deliver accurate results. Irrespective of Android and iOS, mobile testing

Each app must run flawlessly on thousands of different devices and operating systems. To ensure that this is possible, mobile testing must be planned and executed with the utmost thoroughness and accuracy. In this blog, we will be exploring the complete process of mobile testing to understand how it works, and what results it delivers.

1. Overview of Mobile Apps Market Scenario

Undoubtedly, we have seen that a smartphone has become an indispensable part of everybody’s life. Facts share the same story. Whether it is an individual or a corporate, the use of mobile applications has just grown. For most businesses, it is a necessity to have a mobile application or a website that shows how efficient the business is and what it can offer.

Moreover, there are many new businesses emerged which are based on the mobile app. Some of the most popular applications we regularly use are WhatsApp, Line, Snapchat, Games like Pokémon Go, Candy Crush, Wallet apps, or other popular apps like Flipboard, Pocket, Vine, Tinder, Uber, Prisma, and many others.

Now if we see the same in the year 2021, the mobile app market is continuously evolving. But with the increasing need, we need some better testing methods to get good results from Mobile apps. Interestingly, there are companies who are willing to participate in the growth of applications by investing a good sum and getting a higher return on investment. Research shows more than 79% of companies are investing in mobile app testing, and this count will just increase with time. So, will be the demand of mobile application developers for improving the overall business cycle.

2. Why Should Mobile Testing be Considered?

Enterprises are already in the mobile apps business, they are competing for the top place in app downloads. While a lot believe that the success of mobile apps depends on the kind of program and its capabilities, some of it does believe that the true differentiation between a mobile application that sells and one that does not is its performance. It is not just about having a cool app, users are likely to abandon a program if its functionality is problematic, regardless of how promising it may seem. On the contrary, even the simplest applications could be lucrative for a business if it works flawlessly.

Around half of the poor reviews on the app stores are based on concerns such as crashes, poor performance, and battery drain. It’s a fact that there’s no major software engineering field rifer with possible hazards other than mobile development. 

Everyone has experienced a sudden surge of frustration which results in a deleted app. That is why mastering the art of mobile testing is increasingly growing in relevance for any organization that wants to stay competitive. The majority of software companies already recognized the value and relevance of investing in mobile app development. That is why it only makes sense to extend the investment to testing mobile apps. This will deliver more accurate and faster results. 

Well, regardless of the added complexity and cost that programming and testing mobile for various mobile platforms entails. In the long run, the extra work involved in quality assurance surely pays off.

Step 1 – Choosing Type of Mobile Testing

Before deciding whether to test use cases manually or automatically, a developer should create a list of all the scenarios he intends to test. Create a test strategy for mobile apps that includes all the use cases you want to access, as well as a brief description of the tests you want to perform and the sprint’s expected outcome.

But before that, we must know, what are we looking at when we test a mobile application.

Mobile application testing is the practice of testing apps that are being created for mobile devices. The primary goal is to evaluate the programs’ functionality, usability, and stability. In today’s industry, mobile application testing is critical for an app’s survival. To ensure the highest possible quality for end-users, the program is additionally evaluated in a variety of other areas, including other parameters that must be checked for businesses to know how mobile apps work for them.

In a mobile application, there can be multiple types of glitches, there can be performance issues or functionality issues, or there can be multiple nonfunctional or functional challenges that obstruct applications to perform well. Thus, the first step in mobile app testing is to get the mobile app thoroughly tested to get high-performing results. 

There are multiple ways you can perform mobile tests on applications, so let’s discuss the majority ones in brief

Step 2 – Types of Testing

“One size fits all”- this doesn’t apply in testing. Every product developed has a different need for mobile testing and every business has to fulfill it in some way. Thus, here are some of the top mobile testing types that are applied by the Top mobile testing companies. We will get into the specification of each type.

Usability Testing

Usability testing is one of the best ways to evaluate the simplicity of the application and how users can achieve their goals by offering easier usability. This test entails providing particular, realistic situations of app use to individual users. Usability testing is also reliable when it is based on direct input from the end-user.

Performance Testing

Performance testing is an important subset of mobile application testing that evaluates an application’s performance, stability, and responsiveness under certain workloads and circumstances. Furthermore, it also resolves performance constraints prior to launching an application. The performance bottlenecks inside the system and overall operations that impede or halt overall performance are taken care of during this type of testing.

Security Testing

Security is one of the prominent concerns of almost every mobile app owner at the present time. Reportedly, It is highly essential to focus on security testing for mobile apps. Certain applications require the personal information of users for different transactions. It is very important for users to know the security constraints and take the guarantee of confidentiality, integrity, and authenticity.

Compatibility Testing

Compatibility testing is a form of non-functional testing that verifies the functioning of a mobile app on various operating systems, apps, devices, particular internal hardware requirements, and network settings. It also checks a mobile app’s compatibility with various devices, browsers, networks, and other factors.

Localization Testing

Localization testing is a type of testing which tests certain local aspects as per certain geographic locations. It is critical to test the mobile app for responsiveness to unique linguistic and cultural elements of the affected location. Local currency, usage of correct time zone date and time formats, and other local regulations are some of the key areas that localization testing validates.

Functional Testing

As per the name, this sort of testing is primarily concerned with the core goal and flow of the mobile app. Functional testing services ensure that the functionalities of the mobile app fulfill the needed standards and are highly responsive. Functional testing also determines whether an application is capable and fully functional for users to get successfully launched and installed.

Unit Testing

In this type of testing, your whole application and program are divided into smaller units. There is a reason why businesses divide testing into units because It’s easy to identify, and the tests are resolved quickly. It takes less time to execute and test. The app will be seamless and smooth to work.

Manual Testing

It is one of the tried-and-true methods for completely traversing the complexities of mobile testing. Manual testing ensures that the finished product performs optimally in accordance with the desired expectations. It is especially useful in instances where the application is not immediately evident. QA testing specialists might work in short bursts to examine an application that could offer results.

Automation Testing

Certain mobile app quality checks, on the other hand, are overly complicated and time-consuming. In such circumstances, Mobile App Test Automation Services come into play, with optimally set and quickly conducted automated testing as well as human tests, which may aid in guaranteeing quality while also providing better products at a faster rate.

Step 3 – Preparing Test Cases for Different Test Scenarios

The next step in the process of software testing is to test each case. This has a different approach in different test cases. When you write a test case for testing mobile applications, it is no different. A test case is basically a series of test steps, test data, pre and post conditions to validate any specific test requirement. There is a difference between Test cases and Test scenarios. Test scenarios are an estimation of what it should include in the test case. The test case comprises particular variables or circumstances that a testing engineer may use to compare expected and actual outcomes to evaluate whether a software product is working according to the customer’s expectations.

The mobile test cases work the same for both ios and android. With the available mobile testing tools, the testing process becomes easier. Apart from mobile apps, you can also test web apps. In the preparation process of test cases, you can frequently structure them into test runs.

A test run is essentially a set of test cases that testers must complete in a specific order. Rather than adding pre-conditions into each test case, you might place them at the start of a test run. When you have a testing process in place, you can easily perform testing on real devices. There are web apps, mobile apps, and hybrid apps – all that can be tested easily and will improve the future of app performance.

Mobile Testing allows testing on real mobile devices by running test automation scripts and different platforms from windows, android, and ios. Other mobile testing areas and test scripts should ensure that apps work in sync with all functionalities and features in any mobile device of customers.

Step 4 – Mobile Application Testing Levels

We have already seen types of Mobile application testing. But do we exactly know at what level each of these testing methods should be implied? If you want to ensure the best quality, testing should take place throughout the development process. It should start at the beginning of the design phase and continue until the application is delivered to the application store.  Post-delivery, after updates there can be challenges that need to be addressed, and hence Testing plays a major role at each stage. Let’s see which testing is implied at the initial level.

  • The First Level in Test Mobile starts with the Designing Phase

Test the design of your mobile app to verify that it has the necessary functionality and ease of use to keep people interested. This covers anything from precise suggestions for button and font size to the usage of progress alerts, mobile app settings, and controls. A/B testing, which compares two designs, is a typical technique to improve the user experience and Quality of application design.

  • The Next Level is to Integrate Third-party Apps using Integration Testing

Integration testing ensures that new code functions properly once it has been integrated into an application. When many developers work on the same project, integration testing ensures that their code modifications do not clash. Many mobile development teams use a continuous integration environment to make this process more efficient.

  • The Next level is Functional/Non-Functional Testing

In the category of functional Testing, it determines if an application performs as expected, typically by comparing it to design documentation. It is used to inspect the user interface, including UI layouts and components, menu structure and functionalities, and the reaction to changes in screen orientation and resolution.

While in the category of Nonfunctional testing, it tests Operational testing, interrupt testing, security testing, and performance testing. It comprises various non-functional aspects of mobile apps such as app performance, battery use, Data consumption, low-level resource/memory usage/memory leakage, and more. This necessitates test scenarios that go to the outskirts of each instance to determine minimal and maximum utilization.

  • The Last one is UAT -User Acceptance Testing

Acceptance testing verifies that a mobile application provides the functionality, usability, and performance to meet the user’s needs, and that it delivers a consistent user experience (UX) across platforms. An important part of acceptance testing is beta testing on real devices by real end-users. Managing beta testing in both iOS and Android can be done by the company you hire.

All of these are levels of testing which means, firstly we used testing in the design phase, the integration phase, then we can perform the functional and non-function tests, and finally perform Acceptance testing for all the errors of testing mobile applications.

Step – 5 Mobile Application Testing Strategy

Mobile application testing strategy that ensures Quality Assurance align with business goals, customer expectations, and industry best practices:

1. Selection of a Mobile App

With the selection, there are two choices, choosing a gadget model or choosing between substantial devices and emulators. Other factors like connectivity options, memory size, and more should be accounted for when choosing a device model. 

2. Mobile testing on Cloud

Mobile testing that is cloud-based makes potentially infinite scenario combinations easier to manage. This is a desirable option for testing mobile apps. The cloud offers a web-based testing environment wherein apps could be deployed, tested, and managed. 

3. Emulators vs. Physical devices.

One could also decide among emulators or physical devices. In the starting stages of development, device emulators are very useful since they help in fast and efficient testing, particularly in an agile development scenario. Physical device testing leads to beta testing as a very useful method that provides admittance to real devices, real-world testers, actual networks, and bigger geographic coverage. 

4. Network connectivity

 This considerably affects mobile apps as the majority of mobile applications rely on network connectivity to function correctly. Testing mobile apps in actual network environments is critical to get the real picture of the behavior of an app. 

5. Manual vs. Automated

The key to a successful regression is automation during the development stages. However, automated testing requires a large amount of initial investment.

3. Testing is the Answer to the Mobile App Concerns

 Mobile testing is an answer to mobile woes and could help developers prevent the failure of a program. Nonetheless, knowing that testing mobile should take place and determine what to test are different things. It could be a challenge to find out the specific elements that need mobile testing as if any of these vital aspects are missed, the application could be erroneous. You need to test various areas, and different features under every category as well. Check out the below image of the mobile application testing checklist for details.

For instance, functionality testing must occur at the start. Functionality tests must include customer submission forms checks and the search feature. In addition, developers must check out media components like video and audio playback, compatibility of libraries and scripts, and any calculations or manipulations that the application could carry out. 

For any business, making sure that the app is working correctly is paramount. The same care that an organization puts into the product concept and creating the business, should be put towards testing mobile and quality control of mobile apps. This kind of testing isn’t something that could be done in-house as it requires technical expertise. 

Professional mobile application testing companies could help identify issues before prospective customers could face frustration with them, and implement ways to fix them as well before the app is rolled out. A professional software testing company utilizes different types of phones with all major operating systems. Moreover, they use every different phone for testing that ensures proper performance. This enables them to discover more bugs and fix them before roll-out.

Developers need to test their programs in the same conditions that users will experience. This step is extremely important, and making such an environment is not difficult for testers. There are mobile testing platforms that enable developers to test their websites and apps quickly and more easily. With features such as real-time analytics and visual test environments, mobile application testing companies could guarantee the functionality and quality of their program while hastening the time to market. Testing is far from the most enjoyable part of developing a mobile app. Nevertheless, there is an array of tools that make the tasks a lot quicker, easier and smoother. Finding and solving bugs before the release of mobile applications would make it more popular and would see a wider take-up in the long run.

4. Advantages of Mobile Testing

For any mobile app development company, quality is the first and foremost factor for businesses to consider. If you are a mobile app development company that doesn’t take quality seriously then Testing is not your cup of tea. Also, there is a possibility that you might face serious quality concerns once the apps are on market. You can barricade all the challenges of app development using mobile testing. Here are just a few of the advantages of mobile testing.

Good UI/UX

Testing enables Quality Analysts to test apps as per the user’s perspective and evaluate the entire app experience. They can examine the rationale behind the test case or the application and double-check that it is simple and easy to use. However, if you want to get outstanding results, you must continue to perform UI and UX tests throughout the development life cycle.

Meets Quality Benchmarks and Performance

The objective of QAs is to ensure that an app works flawlessly. They determine if an application runs adequately under certain performance criteria such as changing load circumstances, changing networks, and so on. The QA team ensures that the quality standards are maintained and met for better performance and results

Customer Satisfaction

In the end, it all comes down to the users. People who like an app will continue to use it and even promote it to their friends. This will assist your company in establishing a solid reputation in the market and reaching a larger audience. So, test frequently and thoroughly to get more brand loyal customers and their higher degree of customer satisfaction. 

5. Conclusion

Finally, from the insightful blog, we understood that Mobile application testing has become a critical part of mobile apps’ development. You can address the majority of problems that an app faces through successful mobile application testing. This also increases the go-to-market time and ensures the success of the app. A professional mobile application testing company could guarantee the functionality and quality of the app.

The post The Importance of Mobile App Testing appeared first on TatvaSoft Blog.

]]>
https://www.tatvasoft.com/blog/importance-mobile-app-testing/feed/ 1
How to Combat Threats of Implementing Enterprise Mobility? https://www.tatvasoft.com/blog/how-to-combat-threats-of-implementing-enterprise-mobility/ https://www.tatvasoft.com/blog/how-to-combat-threats-of-implementing-enterprise-mobility/#respond Thu, 28 Apr 2016 03:38:10 +0000 https://www.tatvasoft.com/blog/?p=2031 Mobile has become a good support of productivity. Currently, employers have adopted this technology to complete the business tasks. Enterprise mobility has brought a change in employees working habit to work from anywhere, therefore, employers are leveraging the facility to give freedom to them to work beyond any constraint, to expand the productivity, receptive customer interaction and more efficiency in work.

The post How to Combat Threats of Implementing Enterprise Mobility? appeared first on TatvaSoft Blog.

]]>
Mobile has become a good support of productivity. Currently, employers have adopted this technology to complete the business tasks. Enterprise mobility has brought a change in employees working habit to work from anywhere, therefore, employers are leveraging the facility to give freedom to them to work beyond any constraint, to expand productivity, receptive customer interaction, and more efficiency in work.

Emergence of Enterprise Mobility

With the latest shift in work habits and companies providing the freedom to employees to work from anywhere, most of companies are relying on Mobility to improve their employee’s productivity. A drastic increase in devices managed in the enterprise is observed at 72% from 2014 to 2015, and it is increasing year-on-year.

Let us look at the Definition of Enterprise Mobility as per WhatIs.com:  “Enterprise mobility is the trend towards a shift in work habits, with more employees working out of the office and using mobile devices and cloud services to perform business tasks.”

enterprise mobility

Since the advent of BYOD (Bring Your Own Device) trend in the workplace, more and more companies are making corporate data available on Mobile Devices. This helps an employee to transfer data from a PC to a cloud storage service to access that data from a personal Tablet or Mobile at the client site.

Incredible Mobility Trends and Facts

Below are some latest Mobility trends which highlight the evolving nature of work and emphasize the need for organizations to both empower and manage employee mobility in order to meet security, agility and productivity demands as mentioned in Citrix Mobile Analytics Report:

  • 61% of workers report working outside the office at least part of the time
  • 3+ devices are used daily by an employee for work activities
  • iOS dominates the enterprise market and is the leading mobile platform in nearly every industry vertical
  • Device diversity is greatest in EMEA, where mobile devices used to work are typically corporate issued
  • 90% of organizations deploy passcode enforcement, the most common device level policy
  • Top blacklisted apps include Dropbox and Mail while top whitelisted apps include PDF and Notes

Nowadays, demand of mobile device usage is countless at different workplaces. For example, salespeople take tablets instead of laptops when they travel, doctors use a handheld device to check Electronic Medical Records and Clinical Applications right from the patient’s bedside. Similarly, in the retail sector, the sales person can conduct on-spot inventory check for customers and also collect payments without returning to the counter. Through the above examples, we could realize how Enterprise Mobility is enabling more efficient, effective, collaborative and flexible work styles.

Seeing the recent trends on how mobile devices are being used at the workplace, these devices are quickly becoming the new desktop. There has been an explosion of mobile devices being used for work, whether authorized or not, the organization has to enable and protect users no matter what type of device they choose to work with – a PC, notebook, tablet, or smartphone. Many employees utilize mobile devices to access organizational systems and critical business applications, both on and off the corporate network. These protected systems contain sensitive data that if exposed could result in data security breaches and revenue loss for an organization.

An unsecured mobile device can easily compromise the corporate network, jeopardizing the productivity benefits gained from enabling mobile access in the first place.

So What Are The Major Mobile Security Concerns?

1. Device Loss

There has been many high profile data breaches wherein an employee carelessly forgets his tablet or smartphone in a cab or at a restaurant that puts the sensitive data, such as corporate intellectual property or customer information at risk.

2. Application Security

Simple mobile apps that request too many privileges and often granted gains access of all device data. This has been responsible for leaked corporate contacts, calendar items and even the location of certain executives has put the company at a competitive disadvantage. Trojan affected applications also appear to function normally, but secretly upload sensitive data to a remote server.

3. Device Data Leakage

Most corporate access privileges on mobile devices remain limited to calendar items and email, new mobile business applications can tap into a variety of sources if the enterprise accepts the risks. Too much corporate information on a mobile device draws the attention of cyber criminals who can target both the device and the back-end systems they tap into with mobile malware.

4. Malware Attacks

Majority of Mobile Malware comes in the form of SMS Trojans designed to charge device owners’ premium text messages. Experts say Android devices face the biggest threat, but other platforms can attract financially motivated cybercriminals if they adopt NFC (Near Field Communications) and other mobile payment technologies.

5. Device Theft

Smartphone theft is a very common problem smartphone owners such as iPhone or high-end android device faces. The danger of corporate data, such as account credentials and access to email, falling into the hands of a tech-savvy thief, makes the issue a major threat.

Key Concerns for Mobile Strategies

Following are three big questions on which business leaders should focus on to round out their Mobile strategies, and those are:

  • What type of data will make employees more productive by having mobile access to it?
  • What are the security implications of that access?
  • And what model makes more sense for providing that access?

A company should adopt a holistic strategy that covers corporate approved App access, namely, Enterprise Content Management and Enterprise Mobile Management that meet their security needs.

Key Strategies to Secure Enterprise Mobility

Today, more and more businesses rely on Enterprise Mobility with requirements to safeguard their business data, provide secure mobile access to business documents and keep mobile devices safe from threats. Mobile technology has made the network security challenge much bigger and more diverse. Use of mobile devices and apps has introduced a wide range of new attack vectors and new data security challenges for IT.

Ways to Secure These Threats

1. Installing Anti-Malware Software

New Malware is constantly made to attack iOS and android operating systems. Any employee who uses a mobile device to access internet should prior install or update antimalware software on his or her smartphone or tablet.

2. Keeping an Eye Out for Bad Apps

To streamline business processes and enhance employee productivity, the enterprise should provide the workforce with relevant mobile apps. Also, a policy has to be put in place to determine which apps can be download or access via. the corporate network.

3. Remote Locking and Erasing Feature

All the Enterprise Mobility devices should have an app that allows an employee to remotely lock and erase the entire data on the device in case of a theft or loss.

4. Strong Passwords

All the mobility devices should be secured with a complex password and changed on frequent intervals. Employees should be educated about security threats and the damage they can cause from a weak password strength. Many modern mobile devices include local security options such as built-in biometrics, such as fingerprint scanners, facial recognition, and voiceprint recognition and so forth to render better security.

5. Updating

Ask employees to get the habit of updating apps as soon as they are prompted. Software updates can include fixes to new vulnerabilities and exploited security gaps.

6. Protection and Encryption of Data

Encrypt sensitive information with strong keys as soon as it is acquired. Data at rest in storage, servers, and devices, as well as data on the wire (and over the air) should remain encrypted as they are used, stored or moved and eventually decrypted only by the intended receiver.

7. Data Backup

To ensure data restoration after a device is damaged, wiped or lost, take advantage of data backup capabilities supported by each mobile OS. Native backup capabilities typically include writing backup files to a laptop or desktop and routinely backing up data to cloud storage (e.g., Apple iCloud, Google Drive). Mobile Application developers should take advantage of backup capabilities, but should be aware of the risk of doing so.

8. Performing Regular Audits

At least once a year, companies and organizations should hire a reputable security testing firm to audit their mobile security and conduct vapt on the mobile devices they use. Such firms can also help with remediation and mitigation of any issues they discover, as will sometimes be the case. This way companies can better protect themselves from the latest threats.

Conclusion

Mobile devices today are powerful computing devices and a gateway to countless productivity tools, entertainment resources, and social networking channels. No wonder, mobile devices and app adoption have swept enterprises rapidly, even greater than many enterprises realize.

As Uncle Ben said to Peter Parker before he became Spiderman, “With great power comes great responsibility.” The same is true with Enterprise Mobility. When implemented properly, it can bestow great benefits to an organization; but to enjoy those benefits it requires attention to a broad set of security measures.

The post How to Combat Threats of Implementing Enterprise Mobility? appeared first on TatvaSoft Blog.

]]>
https://www.tatvasoft.com/blog/how-to-combat-threats-of-implementing-enterprise-mobility/feed/ 0