Configure Android System Settings From Delphi XE5 Firemonkey

Delphi XE5 Firemonkey Android System SettingsJim McKeeth from Embarcadero has a blog post up where he shows how to use the Android API with Delphi XE5 Firemonkey to access the system settings of the device. Your app must request permissions from the user in the manifest to access the system settings but once you have that there are a lot of useful settings you can read and write using the android.provider.Settings.System. Some examples of the system settings you can read and write with this API are VIBRATE_ON, VOLUME_ALARM, VOLUME_BLUETOOTH_SCO, VOLUME_MUSIC, VOLUME_NOTIFICATION, VOLUME_RING, VOLUME_SYSTEM, VOLUME_VOICE and a lot more. Jim set up two functions which read and write the SCREEN_OFF_TIMEOUT setting. You should be able to easily customize the two functions to read and write any setting you need. Here is the required Android permission from the manifest:

And here is the sample function to set the screen off timeout. It demonstrates how easy to it to send an integer from Delphi XE5 Firemonkey through the JNI interface to the Android SDK.

Head over and read Jim’s full blog post about the system settings API.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Configure Android System Settings From Delphi XE5 Firemonkey by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE5 Firemonkey Disk File Cache
File Cache Component For Delphi XE5 Firemonkey On Android And IOS

dkstar88 over at Pocket Hero has a blog post up about a component he created called TDiskCache. It was built...

Close