コード例 #1
0
  public void onCreate() {
    super.onCreate();
    this.continueScanning = true;

    positioning = new Positioning(this, WALKBASE_API_KEY);
    verificationReceiver = new VerificationReceiver();
    this.registerReceiver(
        verificationReceiver, new IntentFilter(positioning.getPositioningIntentString()));
    SharedPreferences preferences = getSharedPreferences("preference", Activity.MODE_PRIVATE);
    FACEBOOK_ID = preferences.getString("facebook_id", "");
    PECORIN_TOKEN = preferences.getString("pecorin_token", "");
  }
コード例 #2
0
 public void onDestroy() {
   continueScanning = false;
   positioning.finish();
   this.unregisterReceiver(verificationReceiver);
   super.onDestroy();
 }