I have a continuous audio stream since I'm casting from my Internet radio application. How can I update the song information?
Do I need to create a custom receiver that updates the information?
Yes, you do need to write a custom receiver to handle that; neither the Default nor the Styled receiver can do that for you.
Related
If we create a custom receiver app using HTML5/Javascript to play music, is it possible that the state of a com.google.android.gms.cast.framework.media.RemoteMediaClient will be updated ?
The purpose is to send custom message (as play/pause) with specific data to this receiver and is to have all related states always in the instance of RemoteMediaClient.
If it is possible, how to attach the Media Player to the Receiver API ?
My sender app is an android application using the CAF SDK.
You can load media from a custom receiver: https://developers.google.com/cast/docs/caf_receiver/advanced#tip-loading-media-using-contentid-contenturl-and-entity
This will ensure that both the receiver and the sender app will stay in sync with regards to the media state of the current track and any media in a queue.
We have a custom receiver that is using an HLS stream with segmented webvtts. Is there a way on Android to obtain the text tracks that were loaded on the receiver?
It seems that
MediaInfo#getMediaTracks
only returns tracks that were provided to the receiver through the load method.
Is using a custom channel the only way to do this? https://developers.google.com/cast/docs/android_sender_advanced#add_a_custom_channel
I'm playing a live HLS stream in a Chromecast app, and I'm wanting to update the MediaMetadata when programmes start/finish. However I can't find a method to do this. I can load the stream again with fresh MediaInfo, but I can't just update the existing metadata. Is there any way to do this?
At present I'm casting from an Android app.
Is there a way to send fresh MediaMetadata to the receiver, or can I pass a custom data message with the information, and update the metadata within the sender using javascript?
see 'CCL' in general for the interfaces to manipulate things like metaData on events like onRemoteStatusChange()...
Looking at that, IMO if you want to alter the message type below to "METADATA_CHANGE" OR whatever it would be for a change in the mediaInfo, then just send the message to the receiver and you should get the broadcast you want... onMediaDataChanged().
sample msg from receiver to CastMgr...
{"requestId":0,"status":{"applications":[{"appId":"33E59692","displayName":"test-receiver-app","namespaces":[{"name":"urn:x-cast:com.google.cast.player.message"},{"name":"urn:x-cast:com.google.cast.media"}],"sessionId":"0869F8A7-25CE-E55F-F571-346EBABB81FB","statusText":"Ready To Cast","transportId":"web-3"}],"isActiveInput":true,"volume":{"level":1.0,"muted":false}},"type":"RECEIVER_STATUS"}
onRemoteMediaPlayerStatusUpdated()
When the receiver goes from PLAY to IDLE at the end of a video , the status change event is called on all 'listeners' ie all implementations of IVideoCastConsumer that have registered as listeners for 'status-changed'.
In the Base CCL class of BaseCastManager, you can watch for this specific status change and then broadcast your onRemoteMediaPlayerMetadataUpdated() event and all observers will get appropriate callback on that.... OR listen on event and just send the correct type of message to the receiver.
If its not exactly intended to observe mediaMetaDataChanges IMO , looking it over may help you tweek the existing API with and #Override in order to get your desire result.
I want to receive incoming call automatically that was I done already now I want to play my own created sound to my caller rather than android will use its default mike..
Can is it possible to play our own sound after receiving incoming call?
I refereed this. Can anyone tell me is it possible now?
I searched lot related to this topic but still I am not able to find something useful.
If anyone know about this then please help me..
Thanks in advance.
I found this may be helpful for you
quote from: How to automatically answer call and play prerecorded sound out to the caller and DTMF on Android
"No, sorry, Android has no access to the in-call audio stream. Closest thing is if the device is in speakerphone mode, you can blend your audio into what the speaker plays, which may get picked up by the microphone."
As described here (http://www.krvarma.com/2010/08/detecting-incoming-and-outgoing-calls-in-android/), you should be able to detect this:
To detect the incoming call, we register a BroadcastReceiver for the
action android.intent.action.PHONE_STATE. This will be broadcasted
when there is a change in phone state. The receiving intent will have
an extra string variable TelephonyManager.EXTRA_STATE which describes
the phone state. If this state is TelephonyManager.EXTRA_STATE_RINGING
then there will be another extra string variable
TelephonyManager.EXTRA_INCOMING_NUMBER. This variable contains the
incoming phone number. Note that this variable will not be present
when the state is not TelephonyManager.EXTRA_STATE_RINGING.
I am going to create call record application, There I need to play minute and recording notification sound. It should here to caller and receiver two parties. Is there any good example for such application?
Thank You.
I am going to create call record application
That is not possible on Android. Android SDK applications do not have access to the in-call audio.