0

My App is display the image on the HDMI TV.I have created i custom receiver http://photo-genie.com/photogenie1.html (my receiver.html). when i send a message from my code this method is not getting called.Something i missing please someone give the solution.i have searched but didn't get any solution.some help me thanks in advance.

here is my code send and receive the image message...

This method is not getting called when i send the image message to the receiver...

- (void)didReceiveTextMessage:(NSString*)message { 
      NSLog(@"received message: %@", message);
}

I am sending a image to the receiver that is display on the TV. here is the sending code..

- (IBAction)castImage:(id)sender {

      NSLog(@"sending text %@", _image1.image);

      if (!_deviceManager || !(_deviceManager.connectionState == GCKConnectionStateConnected)) {
          UIAlertController *alert =
          [UIAlertController alertControllerWithTitle:@"Not Connected"
                                        message:@"Please connect to Cast device"
                                preferredStyle:UIAlertControllerStyleAlert];
          [self presentViewController:alert animated:YES completion:nil];
    return;
     }

      CastChannelData *textChannel =_imageChannel;
      NSString *messageString = [NSString stringWithFormat:@"%@",_image1.image];
     [textChannel sendTextMessage:messageString];

}

here is the application metadata channel code..

- (void)deviceManager:(GCKDeviceManager *)deviceManager didConnectToCastApplication:(GCKApplicationMetadata *)applicationMetadata sessionID:(NSString *)sessionID launchedApplication:(BOOL)launchedApplication {

    if (launchedApplication) {
         NSLog(@"application has launched");
         self.imageChannel =
         [[CastChannelData alloc] initWithNamespace:@"urn:x-cast:com.google.cast.photogenie.custom"];
         [_deviceManager addChannel:_imageChannel];

    }else {
         NSLog(@"application has Not launched");
    }
}

someone please help me.Thanks in advance

Nirav D
  • 71,513
  • 12
  • 161
  • 183
  • Where is your image residing at? – Ali Naddaf Jul 02 '16 at 12:41
  • I am passing single one image url to the custom receiver but image is not getting display on the TV.Where is problem Ali Naddaf. – Nishat Alam Jul 04 '16 at 03:46
  • here is my custom receiver http://photo-genie.com/photogenie1.html this receiver is correct or not Ali. – Nishat Alam Jul 04 '16 at 03:47
  • You didn't answer my question: where is your image located at? Is it on your phone? Is it in the cloud? – Ali Naddaf Jul 04 '16 at 14:40
  • My app fetches the Facebook album photos and display on the mobile.I make a custom receiver.html but i am not getting how to sent the image to the receiver Ali please give any idea how to send the image to the receiver. – Nishat Alam Jul 05 '16 at 04:08

0 Answers0