Deepak Ramesh
Deepak Ramesh

Reputation: 411

Go Back to Parent application from child application on press of Home button in iPhone in C#

I have a requirement to launch a child application from Parent application page on click of button which is present on Parent screen Page. And on launch of child app on click of iPhone home button it should return to Parent application.[Now it goes to iPhone Home screen]

To achieve this I have created a Parent application and placed a button. I have implemented the child application and have put app in iPhone. So, for the first time user should launch my Parent application and on click of button, it should take him to child application.

To achieve this I have place below code inside button click event and used URL scheme in child application:

UIApplication.sharedResources.openURL("childApplication://");

So when user click on my parent launch icon in iPhone a Parent app is launched with one button. On click of button a child app is launched. So now If click on home button on iPhone I need to go back to parent page but now it goes to iPhone home screen

Friends take a look and let me is this possible in C#. If yes what logic I need to use.

FYI... I tried launching the Parent app on click of home button when child app is launched by adding below code in DidBackgroundActive and WillTerminate methods of ApplicationDelegate but it did not work..

UIApplication.sharedResources.openURL("parentApplication://");

Please help me on this....

Upvotes: 0

Views: 131

Answers (1)

Jack Humphries
Jack Humphries

Reputation: 13267

You cannot change the action of the home button. It will always return the user to the home screen, or reveal the multitasking bar, or show Siri, etc. You cannot use it to return to another app. The best you can do is put a button in the child app that will open the parent app.

Upvotes: 1

Related Questions