Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
162
rated 0 times [  168] [ 6]  / answers: 1 / hits: 15732  / 9 Years ago, tue, july 14, 2015, 12:00:00

can I call my app from HTML?



for example:I can call webpage with this code correctly from my app.



android code:



  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(
myDomain.com)));


and after doing something in my site, I want to open my android app again.



I find this code,



<a href=market://details?id=info.androidhive.slidingmenu>


but it's just call Market to find and install the app!


More From » android

 Answers
3

You might have a look at this: https://developer.android.com/training/app-indexing/deep-linking.html



<activity
android:name=com.example.android.GizmosActivity
android:label=@string/title_gizmos >
<intent-filter android:label=@string/filter_title_viewgizmos>
<action android:name=android.intent.action.VIEW />
<category android:name=android.intent.category.DEFAULT />
<category android:name=android.intent.category.BROWSABLE />
<!-- Accepts URIs that begin with http://www.example.com/gizmos” -->
<data android:scheme=http
android:host=www.example.com
android:pathPrefix=/gizmos />
<!-- note that the leading / is required for pathPrefix-->
<!-- Accepts URIs that begin with example://gizmos”
<data android:scheme=example
android:host=gizmos />
-->
</intent-filter>


So your app will be started by this link:



<a href=example://gizmos>

[#65812] Sunday, July 12, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hasanjustusf

Total Points: 76
Total Questions: 116
Total Answers: 100

Location: Virgin Islands (U.S.)
Member since Tue, Jul 7, 2020
4 Years ago
hasanjustusf questions
;