06-19-2010 02:14 PM
I am wondering how to implement such a Terms of service screen the App World has.
I tried to make a Class extending Dialog and build it but how can I open it at the startup?
I want to show it if possible before the first screen is pushed.
I have no problem to decide whether it is the first application start or not, this is all already done.
But I have problems showing the Dialog without an application screen pushed already.
And how do I close the application correctly if the user declines?
Solved! Go to Solution.
06-19-2010 03:06 PM
If you absolutely have to push the TOS dialog prior to the first app screen, then you will have to use pushModal() with the "GLOBAL" property.
I would suggest ditching the Dialog class and making your own TOS dialog using PopupScreen with a RichTextField for the TOS text. You'll want to place two buttons, "Accept" and "Decline".
You will provide a getResponse() (or whatever) method that returns the value of the button (like 0 = Accetpt, 1 = Decline). If the response is decline, you will call System.exit(0)