1

I am trying read barcod and then get URL from this barcod and then trying to open this URL. it show this page which is open with app or continue with browser . even if select open with app . it will ask me this page next time. how can directly open this url with Autocad a360 app.

enter image description here

this is my code:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(StringURL));
startActivity(intent);
mehmet
  • 1,558
  • 5
  • 30
  • 41
  • Check this link :- https://stackoverflow.com/questions/32984955/how-to-open-web-page-within-my-app – Rajshree Tiwari Jul 27 '18 at 13:54
  • 1
    If I understand correctly, you don't want to open this URL in your own app, but in another app that is installed on that device. This is not anything you can do from you app, as it happens on OS level. Depending on your Android version, it should be possible to define default apps. But of course the other app must have support for opening that URL (which is the case, as otherwise it would not be listed in the open with dialog) – derpirscher Jul 27 '18 at 13:57

1 Answers1

1

Add this code to manifest.

<activity
 android:theme="@style/AppTheme.Launcher"
 android:name=".features.MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter android:label="@string/app_name">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="YOURSITE.com"
              android:scheme="http" />
    </intent-filter>
</activity>

App will launch when you try to open http://YOURSITE.com Deep link was correct answer