Deeplink
Deeplink is app(web) to app link
From one application, jump to another application.
Situation
I involved advertisement industory.
We have system to deliver ads. This ads are item in shopping app.
From advertiser point of view, from publisher place, can jump to their own app, and purchase, they can provide more functions.
So, we want to make this flow.
Publisher App (Ads) – Deeplink(tap ads) -> Advertiser App
URL Scheme
Android Support URL scheme
Please check details in this document (Google Developer)
Code
Use intent to open URL scheme.
We need to handle, if the target app is not installed
(try-catch -> If cannot find target app, goes to ActivityNotFoundException
try{ Intentintent=newIntent(Intent.ACTION_VIEW); intent.setData(Uri.parse("url")); startActivity(intent); } catch(MalformedURLException e){ Log.w(TAG,"URLformaterror"); } catch(ActivityNotFoundException e){ Log.d(TAG,"Notfound App"); }
コメント