Android Open Source - BluetoothGlass Device Boot Receiver






From Project

Back to project page BluetoothGlass.

License

The source code is released under:

GNU General Public License

If you think the Android project BluetoothGlass listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.vicmns.bluetoothglass.server.receivers;
/*from  w  w w .  j  ava  2  s  .  c o m*/
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.vicmns.bluetoothglass.server.service.BluetoothService;

/**
 * Created by Victor Cervantes on 3/19/14.
 */
public class DeviceBootReceiver extends BroadcastReceiver {

    public static final String TAG = DeviceBootReceiver.class.getSimpleName();

    @Override
    public void onReceive(Context context, Intent intent) {
        if( "android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
            ComponentName comp = new ComponentName(context.getPackageName(),
                    BluetoothService.class.getName());
            ComponentName service = context.startService(new Intent().setComponent(comp));
            if (null == service){
                // something really wrong here
                Log.e(TAG, "Could not start service " + comp.toString());
            }
        } else {
            Log.e(TAG, "Received unexpected intent " + intent.toString());
        }
    }

}




Java Source Code List

com.vicmns.bluetoothglass.client.MainApplication.java
com.vicmns.bluetoothglass.client.activities.BluetoothClient.java
com.vicmns.bluetoothglass.client.activities.MainActivity.java
com.vicmns.bluetoothglass.client.adapters.BluetoothDevicesAdapter.java
com.vicmns.bluetoothglass.client.bluetooth.SendFileToDeviceTask.java
com.vicmns.bluetoothglass.client.callbacks.CardScrollCallBacks.java
com.vicmns.bluetoothglass.client.data.BluetoothParametersHolder.java
com.vicmns.bluetoothglass.client.models.BluetoothDeviceModel.java
com.vicmns.bluetoothglass.client.services.GoogleVoiceTriggerService.java
com.vicmns.bluetoothglass.client.services.SendPictureToDevice.java
com.vicmns.bluetoothglass.client.tools.FileExtensionFilter.java
com.vicmns.bluetoothglass.client.views.CameraView.java
com.vicmns.bluetoothglass.client.views.OverlayView.java
com.vicmns.bluetoothglass.server.MainActivity.java
com.vicmns.bluetoothglass.server.MainApplication.java
com.vicmns.bluetoothglass.server.data.BluetoothParametersHolder.java
com.vicmns.bluetoothglass.server.handlers.BluetoothConnectionHandler.java
com.vicmns.bluetoothglass.server.handlers.BluetoothReadFromSocketHandler.java
com.vicmns.bluetoothglass.server.receivers.DeviceBootReceiver.java
com.vicmns.bluetoothglass.server.service.BluetoothService.java