captfrank
captfrank

Reputation: 11

Android Program design

I'm fairly new to Android development so I was wondering how I should design/structure a new program I want to develop. I'm not sure if it should be started as a service or a broadcast receiver or an activity even (all I have ever done).

What I want to do is receive when certain events happen on the phone such as when the following are turned on blue-tooth, wifi, gps and camera. And when that happens send a message to a network manager (using SNMP).

Now I want this to continually run in the background waiting for these events to happen. Do I create a service and create receivers to create receivers and when the action happens create a service/tread to act on it/generate the SNMP message?

When that Is answered I was also struggling with how the manifest file would be structured fro when running receivers and services within the same set of code. But I guess that depends on how you design it to run?

Upvotes: 0

Views: 107

Answers (1)

Vladimir Ivanov
Vladimir Ivanov

Reputation: 43098

All you need is a broadcast receiver which gets notified about the listed events and start a server who asynchronously send some messages.

Upvotes: 1

Related Questions