Search code examples
androidbluetoothtelephony

Custom Android Telephony application


I assume this is the proper forum , not android.stackechange since it is software related.

I am a novice Java developer and need to create a custom Android telephony application with the following functionality

  • launches automatically when device starts , boots
  • launches in kiosk mode, no notifications, or access to other applications!
  • has a single 'call' button which places a phone call to a hardwired phone number.
  • has the ability to communicate 1 way simple data to external device(think arduino) via bluetooth. i.e. when call received signal to arduino to flash lights, etc
  • optional display for either hardcoded message or number received.

Should I make use of a single Activity class?
What other classes should I create or make use of?
In order to properly test both incoming and outgoing calls do I need to first deploy to an actual device with an initialized(with phone number) SIM?

Are there any Android projects on Github or elsewhere that have parts of this functionality I might study and learn from?

Any other architecture tips or suggestions?


Solution

  • Yes you can make single activity class. But as you want to add few functions so its better to create few activity classes. As its easy to check and manage smaller activity classes as compare to only one large activity class. And the number of classes depend upon functions. Its good if you create one class for one function.

    1.For automatically launching it when device starts you can use following code-

    public class YourReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {
            Intent intent = new Intent(context, YourActivity.class);
            context.startActivity(intent);
        }
    }
    

    And add following code to your manifest file-

        <receiver
            android-permission="android.permission.RECEIVE_BOOT_COMPLETED"
            android:name="YourReceiver" >
            <intent-filter >
                <action android:name="android.intent.action.SCREEN_ON" />
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
    

    2.For launching it in kiosk mode-

    Is it possible to create an android app to make the phone run in sort of a kiosk mode?

    3.For making phone calls-

    How To Make A Simple Phone Call Application

    How to make a phone call from your application

    4.For bluetooth option-

    Android Bluetooth sample app