Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Reply
Developer
Posts: 225
Registered: ‎09-29-2010
My Device: Limited Edition Z10, Playbook
My Carrier: Airtel

How to exit app in Android for BB10 and Playbook?

Hi,

 

I have made a game on Android platform.

There is an exit button which uses intent to launch Home screen of Android and finishes the activity on press of this button.

 

While porting it to BB10 Dev Alpha Device and Playbook, it gives me error for openning home screen. So Ihave commented this part in Blackberry. I just finish the activity and call System.exit(0);

 

This is not the right way of exiting the app as Android don't support such ways.

 

Is there any way I can exit my Android game on press of my Exit button?

Any best practice for such events while porting ?

 

Thanks

Abhinav Tyagi

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot