Closed GoogleCodeExporter closed 8 years ago
Please state clearly what the issue is, I am not clear on what you are saying
here.
Original comment by anad...@google.com
on 22 Feb 2014 at 6:03
Rephrasing:
Messages sent by the sender iOS app via the sendTextMessage method of the
GCKMediaControlChannel always die in the receiver with the error below
"[cast.receiver.mediaManager] Ignoring request, requestId is not an integer:
undefined"
..as a hack, one could add the requestId manually to the message, however the
message will again die in the receiver which complains that the message is
missing a "sessionMediaId" attribute.
This may be a document bug
(https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_cast_chan
nel#a536d42cdfb9d56d9ed10c3f75c493985 does not mention anything about the need
to add special attributes to the message), however it makes more sense for the
SDK to wrap application-produce messages since that type of metadata is owned &
managed by the SDK - so this is likely a problem with the SDK itself.
=====Sample sender code reproducing the issue======
NSDictionary *messageDict = @{
@"message": @"blah",
@"num":[NSNumber numberWithInt:2]
};
NSError *error;
NSData *msgData = [NSJSONSerialization dataWithJSONObject:messageDict
options:0
error:&error];
NSString *message = @"" ;
if (!msgData) {
DDLogError(@"ERROR serializing message: %@", error);
return NO ;
} else {
message = [[NSString alloc] initWithData:msgData encoding:NSUTF8StringEncoding];
[self sendTextMessage:message] ;
}
Original comment by hhar...@gmail.com
on 22 Feb 2014 at 8:29
If you want to send a custom message, then you need to use a custom namespace.
Don't use the media channel to send custom messages.
Original comment by lnicho...@google.com
on 22 Feb 2014 at 8:37
Original comment by anad...@google.com
on 23 Feb 2014 at 1:23
Original issue reported on code.google.com by
hhar...@gmail.com
on 22 Feb 2014 at 1:53