Launch custom android application from android browser

后端 未结 16 1186
一个人的身影
一个人的身影 2020-11-21 06:02

Can anybody please guide me regarding how to launch my android application from the android browser?

16条回答
  •  悲&欢浪女
    2020-11-21 06:45

    Felix's approach to handling deep links is the typical approach to handling deep links. I would also suggest checking out this library to handle the routing and parsing of your deep links:

    https://github.com/airbnb/DeepLinkDispatch

    You can use annotations to register your Activity for a particular deep link URI, and it will extract out the parameters for you without having to do the usual rigmarole of getting the path segments, matching it, etc. You could simply annotate and activity like this:

    @DeepLink("somePath/{someParameter1}/{someParameter2}")
    public class MainActivity extends Activity {
       ...
    }
    

提交回复
热议问题