开发者

UI for Android Service Preferences

I have an application with only a service, and the service will be used on demand via bindService. So it is not a long running service.

But the service does have associated preferences.

What is the preferred model for the preferences UI for such a servi开发者_如何学Pythonce? Notifications don't seem right, since the service isn't usually running. The only other option I see is to add an Activity in the application that is shown in the Launcher.

But it seems a little strange having a launcher icon called something like "Service X Preferences".

Are there some other options that I don't know of?


What is the preferred model for the preferences UI for such a service?

Have a PreferenceActivity that the user uses to set the preferences.

Notifications don't seem right, since the service isn't usually running.

Notifications are read-only and cannot be used to collect preferences.

The only other option I see is to add an Activity in the application that is shown in the Launcher

Usually, the PreferenceActivity is not in the launcher, but is reached from the activities that make up the application.

If you are saying that you have no other activities, you may wish to write some. Users tend to reject activity-less applications on the Market, with low ratings, because they are considered intrinsically broken. If the user cannot figure out how to launch the application within a few seconds after installation, you have problems.

Moreover, something in your application is calling bindService(), and it cannot be a BroadcastReceiver, so presumably it is an activity. Just provide an options menu item from there to your PreferenceActivity.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜