0

So there is this app already in production, now I need to create a webpage which will detect if the app is present. If so, it will launch the app, if not, it will redirect to the app store.

The problem is, since the app is already in production, I cannot make any changes to the manifest.xml to add any extra intents.

How do I go about this using javascript?

I have checked the manifest.xml file of the app. This is an excerpt from there if it is helpful :

<intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/CFBundleURLSchemes" />
</intent-filter>

3 Answers3

0

i think you need to add one more line try this.

 <category android:name="android.intent.category.LAUNCHER" />
0

I think below links will help you for your problem..

how-to-open-android-application-from-a-webpage

open-android-application-from-a-web-page

Community
  • 1
  • 1
Nitin Patel
  • 1,461
  • 11
  • 28
0

Yes, it's good Question most of the people do more stuff for that.
But google-firebase provide one service that's call "Dynamic Links".

Dynamic link having lots of use but you can try it for your problem.

lets having some easy setup for that

1) Open firebase and make a project for it.
after that select dynamic link option.

enter image description here

2) Add your app in firebase and complete the configuration.

enter image description here

3) setup with your play-store URL.

and select "Define link behavior for Android" option. make whatever you want.

enter image description here

4) after completing all process

enter image description here

5) this generated link is all about with your PACKAGE-NAME
so whenever you click on webpage Link from mobile. it have automatically created two options.

  • if app available in mobile open app
  • if app not available in mobile open playstore with your app.

Happy coding :)

Vishal Patel
  • 2,865
  • 2
  • 21
  • 54
  • Thanks, looks quite good! However, when I try to create a new project in firebase, I get the following error : `There was an unknown error while processing the request. Try again.` Do you know why that is? – Diparati Sen Apr 19 '17 at 12:40
  • The project got created by using incognito browser. Trying it out now. Is using Android Studio mandatory for Firebase to work? – Diparati Sen Apr 19 '17 at 12:51