Android Open Source - Roundr Boot Receiver






From Project

Back to project page Roundr.

License

The source code is released under:

Copyright (C) 2013 Mohammad Adib Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the te...

If you think the Android project Roundr 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 mohammad.adib.roundr;
/*ww w . j  a v a  2 s .  c  o  m*/
/**
 * Copyright 2013 Mohammad Adib
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License. You may obtain a
 * copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public class BootReceiver extends BroadcastReceiver {

  /**
   * Simple receiver that fires upon turning on the device
   * 
   * @author Mohammad Adib <m.a.adib96@gmail.com>
   * 
   *         Contributors: Mark Wei
   * 
   */

  public static boolean boot_up = false;

  boolean boot = false;

  @Override
  public void onReceive(Context context, Intent intent) {
    boot_up = true;
    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
    boot = prefs.getBoolean("start_on_boot", true);
    if (boot) {
      Intent i = new Intent(context, MainActivity.class);
      i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
      context.startActivity(i);
    }
  }
}




Java Source Code List

mohammad.adib.roundr.BootReceiver.java
mohammad.adib.roundr.Corner.java
mohammad.adib.roundr.MainActivity.java
mohammad.adib.roundr.SeekBarPreference.java
mohammad.adib.roundr.SettingsActivity.java
wei.mark.standout.StandOutWindow.java
wei.mark.standout.Utils.java
wei.mark.standout.WindowCache.java
wei.mark.standout.constants.StandOutFlags.java
wei.mark.standout.ui.TouchInfo.java
wei.mark.standout.ui.Window.java