[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[jx8Intents] Settings screen


SwikiCodeRobot @> 588

"Open a specific section of Settings."
| intent context pages |
pages := #(
	SETTINGS
	WIRELESS_SETTINGS
	AIRPLANE_MODE_SETTINGS
	WIFI_SETTINGS
	APN_SETTINGS
	BLUETOOTH_SETTINGS
	DATE_SETTINGS
	LOCALE_SETTINGS
	INPUT_METHOD_SETTINGS
	DISPLAY_SETTINGS
	SECURITY_SETTINGS
	LOCATION_SOURCE_SETTINGS
	INTERNAL_STORAGE_SETTINGS
	MEMORY_CARD_SETTINGS
).
context := MainActivity current.
intent := Intent action: 'android.settings.'
	,(pages at: (pages size - 1 * Random new next) truncated + 1).
(intent resolveActivity: context packageManager) isNil ifTrue: [
	self error: 'Intent canīt be resolved'
].
context startActivity: intent.
^#Ok