2014년 12월 28일 일요일

Settings btn


how do I get access to the settings menu?
I mean when you touch the settings button on your phone in an app you see a menu.

--
You can use ActivityStarter to get to the Settings Menus.  

Here is a GPS example:

Here are other settings you can try (not all will work with all Android operating systems):

android.settings.ACCESSIBILITY_SETTINGS,
android.settings.INTERNAL_STORAGE_SETTINGS,
android.settings.ADD_ACCOUNT_SETTINGS,
android.settings.AIRPLANE_MODE_SETTINGS,
android.settings.APN_SETTINGS,
android.settings.APPLICATION_DETAILS_SETTINGS,
android.settings.APPLICATION_DEVELOPMENT_SETTINGS,
android.settings.APPLICATION_SETTINGS, 
android.settings.BLUETOOTH_SETTINGS,
android.settings.CAPTIONING_SETTINGS,
android.settings.DATE_SETTINGS,
android.settings.DEVICE_INFO_SETTINGS,
android.settings.DISPLAY_SETTINGS,
android.settings.INPUT_METHOD_SETTINGS,
android.settings.LOCALE_SETTINGS,
android.settings.LOCATION_SOURCE_SETTINGS,
android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS,
android.settings.MEMORY_CARD_SETTINGS,
android.settings.NETWORK_OPERATOR_SETTINGS,
android.settings.NFC_PAYMENT_SETTINGS,
android.settings.ACTION_PRINT_SETTINGS,
android.settings.PRIVACY_SETTINGS,
android.settings.QUICK_LAUNCH_SETTINGS,
android.search.action.SEARCH_SETTINGS,
android.settings.SECURITY_SETTINGS,
android.settings.SETTINGS,
android.settings.SOUND_SETTINGS,
android.settings.SYNC_SETTINGS,
android.settings.WIFI_IP_SETTINGS,
android.settings.WIFI_SETTINGS

--
Do you mean the settings for the phone?   If so, you don't get to that from within an app.  You get to it by using "settingd" from the home screen.

Or did you mean something else?

--
@Hal ... actually users can get to the Android Settings on the phone or tablet by using ActivityStarter to instantiate the Android screens from within an app.

--
At the bottom of a phone there are 3 keys...

key 1: bottom left: settings
key 2: bottom centre: home
key 3: bottom right: back

I can use "key 3"(the back key) no problem. I go to blocks click on screen and it is the 1st block called ".BackPressed".

how do I find the block for "key 1"(settings)? 

--
You can only manipulate the "back" key using blocks with AI2.  There are no blocks for the settings.    If you want individual Settings menus, you use the ActivityStarter control as described above.

--
I am not looking for phone settings.

just a menu that opens up setting for a normal app.

if I open the FaceBook app on my Samsung phone and click "key 1"(setting button bottom left of my phone) I can see that a menu of FaceBook setting comes up.

that's all I am trying to do.
Any help?

--
OK, you want something that will set Configuration Settings for a particular App Inventor app?

There are many ways you could do this.

1) Make a 'Configuration' screen for your app where you set global values and save them to a TinyDB (so that they become persistent (the app will 'remember' them) so they are set when the app next runs.

2) Do the same thing on a single screen.   You put the setting controls (buttons, spinner, ListPicker or whatever Objects you use to 'set' the parameters) inside a Horizontal or Vertical Layout.   You then can 'hide' or 'show' the Configuration controls by setting the Layout visible true or false.when not in use.  You still need to save the data to unique TinyDB tags.

3) In the Screen1.Initialize event handler, put the TinyDB instructions necessary to read the TinyDB blocks there and the blocks to assign values to the global values necessary (or set the labels, components etc. to the correct state).  You do this so your 'saved' configuration can be loaded on running your app.

4)  You can do something similar by 'saving' settings to a csv file using the File control to read or write instead of using a TinyDB.

5) If you use a second screen, you have to 'pass' values between screens ...there are several ways to do that.

Is this what you really wanted to know?

--
No that's not what I asked.

I will explain again with an image I attached to this post to make it even easier to understand.


At the bottom of a phone there are 3 keys...

key 1: bottom left: settings
key 2: bottom centre: home
key 3: bottom right: back



I can communicate with "key 3"(the back key) no problem. I go to blocks click on screen and it is the 1st block called ".BackPressed".

how do I communicate with "key 1" in App Inventor?


--
As said earlier in the thread,  developers can not activate your key #1at all from App Inventor.  Impossible.  App Inventor can use the ActivityStarter control to show some of the Android Settings but it cannot CHANGE any settings and it can not function as the #1 key.


-- 
Thank you.

-- 

I found this thread because I have a similar question to the one in the OP, but the final answer confuses me. My problem is that the context menu button is present in my app and I can't figure out if it can be removed. It's the one with the 3 dots in the bottom right of the screenshot below (from a Nexus 5).  I believe that on other phones this is actually the same button that the OP was referring to.  When you tap the button, the displayed options come up.  The About This Application option obviously displays the About information from the screen properties, but leaving that property blank doesn't remove the option because there is some hard-coded references to AI. The Settings option doesn't do anything at all.  I just want to get rid of this entire menu, but if I could at least remove the options in it and replace them with my own that would be fine too. I don't see how it's possible to suggest that these can't be coded given that they're clearly intended to be and AI is already using them,

--
Sorry as stated there is currently no way to remove, code or change the current menu items, unless you use one of the personal servers. This is something still to come. See these for more info -


Menu options in app inventor
New option "Settings" in the menu

--

댓글 없음:

댓글 쓰기