SDK Configurations

From POKKT DOCUMENTATION
Jump to: navigation, search

Android

  • Add support-v4.jar
  • Declare service in your manifest
    <service
       android:name="com.pokkt.sdk.notification.NotificationService"
       android:exported="false"
       android:label="PokktNotificationService" />

iOS

  • Enable the local notification for InApp Notifications in AppDelegate class. Add below mentioned script at DidFinishLaunchingWithOptions delegate method AppDelegate class
    UIUserNotificationSettings *settings = [UIUserNotificationSettings
    settingsForTypes:
    (UIRemoteNotificationTypeBadge|
    UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert)
    categories:nil];
    [application
    registerUserNotificationSettings:settings];
  • Implement LocalNotification delegate method in AppDelegate Class
    - (void)application:(UIApplication *)application
    didReceiveLocalNotification:
    (UILocalNotification *)notification
  • You will have to call the inAppNotificationEvent Method, When user tap on local notification.
    - (void)application:(UIApplication *)application
    didReceiveLocalNotification:(UILocalNotification *) notification
    {
       [PokktAds inAppNotificationEvent:notification];
    }