settings

Android: How to check whether 3G is enabled or not?

此生再无相见时 提交于 2019-12-04 18:29:10
I need to know whether 3G connectivity is permitted on the device or not. I don't want to know what current network state is, because if you set "Network Mode" setting in "Mobile network settings" screen to "Automatic" network state could be either 2G or 3G. I just want to know which setting is selected there - 2G, 3G or Automatic (latter two mean the same for me). Both telephonyManager.getNetworkType() and ConnectivityManage.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() are returning current network state, which can lead me in a wrong direction, because if current state is 2G it

Settings.Secure.HTTP_PROXY deprecated in ICS but no information on replacement

纵然是瞬间 提交于 2019-12-04 18:07:25
问题 The Android developer docs say the following about Settings.Secure.HTTP_PROXY : Host name and port for global http proxy. Uses ':' seperator for between host and port TODO - deprecate in favor of global_http_proxy_host, etc But there is not any information about global_http_proxy_host . Now I always get null when trying to read Settings.Secure.HTTP_PROXY . Settings.Secure.HTTP_PROXY was working properly in all releases before ICS. 回答1: You can use Java Reflection to set the global proxy

How to change the Lock screen custom text(Owner Info)?

人盡茶涼 提交于 2019-12-04 17:17:43
I wrote the program code String message = "This is test"; Settings.System.putString(context.getContentResolver(), Settings.Secure.LOCK_PATTERN_ENABLED, message); This is not changing the lock screen text(Owner Info) and Added permission as <uses-permission android:name="android.permission.WRITE_SETTINGS" /> Change Settings.Secure.LOCK_PATTERN_ENABLED to Settings.System.NEXT_ALARM_FORMATTED . Note that Settings.System.NEXT_ALARM_FORMATTED was deprecated in API level 21. You must use getNextAlarmClock() instead. getNextAlarmClock() is a public method in AlarmManager class which was introduced in

How do I store an array of a particular type into my settings file?

浪子不回头ぞ 提交于 2019-12-04 17:07:51
For some reason, I can't seem to store an array of my class into the settings. Here's the code: var newLink = new Link(); Properties.Settings.Default.Links = new ArrayList(); Properties.Settings.Default.Links.Add(newLink); Properties.Settings.Default.Save(); In my Settings.Designer.cs I specified the field to be an array list: [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::System.Collections.ArrayList Links { get { return ((global::System.Collections.ArrayList)(this["Links"])); } set { this["Links"] = value

How to call the native window of Bluetooth settings on Android in Delphi?

风流意气都作罢 提交于 2019-12-04 17:07:29
I've seen an app where its Bluetooth settings calls the native window of Android Bluetooth settings. When the user press Android Back button, it returns to the app. How does this call the native Bluetooth settings window in Delphi? As per: How do I open the Bluetooth Settings Activity programmatically? uses Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Provider, Androidapi.Helpers; procedure TForm1.Button1Click(Sender: TObject); var LIntent: JIntent; begin LIntent := TJIntent.Create; LIntent.setComponent(TJComponentName.JavaClass.init(StringToJString('com.android.settings'),

How show “Voice Input and Output” settings page from application?

烂漫一生 提交于 2019-12-04 16:45:11
To help the user choose the settings I want from my application to open the Voice Input and Output settings page. I can just open the settings (Settings.ACTION_SETTINGS), I can open the various pages out there (Settings.ACTION_XXXX_SETTINGS) - but it can not find how to do it for Voice Input and Output page. Any idea? P.S. I try check source Settings.apk, but no one not using VoiceInputOutputSettings.java The following is found in Android 2.3.3 source code git: 501 <activity android:name="VoiceInputOutputSettings" 502 android:label="@string/voice_input_output_settings"> 503 <intent-filter> 504

Change regional and language options in BATCH

荒凉一梦 提交于 2019-12-04 16:24:38
How can I change the regional and language options in Windows XP and 7 using batch code? I want to change the "Standards and formats" to Mexican Spanish with a .bat file. Those settings are in the registry under HKCU\Control Panel\International You can use reg.exe to make the changes manually. The easiest way to do that is to manually change your region and language to spanish (mexico) open a cmd window and type reg query "HKCU\Control Panel\International" which will show you the values as you want them. Then to modify them, use REG ADD "HKCU\Control Panel\International" /t REG_SZ /v

ConfigObj/ConfigParser vs. using YAML for Python settings file

妖精的绣舞 提交于 2019-12-04 15:37:41
问题 Which is better for creating a settings file for Python programs, the built-in module (ConfigParser) or the independent project (ConfigObj), or using the YAML data serialization format? I have heard that ConfigObj is easier to use than ConfigParser, even though it is not a built-in library. I have also read that PyYAML is easy to use, though YAML takes a bit of time to use. Ease of implementation aside, which is the best option for creating a settings/configuration file? 回答1: Using ConfigObj

Open Settings application on Unity iOS

丶灬走出姿态 提交于 2019-12-04 15:26:16
I am in need of a way to make the user is taken to the Settings application to disable the multitasking gestures. I know that in iOS 8 you can launch the Settings application programmatically through the URL in Objective-C: NSURL * url = [NSURL URLWithString: UIApplicationOpenSettingsURLString]; But I do not know how to get this URL in Unity to use with Application.OpenURL() JeanLuc You need to write a tiny iOS plugin for that, here is more information about it: http://docs.unity3d.com/Manual/PluginsForIOS.html And here is your solution, ask if something should be unclear. Script/Example.cs

iOS App Persistent Settings After App Deleted

心已入冬 提交于 2019-12-04 14:51:37
We are creating an app as follows: User starts with 2 free "tokens" User can buy a pack of 10 tokens with $.99 in-app purchase We have implemented this using NSUserDefaults to save the number of tokens. Is there a way to make our free 2 token setting persistent? Even if they delete the app? Right now you can delete the app and reinstall to get 2 tokens again. iOS 5 has NSUbiquitousKeyValueStore for saving settings to iCloud, is that any better? If not we will have to use a web service for this... NOTE: This app is in MonoTouch, but probably irrelevant to the question. Also, in our app, the