Google Play Music API for Android - android

I'm working on a music application for Android.
I need two things:
Get album cover for artist, album name, track name, etc;
Open Google Play page for buying this album.
For the first thing I'm currently using iTunes API -- but this is not patriotic for true Android developer. If Google Play Music has similar service, I would preferred to use it. Does it exist?
What about second? I can use this code to show all search results according with my query:
Intent intent = new Intent(Intent.ACTION_VIEW)
.setData(Uri.parse("market://search?q=<My Query>"));
startActivity(intent);
But I want to show album or track buying page exactly. Is is possible for Google Play?

There's no official API for this from Google.
However, you can use an unofficial API that is being developed by Simon Weber. It's called Unofficial-Google-Music-API, and it seems to be actively maintained(as of this writing).
The documentation and examples are pretty straightforward, and you can find details about the song's metadata as listed here. Specifically, it gives an url to download cover art and the id for matching in the Play Store.
You may have to play around with the URL a bit for your search, though. For instance, you can use the returned albumMatchedId field to search by album like:
https://play.google.com/store/music/album?id=Bdkf6ywxmrhflvtasnayxlkgpcm
This should bring you to the album's page, where you can purchase each song or the entire album.
I haven't found a way to jump straight to a specific track, but I'm not sure if that's possible anyway, judging from the layout of the app.

Related

How to launch the Google Play Store as a popup

I've seen ads that display app stores as a popup rather than as a full screen view.
For Samsung Galaxy Store, I recently learned that this can be achieved if the url contains a query parameter with "form=popup". Does anyone know of a similar thing for the Google Play Store, either as part of the Intent or the Url?
Example:

Search video with YouTube API on Android

I'm trying to make a new application that will help people hear music together.
One problem I noticed is that the people need to get the YouTube code of each song or video they want to hear.
I kind of fixed this problem by using MySQL database with names and codes of songs, then all what the user need to do is to find the YouTube video and click on share with my application, it sends the link and the name of the video to the database and then users can search there for the song they want to play. However, I want to get rid of that, too.
Is there some way to search for a video on YouTube with the API?
I found this link to open source code on Google Developers https://developers.google.com/youtube/v3/docs/search/list#examples
But it just doesn't work.
You can use this:
https://www.googleapis.com/youtube/v3/search?part=snippet&q=eminem&type=video&key=<key>
Change the parameters to get what you actually need, but you need an API key from https://console.developers.google.com/ to make this work.
https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20
you can use above url for searching videos.

Android country-based App not showing on Google search

I've uploaded an Android App only available to four countries. I can't see its Google Play link indexed on Google search results. At first I thought it was due to it not being available in my country but running some tests I've found links to Apps not available at all in my country (for example ABC live TV) and whose results appear in Google Search results. Is there anything I must do to help Google index my App? I've seen there's a framework called Google Indexing but as far as I've read it's more focused on deep-linking rather than app discovery.
Just to clarify, I can access the App via the direct link from Google Play if I click on it on my Google Play Developer Console but I can't see my App in the search results if I look for it.
Can anyone just share some light about this issue?
Turned out to be just waiting for a couple weeks to wait for Google to index the App, now it's appearing properly

How do I make Google (search) to index the text in Android app

We all know that the Google spider comes by your website now and then to update their database so your website shows up in Google Search.
Is their a way to tell Google all the text I have in my app so it will show the Google Play Store page of my app when a users searches for keywords I use in my app?
I looked into the new Android feature of Google Indexing but those deep-links are something different.
I would like to index the content of my app so it can be found in Google Search before the user knows about and installed my app.
Background info: My app has a lot of (static) textual content in TextViews.
There is nothing like this that I am aware of.
Google indexes the text you put in the description of your app when you publish it on the Google Play Store.
Take a look at this:
https://developer.android.com/distribute/googleplay/developer-console.html
And here is concrete advise on app discoverability from Google themselves:
https://support.google.com/googleplay/android-developer/answer/4448378?hl=en

how to access youtube raw video file and play it in android youtube api

i want to display all the videos uploaded by a user, say cnn,
in my own android app, i will have a webview, and when user clicks on this video (cnn), it will play that particular youtube video in android's native video player, once video finishes, it will return to my app (webview where user lastly clicked)
my question is, which part of the google youtube data api should i feed to the intent? using the example below?
https://developers.google.com/youtube/2.0/developers_guide_protocol_understanding_video_feeds#Understanding_Video_Entries
can someone give me a CONCRETE example, no abbreviation or whatsoever, a link i should put in the intent?
i am confused because examples i found has .mp4 extension etc, which android will understand the intent that a video is requested to play.
but in the link provided above, there is no link to the raw file, i.e. no URI ends with .mp4
please help
By going thorough the documentation about youtube api and testing the demo App i think in-order make a app using youtube-api need
1) Developer key
2)Phone installed with latest version of youtube application (i think Actually youtube-api use some supports of youtube app to play video)
3)By using this api video will stay inside your app. but it use support from youtube app to play video
Note:- if am wrong Correct me

Categories

Resources