Android Open Source - nightvision Bootup Receiver






From Project

Back to project page nightvision.

License

The source code is released under:

Copyright (c) 2012 Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are me...

If you think the Android project nightvision 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.ford.openxc.nightvision;
//from ww w.jav  a  2 s  .  co  m
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/** Receive a broadcast on device startup and start the
 * VehicleMonitoringService.
 *
 * That service needs to be started to start watching for the transmission gear
 * position to change to "reverse".
*/
public class BootupReceiver extends BroadcastReceiver {
    private final static String TAG = "CameraBootupReceiver";

    @Override
    public void onReceive(final Context context, Intent intent) {
        Intent MonitoringServiceIntent = new Intent(context,
                VehicleMonitoringService.class);
        context.startService(MonitoringServiceIntent);
        Log.w(TAG, "Starting Service from BootupReceiver");
    }
}




Java Source Code List

com.ford.openxc.nightvision.BootupReceiver.java
com.ford.openxc.nightvision.NightVisionActivity.java
com.ford.openxc.nightvision.NightVisionView.java
com.ford.openxc.nightvision.VehicleMonitoringService.java