Problem creating preferences screen.

William Hunter

Active Member
Licensed User
Longtime User
I am having a problem creating a preferences screen. If I use a Button to launch “StartActivity(SettingsScreen.CreateIntent)” the preferences screen appears as it should. Whereas, if I use a AHQuickAction menu item for the launch I get the error message “The application pop3(Process.Eraps.pop3) has stopped unexpectedly. Please try again”, along with a force stop Button. The log contains this information:

** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **

I don’t understand why there is this difference, because in all other respects the setups are in the main identical, other than the Button is set up in “Sub CreatePreferenceScreen”, while the AHQuickAction menu is set up in “Sub Activity_Create”. Is there something I need to add to my code in order to use the AHQuickAction menu to launch a preference screen? Any help would be greatly appreciated. :BangHead:
 

William Hunter

Active Member
Licensed User
Longtime User
Hello Erel - Thank you for your reply. This is what appears in the unfiltered log.

Regards
 
Upvote 0

William Hunter

Active Member
Licensed User
Longtime User
Problem creating preferences screen

Hello Erel - I have taken the popup menu out of the mix in order to simplify things. However, I still get the same error. This is the new unfiltered error log:


These are the Subs I am using:


I look forward to your comments.
 
Upvote 0

William Hunter

Active Member
Licensed User
Longtime User
Problem creating preferences screen

This is the problem:
B4X:
SettingsManager.SetString("check1", "") '
You cannot put a string value in a checkbox.
Hello Erel - Thank you for your reply. I have corrected that error, which I should have seen. Unfortunately, I still get the same error. This is the new unfiltered error log:
I have redone my subs and I can't see any error. These are my subs:
:BangHead: I don't like having to post this again, but I've looked long and hard to see what I might have done wrong, and still can't find an error. I look forward to your reply.

Best regards
 
Upvote 0

William Hunter

Active Member
Licensed User
Longtime User
Problem creating preferences screen

I guess that the problem is that the value is already stored as string. Try to uninstall the program from the phone and then install it again.
Hello Erel – You were correct in your suggestion. I simply had to clear the data and uninstall the program from the emulator. I wasn’t aware that a certain level of housekeeping was required. :signOops: I learn something new every day, and will now do my housekeeping chores on a regular and frequent basis.

Thank you for the assistance.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…