0

I have a website it has many links like Facebook , Twitter and etc. when some one click that facebook link in android browser , it should open facebook android app , if it is installed in that device otherwise i should open google market.

so how to give my

`<a href="what link should i give here?" >open facebook</a>



<a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>

if i give this link play store opening, same way how to open other app?

 <a href="market://details?id=com.linkedin.android">clikc me </a>

this link brings me to market place , instead of this i want to open linked app directly

Thamaraiselvam
  • 6,961
  • 8
  • 45
  • 71
  • check out this link : http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser or http://stackoverflow.com/questions/1609573/intercepting-links-from-the-browser-to-open-my-android-app – Tech_Intelliswift Feb 02 '15 at 07:01

3 Answers3

0

This can be done through adding intent filter to your activity

<intent-filter>
    <data android:scheme="my_new_app" />
    <action android:name="android.intent.action.VIEW" />
</intent-filter>

Then, in your web app you can put links like:

<a href="my_new_app://other/parameters/here">

Additionally, if you want to extract URI params in your activity from the URL you clicked

List<String> params = data.getPathSegments();
String first = params.get(0); // "other"
String second = params.get(1); // "parameters"
String third = params.get(2); // "here"
Murtaza Khursheed Hussain
  • 15,176
  • 7
  • 58
  • 83
0

im not sure but try this link ...

facebook://facebook.com/inbox

com.facebook.katana.LoginActivity

com.facebook.katana
0

You can't open just any app. The web-browser they're using has to interpret the link and decides what to do with it.

For example Chrome for android annoyingly "google searches" localhost/ when you bang that into it's address bar, it decides you want to search rather than literally go to http://localhost/

It will in turn open up native apps it's aware of if it's familiar with the link provided I only know of the market link market://search?q=pname:com.google.earth which will open the market and take you to the Google earth app. I don't know what would trigger the facebook app to open though sorry. This link goes nowhere in Chrome for Desktop PC however

Mullazman
  • 507
  • 5
  • 15