Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating another output device in iOS application with different content

NOTE : Kindly Look into the Edit Section , This section is just a Reference purpose.

I'm new to the IOS App Development architecture . Please, I just need a clarification that whether is it possible to make two outputs , one is continuously running in a background connecting to some other Output device (HDTV, Monitor, etc.) as shown in this link here

For example, I'm giving a seminar with connecting projector, running my Presentation as background process at the same time I can manipulate my stuff at laptop screen by using "EXTEND Mode".

Please don't de-promote my question, I just need to know whether "IOS Development Architecture" providing this or not .? Need to Do:

1) Possible to do with another Output screens with Background process(Continuously whenever a MyApp is alive).

2) One foreground display in my iPad that is intractable of MyApp.


Edit : Update To my own Question :

For the above mentioned problem,

I got the solution something interesting HERE and HERE.

I'll go through it, But If anyone has idea OR overcome from this problem, Please suggest me some helpful information.

Brief Explanation about Problem :

I just want to show some different content in another output device which has connected to iPad, when my App is running .

like image 475
Kumar KL Avatar asked Apr 26 '13 06:04

Kumar KL


2 Answers

Yes, this is possible using AirPlay.

By default, when you connect an external display to your iPad or iPhone, you get a mirrored image of your app on the external screen. But, you can access the second screen from your iPad or iPhone application and use it for other content. You can get all the available "screens" through the UIScreen class. From the docs for [UIScreen screens]:

The returned array includes the main screen plus any additional screens connected to the device. The main screen is always at index 0.

Not all devices support external displays. Currently, external displays are supported by iPhone and iPod touch devices with Retina displays and iPad. Older devices, such as the iPhone 3GS do not support external displays. Connecting to an external display requires an appropriate cable between the device and display.

For examples on what you can do, you can check out Real Racing 2, who shows a map on the iPad and the actual race on the external screen; or Tweetwall which also uses this approach (disclosure: I was responsible in part for making Tweetwall).

EDIT: You can initialize the external screen like this:

// Get second screen
UIScreen *secondScreen = [[UIScreen screens] objectAtIndex:1];
secondScreen.currentMode = secondScreen.preferredMode;

// Get the screen's bounds so that you can create a window of the correct size.
CGRect screenBounds = CGRectMake(secondScreen.bounds.origin.x,
                                 secondScreen.bounds.origin.y,
                                 secondScreen.currentMode.size.width,
                                 secondScreen.currentMode.size.height);
    
UIWindow *secondWindow = [[UIWindow alloc] initWithFrame:screenBounds];
secondWindow.screen = secondScreen;
 
// Setup external view controller
YourExternalScreenViewController *extVC = [[YourExternalScreenViewController alloc] init];
// Set VC for second window
secondWindow.rootViewController = extVC;
// Show the window.
secondWindow.hidden = NO;

There's a little bit more legwork, but this is the concept.

EDIT 2: And here is a link to Apple's Multiple Display Programming Guide for iOS

like image 69
nikolovski Avatar answered Nov 12 '22 04:11

nikolovski


You can use Airplay server if you want to mirror your mobile output on the screen.

like image 23
Deepak Srivastava Avatar answered Nov 12 '22 05:11

Deepak Srivastava