Android Question Launch App from ulr and share data b4x?

ilan

Expert
Licensed User
Longtime User
hi

is it possible to create an url where the user clicks on it and if the app is installed it will open and a value is also sent via this url?
like youtube url does. user share a video via url link. if someone clicks on it it opens the youtube app and load the video.
is something like this possible in b4x language? so for b4a and b4i?

i found that it is possible for b4a using <intent-filter>
 

Daestrum

Expert
Licensed User
Longtime User
Could you not use a custom mime type and associate that with the app you want to open?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Isn't that exactly what you want? Youtube creates a shared link e.g. shared.youtube.com?videoid=2839347394

Youtube has registered the URL scheme youtube.com in their app, now whenever someone opens a link with youtube.com, the youtube app opens and they then read the intent and load the video from their backend based on the videoid.

what i want is this

i have an app called halacha

user 1 has an iphone with that app
he listen to a audio file that is in a list.
he likes it and want to share with user 2 that has the app installed on his android device
i dont want to send the whole audio file

i wan to send a url to user 2.
user2 clicks on it and my app opens on his phone and is redirected to that audio file that starts to play.

all i need is to create that url that will command the phone to open my app and read the ID that is passed with that url
it should work

ios->ios and ios>android (android>ios) and android>android
all this with the same ulr
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
user 1 has an iphone with that app
he listen to a audio file that is in a list.
he likes it and want to share with user 2 that has the app installed on his android device
i dont want to send the whole audio file

i wan to send a url to user 2.
user2 clicks on it and my app opens on his phone and is redirected to that audio file that starts to play.

all i need is to create that url that will command the phone to open my app and read the ID that is passed with that url
it should work
Then my answers are still correct, just enter a made-up url scheme in the manifest, build your link with the music id which is apparently local in the app and you're done.

I've already told you everything you need, you just have to read the thread from top to bottom.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
I've already told you everything you need, you just have to read the thread from top to bottom.
i have read everything but the main question still was not answered.

the url should be the same. how would such a url look like.
i dont understand what you meant with my backend domain.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
You have the complete url in the intent, you have to keep a standard format which you define yourself to be able to distinguish what you have to display now. e.g. youtube.com?videoid=0815 opens a video
youtube.com?profileid=b4x opens a profile.
Ok. I think you mean I can parse it based on the way I like.

This topic is about Deep Linking.

@ilan
I attach my sample app here.
Try send to a whatsapp chat to open the following link in Android. Note: I have a domain name puterise dot com.

For iOS, i never tried. Maybe use something like https://www.example.com/.well-known/apple-app-site-association
Read: https://medium.com
 

Attachments

  • app.zip
    13.7 KB · Views: 81
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
what has my domain to do with that?
Look at the link i provided above. It is all described there.

You have to add manifestentries, you have to use a jsonfile with the links your app understands. This list must be provided by your domain in a specific folder and with a specific filename.

It must be your DOMAIN because Google need to check if the entry is allowed.

Check this also
 
Upvote 0
Top