Is there a way to pass a message from an Android browser to an app?

后端 未结 4 779
死守一世寂寞
死守一世寂寞 2021-02-05 22:27

I have a situation where I\'d like for some data to be passed from a mobile web site to a native Android app. A complication is that, in the normal case, the native Android app

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 22:55

    See: https://stackoverflow.com/a/7577379/710284

    You can use an INSTALL_REFERRER link like:
    http://market.android.com/details?id=your.package.name&referrer=your_wanted_parameter

    After a user clicks this link and installs the application your broadcast receiver will receive a broadcast com.android.vending.INSTALL_REFERRER with "your_wanted_parameter" value.

    More info:
    http://code.google.com/mobile/analytics/docs/android/#android-market-tracking
    Get referrer after installing app from Android Market
    Get Android Google Analytics referrer tag

提交回复
热议问题