コード例 #1
0
 @Override
 protected void onNewIntent(Intent intent) {
   // TODO Auto-generated method stub
   super.onNewIntent(intent);
   // after detecting tag..
   ScanTag(intent);
 }
コード例 #2
0
 @Override
 protected void onNewIntent(Intent intent) {
   if (intent.getAction() == null) {
     intent.setAction(Constants.ACTION_START_APP);
   }
   setIntent(intent);
   handleIntents();
   Ln.d("onNewIntent");
   super.onNewIntent(intent);
 }
コード例 #3
0
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   Timber.d("%s, onNewIntent intent=%s", this, intent);
   if ((Intent.FLAG_ACTIVITY_CLEAR_TOP & intent.getFlags()) != 0) {
     KApplicationImpl.getInstance().closeDb();
     Timber.d("%s, 结束APP... onNewIntent intent=%s", this, intent);
     finish();
   } else {
     Timber.d("%s, 退出帐号... onNewIntent intent=%s", this, intent);
     toHomePage();
   }
 }
コード例 #4
0
  @Override
  protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);

    setIntent(intent);

    String tag = null;
    Fragment fragment = null;

    if (intent.getExtras() != null && intent.getExtras().containsKey(RongConst.EXTRA.CONTENT)) {
      String fragmentName = intent.getExtras().getString(RongConst.EXTRA.CONTENT);
      fragment = Fragment.instantiate(this, fragmentName);
    } else if (intent.getData() != null) {

      if (intent.getData().getPathSegments().get(0).equals("conversation")) {
        tag = "conversation";
        fragment = getSupportFragmentManager().findFragmentByTag(tag);
        if (fragment != null) return;
        String fragmentName = ConversationFragment.class.getCanonicalName();
        fragment = Fragment.instantiate(this, fragmentName);

        showRealTimeLocationBar(null); // RealTimeLocation

      } else if (intent.getData().getLastPathSegment().equals("conversationlist")) {
        tag = "conversationlist";
        String fragmentName = ConversationListFragment.class.getCanonicalName();
        fragment = Fragment.instantiate(this, fragmentName);
      } else if (intent.getData().getLastPathSegment().equals("subconversationlist")) {
        tag = "subconversationlist";
        String fragmentName = SubConversationListFragment.class.getCanonicalName();
        fragment = Fragment.instantiate(this, fragmentName);
        SubConversationListFragment sub = (SubConversationListFragment) fragment;
        sub.setAdapter(new SubConversationListAdapterEx(RongContext.getInstance()));
      }
    }

    if (fragment != null) {
      FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
      transaction.replace(R.id.de_content, fragment, tag);
      transaction.addToBackStack(null).commitAllowingStateLoss();
    }
  }
コード例 #5
0
ファイル: MainActivity.java プロジェクト: dai1993/LichVanNien
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
 }
コード例 #6
0
 @Override
 public void onNewIntent(Intent intent) {
   Log.i(TAG, "onNewIntent");
   super.onNewIntent(intent);
 }