App Entry Points for a User
In my previous article, I wrote about various 'Authentication / Login' methods, now I am going to write about the different ways an user can enter an app.
Traditionally, a user installs the app from AppStore and click on the App Icon to open the app. This is the most commonly used Entry point and observe 80% of your user sessions are through this route.
Apart from this, there are other ways you can user enter the app:
- 3D Touch / Shortcuts
- Push Notifications
- Deep Linking or App 2 App Launch
- Universal Linking
- Handoff between devices
- Siri Shortcut
- Conversational UI using Siri
3D Touch / Shortcuts
Long press on the app icon, it displays a menu, clicking on any menu item will directly take the user to the 'Specific Functionality' of the app.
In few scenarios, we would need to display separate menu items for different users or additional menu items. Hence there is an option to add these menu items both statically & dynamically
iOS
App-Info.plist
// App-Info.plist
<key>UIApplicationShortcutItems</key>
<array>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>Icon_ Like.png</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Favorites</string>
<key>UIApplicationShortcutItemType</key>
<string>Favorites</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>Icon_ Food.png</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Food Menu</string>
<key>UIApplicationShortcutItemType</key>
<string>Food_Menu</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>Icon_ location.png</string>
<key>UIApplicationShortcutItemTitle</key>
<string>Locations</string>
<key>UIApplicationShortcutItemType</key>
<string>Locations</string>
</dict>
</array>
AppDelegate.swift
func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
let shortcutType = shortcutItem.type
// Create a switch case statement to handle the different rows in the menu
}
Dynamically adding menu items to the short cut item
let image = UIApplicationShortcutIcon(templateImageName:"Icon.png")
let shortcut = UIApplicationShortcutItem(type: TouchType.rapidReorder.rawValue,
localizedTitle: titleString,
localizedSubtitle: "",
icon: image,
userInfo: nil)
UIApplication.shared.shortcutItems = [shortcut]
Android
Manifest.xml
<activityandroid:name=".global.view.SplashActivity"android:hardwareAccelerated="true"android:screenOrientation="portrait">
<intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
shortcuts.xml
<shortcuts xmlns:android="https://schemas.android.com/apk/res/android">
<shortcut
android:enabled="true"
android:icon="@drawable/app_shortcut_favorite"
android:shortcutDisabledMessage="@string/shortcut_disable_message"
android:shortcutId="favorites"
android:shortcutLongLabel="@string/favorite_long_label"
android:shortcutShortLabel="@string/favorite_short_label">
<intent
android:action="ACTION_SHORTCUT"
android:data="VIEW_FAVORITE"
android:targetClass="com.sampleapp.navigation.deeplink.TransparentDeeplinkActivity"
android:targetPackage="com.sampleapp.debug" />
<!-- If your shortcut is associated with multiple intents, include them
here. The last intent in the list determines what the user sees when
they launch this shortcut. -->
<categories android:name="android.shortcut.conversation" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/app_shortcut_menu"
android:shortcutDisabledMessage="@string/shortcut_disable_message"
android:shortcutId="food_menu"
android:shortcutLongLabel="@string/food_menu_long_label"
android:shortcutShortLabel="@string/food_menu_short_label">
<intent
android:action="ACTION_SHORTCUT"
android:data="VIEW_MENU"
android:targetClass="com.sampleapp.navigation.deeplink.TransparentDeeplinkActivity"
android:targetPackage="com.sampleapp.debug" />
<!-- If your shortcut is associated with multiple intents, include them
here. The last intent in the list determines what the user sees when
they launch this shortcut. -->
<categories android:name="android.shortcut.conversation" />
</shortcut>
<shortcut
android:enabled="true"
android:icon="@drawable/app_shortcut_location"
android:shortcutDisabledMessage="@string/shortcut_disable_message"
android:shortcutId="locations"
android:shortcutLongLabel="@string/locations_long_label"
android:shortcutShortLabel="@string/locations_short_label">
<intent
android:action="ACTION_SHORTCUT"
android:data="VIEW_LOCATION"
android:targetClass="com.sampleapp.navigation.deeplink.TransparentDeeplinkActivity"
android:targetPackage="com.sampleapp.debug" />
<!-- If your shortcut is associated with multiple intents, include them
here. The last intent in the list determines what the user sees when
they launch this shortcut. -->
<categories android:name="android.shortcut.conversation" />
</shortcut>
</shortcuts>
For dynamically adding menu items,
ShortcutManager shortcutManager = context.getSystemService(ShortcutManager.class);
Intent checkoutIntent = new Intent(context, NavigationActivity.class);
ShortcutInfo shortcut = new ShortcutInfo.Builder(context, FAST_FAVORITE)
.setShortLabel(context.getString(R.string.rapid_order_short_label))
.setLongLabel(context.getString(R.string.rapid_order_long_label))
.setIcon(Icon.createWithResource(context, R.drawable.app_shortcut_fast_order))
.setIntent(checkoutIntent)
.build();
shortcutManager.setDynamicShortcuts(Arrays.asList(shortcut));
Push Notifications
This is another popular method of user accessing the app. If the particular push message is not handled, the user is taken to the home page else user is directed to the specific page. This is mostly used in scenarios like - applying an offer to cart, new product launches, etc..
iOS
Implementation details of Push notification. In this tutorial, the author has explained how to handle simple push messages vs media rich content push messages.
The device id returned by the 'Register Push Notification' is not the UDID we see in iTunes.
Also note that, once an app is uninstalled & reinstalled the device, the received device Id will be different to the previous one.
Android
Implementation details of Firebase in Android. Previously Android had GCM (Google Cloud Messaging) to implement push notifications but its deprecated and no longer used.
Deep Linking or App 2 App Launch
Deep linking or App 2 App launch is a mechanism of where in user can enter the app via another app.
The key to deep linking / App 2 App launch is 'URL Types' in the App-Info.plist file. Only the URL schemes defined in the info.plist can only be launched.
let customURL = URL(string: "sampleApp://xyz")!
UIApplication.shared.open(customURL)
Implementation details of Deep Linking in iOS
Implementation details of Deep Linking in Android
We can use this URL format in browser as well to launch the respective app.
As an organization, prefer to deep linking using URL's like 'https://sampleapp.com/xyz' rather than url like - sampleapp://xyz
Universal Linking
The minor disadvantage with Deep Linking gathered steam for development of Universal Linking.
For more details read my Deep Linking vs Universal Linking article
Handoff between devices
This is to seamlessly let user move between devices & let the app launch exactly from the same point where they left off in the other device.
Implementation details of the handoff between devices.
This feature is not yet available in Android.
Siri Shortcut
Siri Shortcuts is a way where your app gets listed using Siri Spotlight search
Implementation details for supporting Siri Spotlight search.
Conversational UI using Siri
Use siri in your iPhone to interact certain functionalities of the app.
Implementation details of conversational UI using Siri.
But this functionality is restricted to certain type of apps like Car Play, Payments, Ride booking, etc...
P.S: Siri Shortcuts, Handoff between devices use NSUserActivity class.