Deezer Intent - Android - android

I've already searched the web but haven't found any results. How can I make the Deezer app play a specific song using an intent at Android? (I'd like to do this with Deezer too).

Just start an ACTION_VIEW intent on "http://www.deezer.com/track/{id}".
String uri = "http://www.deezer.com/track/" + trackId;
Intent intent = new Intent(Intent.ACTION_VIEW, uri);

Related

How to open GooglePhoto's video/image by Uri link?

I pick a video from Google Photos app, using:
Intent intent = new Intent(Intent.ACTION_PICK,
MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, PLAY_VIDEO);
and on ActivityResult I get the following uri:
content://com.google.android.apps.photos.contentprovider/-1/2/content%3A%2F%2Fmedia%2Fexternal%2Fvideo%2Fmedia%2F86/ORIGINAL/NONE/video%2Fmp4/1871297128
Then I try to open the same video in Google Photos by given link, through:
Intent configIntent = new Intent(Intent.ACTION_VIEW, link);
startActivity(configIntent);
But the only thing I get is the toast message: "Media not found".
Why? Maybe I need to specify some extras to opening intent?

How to send URL to OneNote Android App?

I have a URL that I want the user to open in OneNote or a web browser using an Android intent. With web browser it's easy. I just use ACTION_SEND and set the intent data with the url.
How do I add OneNote app (if available) to the list of apps to choose from as well as send this URL data?
Look at this other question, it should have all your answers
Launch OneNote using Share Intent in Android
Edit
String onPackageName = "com.microsoft.office.onenote";
Intent launchIntent = getPackageManager().
getLaunchIntentForPackage(onPackageName);
launchIntent.setAction(Intent.ACTION_SEND);
launchIntent.putExtra(Intent.EXTRA_TITLE,"Hello world");
launchIntent.putExtra(Intent.EXTRA_TEXT,"Hello world");
launchIntent.putExtra(Intent.EXTRA_SUBJECT,"htttp://www.google.com");
startActivity(launchIntent);
I solved it using the following code:
String url = link.Uri;
Uri uri = Uri.parse(url);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
if (intent.resolveActivity(context.getPackageManager()) != null) {
context.startActivity(intent);
}

Android Intent for deep-linking to Deezer Search

I am trying to perform a search on Deezer by sending the following intent:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.deezer.com/search/" + query));
this.startActivity(intent);
In a previous version the web browser opened with a link saying "Open in Deezer" (or the like).
But in the current version this doesn't work anymore.
Is there any way to open the Deezer app and perform a search?
I have already tried the following (without success):
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("deezer://search/" + query));
this.startActivity(intent);
There are many deeplinks you can use to search for content inside the Deezer app. You do have the basic search like this :
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("deezer://www.deezer.com/search/" + query));
this.startActivity(intent);
But you can also be more precise :
// Search for an artist, will display the best match
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("deezer-query://www.deezer.com/artist?query" + query));
this.startActivity(intent);
// Search for an album, will display the best match
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("deezer-query://www.deezer.com/album?query" + query));
this.startActivity(intent);
// Search for a track, will display the best match
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("deezer-query://www.deezer.com/track?query" + query));
this.startActivity(intent);
I believe it should be
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("deezer://www.deezer.com/search/" + query));
this.startActivity(intent);
The scheme of the Uri needs to be deezer. You have set it as http.
Try this. This should work.

How to play video mp4 using intent from my android app? This is possible?

I need to play a mp4 video in my app, bat I want to use intent. Is this possible?
private void startTrailer(){
Uri contentUri = Uri.parse("android.resource://" + pkgName + "/" +R.raw.v01_homem_ferro_3);
Intent intent = new Intent( Intent.ACTION_VIEW );
intent.setDataAndType( contentUri, "video/mp4" );
context.startActivity( intent );
}
Exception: No Activity found to handle Intent.
Somebody had this issue before. Check these links and see if they give you a good starting point to solve the problem:
Android intent for playing video?
How to play a video (.mp4) from assets or raw folder with the video intent?
Please try this, Here strMyVideo is my filepath,
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(strMyVideo));
intent.setDataAndType(Uri.parse(strMyVideo), "video/mp4");
activity.startActivity(intent);

Facebook Link doesnt work android

Hello I just want to call Facebook app with the link below (on my android project):
String url_facebook_prixo = "https://www.facebook.com/pages/Prixo/468580313168290";
I tried this :
Uri uri = Uri.parse("facebook://facebook.com/page{468580313168290}");
Intent viewIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(viewIntent);
I tried with others link but its only displaying my wall..
Someone?
You should use the id to open the page.
Intent facebookIntent = new Intent(
Intent.ACTION_VIEW,
Uri.parse("fb://profile/468580313168290"));
startActivity(facebookIntent);
I would advice you to encapsulate this in a try catch. Inside the catch open a normal browser intent

Categories

Resources