示例#1
1
  // 인텐트 받아왔을 때.. 근데 이거 있으면 onStart 호출 불가
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    setIntent(intent);

    //        if (intent.hasExtra("bm")) {
    //            Log.d("MainActivity : ", "bm is not null");
    //
    //            bm = intent.getParcelableExtra("bm");
    //            adapterViewPager.setImageView(bm);
    //
    //        } else {
    //            Log.d("MainActivity : ", "bm is null");
    //        }

    if (intent.hasExtra("card")) {
      adapterViewPager.setCardItem((Card) intent.getParcelableExtra("card"));
    }

    if (intent.hasExtra("keyword")) {
      keyword = intent.getStringArrayListExtra("keyword");
      Log.d("In mainActivity : ", keyword.get(0));
      Log.d("In mainActivity : ", keyword.get(1));
      Log.d("In mainActivity : ", keyword.get(2));
      Log.d("In mainActivity : ", keyword.get(3));
      Log.d("In mainActivity : ", keyword.get(4));

      //            FirstFragment fragment = new FirstFragment();
      //            Bundle bundle = new Bundle();
      //            bundle.putStringArrayList("keyword", keyword);
      //            fragment.setArguments(bundle);

      adapterViewPager.getFirstFragment().getkeyword(keyword);
    }
  }
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   if (nfcAdapter != null && nfcAdapter.isEnabled()) {
     nfcAsyncTask = new NfcAsyncTask(intent);
   }
 }
示例#3
0
  @Override
  protected void onNewIntent(Intent intent) {

    super.onNewIntent(intent);

    if (intent.getAction() == "android.intent.action.SEARCH") {

      showSearch(false); // Suchfeld schliessen

      // Suchbegriff speichern in der Vorschlagsliste
      Bundle extras = intent.getExtras();
      String userQuery = String.valueOf(extras.get(SearchManager.USER_QUERY));
      String query = String.valueOf(extras.get(SearchManager.QUERY));
      suggestions.saveRecentQuery(query, "in Kontakten");

      // Toast.makeText(this, "query: " + query + " user_query: " + userQuery,
      // Toast.LENGTH_SHORT).show(); // TEST Meldung

      Bundle args = new Bundle(); // Uebergabe-Parameter für Fragment erstellen
      args.putString("search", query);
      getSupportActionBar().setSubtitle("Suche  '" + query + "'");

      showFragment("list", args); // Fragment OrdersList anzeigen
    }
  }
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   Uri uri = intent.getData();
   if (uri != null && uri.toString().startsWith("callback://com.yassirh.digitalocean")) {
     tokenEditText.setText(uri.getQueryParameter("code"));
     accountNameEditText.setText(uri.getQueryParameter("account_name"));
   }
 }
示例#5
0
  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    String message = intent.getStringExtra("message");

    Message m = new Message(message, System.currentTimeMillis());
    listMessages.add(0, m);
    adapter.notifyDataSetChanged();
  }
示例#6
0
  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);

    // Clear app notifications
    AppNotifications.clearAll(this);

    // RTL action bar hack
    RTLSupport.mirrorActionBar(this);
  }
示例#7
0
  // used to intercept the social media oauth callbacks
  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    // getIntent() should always return the most recent
    setIntent(intent);

    // check contents of intent
    if (getIntent().getData() != null && getIntent().getData().getScheme() != null) {
      Log.d("catch", "this");
      if (getIntent().getData().getScheme().contentEquals(getString(R.string.facebook_app_id))) {}
    }
  }
示例#8
0
  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    handleSearchOrAppViewIntent(intent);

    // This is called here as well as onResume(), because onNewIntent() is not called the first
    // time the activity is created. An alternative option to make sure that the add repo intent
    // is always handled is to call setIntent(intent) here. However, after this good read:
    // http://stackoverflow.com/a/7749347 it seems that adding a repo is not really more
    // important than the original intent which caused the activity to start (even though it
    // could technically have been an add repo intent itself).
    // The end result is that this method will be called twice for one add repo intent. Once
    // here and once in onResume(). However, the method deals with this by ensuring it only
    // handles the same intent once.
    checkForAddRepoIntent(intent);
  }
示例#9
0
  @Override
  protected void onNewIntent(Intent intent) { // ถ้ามี nfc มาแตะ

    super.onNewIntent(intent);

    if (intent.hasExtra(NfcAdapter.EXTRA_TAG)) {
      Toast.makeText(this, "NfcIntent!", Toast.LENGTH_SHORT).show();

      Parcelable[] parcelables = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);

      if (parcelables != null && parcelables.length > 0) {
        readTextFromMessage((NdefMessage) parcelables[0]);
      } else {
        Toast.makeText(this, "No NDEF messages found2!", Toast.LENGTH_SHORT).show();
      }
    }
  }
示例#10
0
  @Override
  protected void onNewIntent(Intent intent) {
    final Intent inte = intent;
    Toast.makeText(
            this,
            ByteArrayToHexString(intent.getByteArrayExtra(NfcAdapter.EXTRA_ID)),
            Toast.LENGTH_LONG)
        .show();
    new Thread(
            new Runnable() {
              @Override
              public void run() {
                new ServerCommunicator()
                    .aankoop(ByteArrayToHexString(inte.getByteArrayExtra(NfcAdapter.EXTRA_ID)));
              }
            })
        .start();

    super.onNewIntent(intent);
  }
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   handleIntent(intent);
 }
 @Override
 protected void onNewIntent(Intent intent) {
   log.d("onNewIntent");
   super.onNewIntent(intent);
   init_page(intent);
 }
示例#13
0
  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);

    Log.d(TAG, "onNewIntent: " + this);
  }
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   Log.i(TAG, "OnNewIntent: " + intent.getData());
   handleSocialResult(intent);
 }
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   droid4mizer.onNewIntent(intent);
 }
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   checkIntent(intent);
 }
示例#17
0
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   ReminderNotificationStartHelper.handleIfStartedFromReminderNotifcation(this, intent);
 }
示例#18
0
 @Override
 public void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
 }