How to add an application settings in android system settings?

青春壹個敷衍的年華 提交于 2019-12-24 21:57:01

问题


In my application i have a requirement that i want to provide one edit text in the system settings menu to enter URL and my application hit the server based on the user given URL in system setting. Is it possible ? If it is possible please can any one help me to do this.

It is possible in IPhone as they are having a setting.Bundle. Do we have any framework in android similar to IOS?

Thanks in Advance.


回答1:


You can add the intent-filter blew at your activity in manifest.xml, add it will make a link at system setting -> appinfo -> your app detail | addtional settings. and click it will jump to yout activity.

this is very deep path, but it work.

<intent-filter>
    <action android:name="android.intent.action.APPLICATION_PREFERENCES" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

Another way: check and read a file like "debug.properties" from sdcard, then read the url properties.



来源:https://stackoverflow.com/questions/26966179/how-to-add-an-application-settings-in-android-system-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!