如何在Android系统设置中添加应用程序设置?

如何在Android系统设置中添加应用程序设置?

问题描述:

在我的应用程序中,我有一个要求,我想在系统设置菜单中提供一个编辑文本以输入URL,然后我的应用程序根据系统设置中用户给定的URL进入服务器。可能吗 ?

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.

由于iPhone上有设置,所以可以在iPhone中使用。
我们在android中是否有类似于IOS的框架?

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

感谢提前。

您可以在manifest.xml中的活动中添加intent-filter blew,添加该链接将在系统设置-> appinfo->您的应用详细信息|中添加链接。其他设置。

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>

另一种方式:
检查并从sdcard读取文件 debug.properties,然后阅读url属性。

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