Android Question Open app with url [Solved]

Blue.Sky

Active Member
Licensed User
Longtime User
Hi
In some app example Telegram,we can use this app with url
example : tg://msg?text = www.example.com?t=12
How i use uri in my app example telegram?
I want to use b4a://file_id=2 for send id to my app
 

Ohanian

Active Member
Licensed User
Longtime User
Hi,

add these lines to the manifest , change URL to your desired one.

B4X:
AddActivityText(Archive, <intent-filter>
  <action android:name="android.intent.action.VIEW"></action>
  <category android:name="android.intent.category.DEFAULT"></category>
  <category android:name="android.intent.category.BROWSABLE"></category>
  <data android:host="URL" android:scheme="http"></data>
</intent-filter>)
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
Hi,

add these lines to the manifest , change URL to your desired one.

B4X:
AddActivityText(Archive, <intent-filter>
  <action android:name="android.intent.action.VIEW"></action>
  <category android:name="android.intent.category.DEFAULT"></category>
  <category android:name="android.intent.category.BROWSABLE"></category>
  <data android:host="URL" android:scheme="http"></data>
</intent-filter>)
Thank you
I add it to manifest
and use it with <a href=""http://myapp.com"">Launch Application</a>
(Url change to myapp.com)
But not working and href redirect to site
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
http is a already known scheme. Usually your browser will open http urls.

Try to generate a new scheme.

B4X:
AddActivityText(Archive, <intent-filter>
  <action android:name="android.intent.action.VIEW"></action>
  <category android:name="android.intent.category.DEFAULT"></category>
  <category android:name="android.intent.category.BROWSABLE"></category>
  <data android:host="URL" android:scheme="bluesky"></data>
</intent-filter>)

And open a url like <a href=""bluesky://myapp.com"">Launch Application</a>

See this for a more detailed version of App deeplinking.
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
http is a already known scheme. Usually your browser will open http urls.

Try to generate a new scheme.

B4X:
AddActivityText(Archive, <intent-filter>
  <action android:name="android.intent.action.VIEW"></action>
  <category android:name="android.intent.category.DEFAULT"></category>
  <category android:name="android.intent.category.BROWSABLE"></category>
  <data android:host="URL" android:scheme="bluesky"></data>
</intent-filter>)

And open a url like <a href=""bluesky://myapp.com"">Launch Application</a>

See this for a more detailed version of App deeplinking.
I test it but not work.I use this for a more detailed version of App deeplinking. example that not worked.
What's problem?
maybe my phone is problem?
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
It's solve.Thanks from all my friends
I test URL Scheme in webview and didn't worked.so i test it in qrcode and success
 
Upvote 0

Blue.Sky

Active Member
Licensed User
Longtime User
http is a already known scheme. Usually your browser will open http urls.

Try to generate a new scheme.

B4X:
AddActivityText(Archive, <intent-filter>
  <action android:name="android.intent.action.VIEW"></action>
  <category android:name="android.intent.category.DEFAULT"></category>
  <category android:name="android.intent.category.BROWSABLE"></category>
  <data android:host="URL" android:scheme="bluesky"></data>
</intent-filter>)

And open a url like <a href=""bluesky://myapp.com"">Launch Application</a>

See this for a more detailed version of App deeplinking.

@DonManfred
It is not working in android 4.4.4
it return scheme name


picture
33m3f4z.jpg
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Can you upload your project (export as zip)?
Without seeing the code and manifest it is hard to answer/help here

Please note that you need to add
AddApplicationText(<activity
android:name="org.mobiledeeplinking.android.MobileDeepLinking"
android:theme="@android:style/Theme.NoDisplay"
android:noHistory="true">
<intent-filter>
<data android:scheme="mydeep"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>)
to your manifest.
 
Upvote 0
Top