Unable to get the Java client API for Deep Link

Hi All,

I was unable to find Java client API for Deep Link Notification.
Can any one provide the Java Client API for Deep Link.

Didn't find what you were looking for?

New post

Comments

13 comments

  • Hi Chnakaya,

    Your request for adding a deeplink in the Java Client Server Library might look something like this:

     

    String uriScheme = null;
    try {
    uriScheme = new String("myapp://view");
    } catch (Exception e) {
    System.out.println("URI Syntax Error: " + e.getMessage());
    }

    Actions openDeepLink = Actions.newBuilder()
    .setOpen(new DeepLinkAction(uriScheme))
    .build();

    Notification actionNotification = Notification.newBuilder()
    .setActions(openDeepLink)
    .setAlert("Read this article")
    .build();

    PushPayload payload = PushPayload.newBuilder()
    .setAudience(Selectors.all())
    .setNotification(actionNotification)
    .setDeviceTypes(DeviceTypeData.of(DeviceType.IOS, DeviceType.ANDROID))
    .build();

    PushRequest request = PushRequest.newRequest(payload);
    0
  • Hi Michael Halka,

    Now I able to directs user to web url based on your suggestions

    I want to implement directs user to a specific activity or resource or screen within the APP through Deep Link.

    0
  • Hi Michael Halka,

    What are steps I need follow to implement "directs user to a specific activity or resource or screen within the APP through Deep Link"

    0
  • Chnakaya ,

    You have to set up a URI scheme within your application in order to direct a user to a specific screen within your app. The instructions above provide you steps on how to deep-link to said activities within your app once you have set that up.

    If you have not already set that up within your app, I would recommend following the below guides to integrate that into your app.

    iOS Deep-Linking

    Android Deep-Linking

     

    0
  • Hi Michael Halka,

    What are steps I need follow to implement  " user has to choose share and Deep link option by interacting with buttons like yes or No Buttons" ?. 

    0
  • Hi Michael Halka,

    What are steps I need follow to implement  " user has to choose share and Deep link option by interacting with buttons like yes or No Buttons" ?. 

    0
  • Ganesh,

    You don't need to implement anything for the share option, since this functionality comes to you out of the box on iOS and Android.

    We do have some tips on what you can do with the Share option that might be beneficial for you though!

    For Deep-Linking, just make sure you have deep-linking set up in your app. 

    Then, you can use the dashboard configuration settings to add those URI schemes to be able to be used within the dashboard, and in this case, your interactive buttons for Yes and No.

    0
  • has anyone able to use 

    IOSBadgeData and  IOSDevicePayload with deep link?

    in the following example for the method setAction doesn't exist.

    how is possible to send a notification containing badge and deep link in the same moment?

     

     

         IOSBadgeData badgeData = IOSBadgeData.newBuilder()

            .setValue(1)

                .setType(IOSBadgeData.Type.INCREMENT)

                .build();

     

            IOSDevicePayload iosPayload = IOSDevicePayload.newBuilder()

                  .setBadge(badgeData)

               

                .build();

                    Notification notification = Notifications.notification(iosPayload);

    //notification.setActions  //this method does'n exist

    0
  • Alessandro,

    The "Notification" class does not have the setActions method. The "Notifications" class does.

    Thankfully, it's fairly easy to get past this.

    When putting together your payload, you can include the actions payload inside the notification constructor like so:

    Actions actionsPayload = Actions.newBuilder()
    .setOpen(new DeepLinkAction("<Insert your DeepLinkURL Here>")
    .build(),

    Notification notification = Notifications.notification(iosPayload,actionsPayload);

    0

  • Sorry but seems like the constructor doesn't accept any other arguments.

    i'm using 2.0.0 API version

     

    0
  • Alessandro,

    My apologies, your code for that should look something like:

    Actions openDeepLink = Actions.newBuilder()
    .setOpen(new DeepLinkAction(uriScheme))
    .build();

    IOSBadgeData badgeData = IOSBadgeData.newBuilder()
    .setValue(1)
    .setType(IOSBadgeData.Type.INCREMENT)
    .build();

    Notification actionNotification = Notification.newBuilder()
    .setActions(openDeepLink)
    .addDeviceTypeOverride(DeviceType.IOS, IOSDevicePayload.newBuilder() .setAlert("Hello Badge!")
    .setBadge(badgeData) .build())
    .build();
    1
  • It Works!!

    thank you very much!

    Is there a complete Javadoc where to find exhaustive documentation?

    0
  • Alessandro,

    We don't have a link to the Javadocs yet I'm afraid, however you can build the javadocs by running

    mvn javadoc:javadoc

    That should give you the javadocs for the library.

    0

Please sign in to leave a comment.