开发者

android dev: Services

i need to know that do i define the service class as a seperate .class file or do i define it within my main class of the activity ?

can someone provide me with an example apar开发者_如何学Ct from this one... http://developer.android.com/reference/android/app/Service.html

??? :/ Thank you


Here's an example of using Services from the docs. In this case for Bluetooth. It should give you enough of an idea of how to construct your own.

http://developer.android.com/resources/samples/BluetoothChat/src/com/example/android/BluetoothChat/index.html


I believe you should create a separate class for your service, which you'll start through your Main Activity.

Here a quick tutorial: http://inchoo.net/mobile-development/android-development/android-simple-service/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜