Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] android – Deep linking while passing data to the server

Posted on November 14, 2022

Solution 1 :

As the question focuses on #2. Let me explain.

For users who haven’t already installed your app, there is a referral program directly managed by Google Playstore.

You need to implement their referrer gradle package in your dependencies section.

dependencies {
    implementation 'com.android.installreferrer:installreferrer:1.1'
}

Please find the detailed info on what code to be added in your Android app here. https://developer.android.com/google/play/installreferrer/library

Please add the following code block to make a connection to Google Playstore in your launcher activity.

InstallReferrerClient referrerClient;

referrerClient = InstallReferrerClient.newBuilder(this).build();
referrerClient.startConnection(new InstallReferrerStateListener() {
    @Override
    public void onInstallReferrerSetupFinished(int responseCode) {
        switch (responseCode) {
            case InstallReferrerResponse.OK:
                // Connection established.
                
                ReferrerDetails response = referrerClient.getInstallReferrer();
                String referrerUrl = response.getInstallReferrer();
                long referrerClickTime = response.getReferrerClickTimestampSeconds();
                long appInstallTime = response.getInstallBeginTimestampSeconds();
                boolean instantExperienceLaunched = response.getGooglePlayInstantParam();


                break;
            case InstallReferrerResponse.FEATURE_NOT_SUPPORTED:
                // API not available on the current Play Store app.
                break;
            case InstallReferrerResponse.SERVICE_UNAVAILABLE:
                // Connection couldn't be established.
                break;
        }
    }

    @Override
    public void onInstallReferrerServiceDisconnected() {
        // Try to restart the connection on the next request to
        // Google Play by calling the startConnection() method.
    }
});

You will be able to retrieve the following info from the API.

ReferrerDetails response = referrerClient.getInstallReferrer();
String referrerUrl = response.getInstallReferrer();
long referrerClickTime = response.getReferrerClickTimestampSeconds();
long appInstallTime = response.getInstallBeginTimestampSeconds();
boolean instantExperienceLaunched = response.getGooglePlayInstantParam();

This API is available only on devices with a Googleplay app version of 8.3.73 or later.

Now if the app is already installed and you open a link, basic deep linking (with a receiver registered in your Manifest file) will take care of the job.

This should provide you a starting point.

Problem :

There are two parts to this problem, first part is easy and there are solutions on the web but it’s the second part that’s baffling for which a solution was described vaguely but didn’t make any sense.

  1. A link is to be shared via text message that will take to the store if app is not installed or open the app in the relevant section.

  2. While the data being passed is somehow reported to the server as well, somehow the android OS is reporting to the server, may be as part of analytics, somehow a connection is made that can help me identity who this specific user installing the app is, and customize the content of this deeply linked page based on his identity.

READ  [ANSWERED] android - different format String to date kotlin
Powered by Inline Related Posts

What can I try to solve the second issue?

Comments

Comment posted by halfer

Hiya. How did you get on with the answer below?

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress