Showing current music playing information in android - java

Is it possible to track registered users of my android app and get information about what music is playing in their music player? If it can be tracked then is it legal to display the music listening information (just track ID, artist name, listening time) in their profile? The user's permission will be given ofcourse.
Basically, I am trying to build an app where registered users can see what other users are playing on their device music player.

If your app can play music, then you can definitely get the details you want, and so long as you have asked for permission from the user i.e in the 'Terms Of Use', you can legally publish that data. If your app is not playing the music, android security policy does not allow one app to view the data of another. In this case your app has no way of knowing which app is currently playing the music, and thus no way of getting the data you require. If on the other hand, you intend for the app to be run on rooted devices, then you can pretty much do anything you want...

Related

Tracking of directing user to Google Play Store

I've built a app that directs users to other apps on the play store. Im looking to be able to see which users I directed to this other app. Im using android studio
If you just want to know which or how many users went from your app to the play store, you can achieve this by event tracking for example via (Firebase Analytics). But as soon as your users have left your app, there is no way of tracking what they once left. For example, if there is a list of apps in your app, each linking to their corresponding play store entry, you can track clicks on the different links inside of your app. But as soon as the user clicked on that link and went to the play store, you can't track what he is doing there or if he is downloading the app (as long as you are not the developer of the app the user then downloads)

Read current audio output - Android

I want to know if it is possible to access the audio that is currently playing on the Android device.
Example: if Spotify is running in the background, I want to access the audio to control some LEDs that are connected to my RaspberryPi.
I want to create some sort of equalizer that changes colors depending on the sound that is currently playing. I appreciate if some one could tell me if accessing the main audio output is possible or not.
Unless you are using a rooted phone, it's not possible to capture output of a random app on Android.
You can however create an app that plays media files and captures the output for the purpose of visualization with "Visualizer" effect. You can take a look on the sample here: https://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/media/AudioFxDemo.java
(look for "Visualizer").
If you are using Raspberry Pi anyway, you can just play all your music through it, capture and analyze it there. You will need an external USB sound card though. See for example this post: http://www.g7smy.co.uk/2013/08/recording-sound-on-the-raspberry-pi/
There they just record and play audio back, but you can insert an analysis phase in between.

How to add a music player to my app?

So I made a website someday, and now via webview and the YouTube Api I made it possible to listen to the music on my phone.
But... as soon as I close my app it stops playing the music.
How can I possibly add a music player and make it so the music keeps playing after the phone goes on standby mode?
Thank you very much!
Even thought I haven't deal with Youtube API for Android, I think that what you are trying to do is impossible. Even the Youtube App doesn't keep music playing after the phone goes on standby mode. That's their policy about music videos on Youtube.

android-developing music player

I'm developing an Android music player and so my app should be able to detect volume key presses even when no Activity of my app is open and the screen is off(a background service is playing the media). I was thinking that it seems crystal clear that i should detect volume key presses from my service but as I searched the net, I got that it is impossible(e.g. as described here). so what should I do?!!!
You'll need to create a service, because activities don't run when screen is off
You need to run player in service. Also, you must set media type as music.

How to programmatically check build.prop to verify model

I have an app I'm currently working on based on the HTC Open Sense SDK for android. However my biggest problem is keeping up with the device checker through the Google Play dev console to only allow certain devices to download the app. My biggest reason is that people will rate my app so low on the scale and say it sucks, but the problem is that they don't read the requirements - if you use an Lg G2 to try and launch an app made for an HTC ONE that requires Sense, it's going to crash.
So, how would i go about building a helper class that would check the device's model via build.prop (without needing root privileges) before opening/starting the main activity, and give the user a notification if the device was incapable of launching the app, and with devices that are capable of launching it, just continue the process of opening the app?

Categories