Package com.mparticle.media
Class MPMediaAPI
- java.lang.Object
-
- com.mparticle.media.MPMediaAPI
-
public class MPMediaAPI extends java.lang.Object
Utility class to interact with the mParticle Media APIs. Do not directly instantiate this.- See Also:
MParticle.Media()
-
-
Constructor Summary
Constructors Constructor Description MPMediaAPI(android.content.Context context, MediaCallbacks callbacks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAudioPlaying()
void
setAudioPlaying(boolean playing)
Use this method to inform the SDK that there is audio playing.
-
-
-
Constructor Detail
-
MPMediaAPI
public MPMediaAPI(@Nullable android.content.Context context, @NonNull MediaCallbacks callbacks)
-
-
Method Detail
-
setAudioPlaying
public void setAudioPlaying(boolean playing)
Use this method to inform the SDK that there is audio playing. In the case where a user navigates away from your app, but your app is playing music in the background, using this method will ensure that the mParticle SDK does not end the user's session prematurely. A user's session will be considered active as long as audio is playing, so be sure to use this method both to signal when audio starts, as well as when it pauses or stops.- Parameters:
playing
- Is your app currently playing music for the user.
-
getAudioPlaying
public boolean getAudioPlaying()
-
-