当前位置: 首页>>代码示例>>Java>>正文


Java Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY属性代码示例

本文整理汇总了Java中android.content.Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY属性的典型用法代码示例。如果您正苦于以下问题:Java Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY属性的具体用法?Java Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY怎么用?Java Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.content.Intent的用法示例。


在下文中一共展示了Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleAppDeepLink

/**
 * Method to handle deeplink parameters received via intent
 */
private void handleAppDeepLink() {
    appDeepLink = new AppDeepLink(DeepLinkUtil.DEFAULT);

    // Extract deeplink params from the received intent
    Intent intent = getIntent();
    if (intent != null && !HTTextUtils.isEmpty(intent.getDataString())) {
        Log.d(TAG, "deeplink " + intent.getDataString());
        int flags = intent.getFlags();
        if ((flags & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
            return;
        }
        appDeepLink = DeepLinkUtil.prepareAppDeepLink(this, intent.getData());
    }
}
 
开发者ID:hypertrack,项目名称:hypertrack-live-android,代码行数:17,代码来源:SplashScreen.java

示例2: resolveIntent

private void resolveIntent(Intent data) {
    this.setIntent(data);

    if ((data.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
        return;
    }

    if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(data.getAction())) {
        mLastNfcTag = data.getParcelableExtra(NfcAdapter.EXTRA_TAG);
        long now = new Date().getTime();

        if (mContinuousSensorReadingFlag) {
            startContinuousSensorReadingTimer();

        } else if (now - mLastScanTime > 5000) {
            DataPlotFragment dataPlotFragment = (DataPlotFragment)
                    mSectionsPagerAdapter.getRegisteredFragment(R.integer.viewpager_page_show_scan);
            if (dataPlotFragment != null) {
                dataPlotFragment.clearScanData();
            }

            new NfcVReaderTask(this).execute(mLastNfcTag);
        }
    }
}
 
开发者ID:DorianScholz,项目名称:OpenLibre,代码行数:25,代码来源:MainActivity.java

示例3: handleIntent

/**
 * Handle this incoming intent (via onCreate()) and create a new session if required.
 */
public void handleIntent(final Context context, final SafeIntent intent, final Bundle savedInstanceState) {
    if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
        // This Intent was launched from history (recent apps). Android will redeliver the
        // original Intent (which might be a VIEW intent). However if there's no active browsing
        // session then we do not want to re-process the Intent and potentially re-open a website
        // from a session that the user already "erased".
        return;
    }

    if (savedInstanceState != null) {
        // We are restoring a previous session - No need to handle this Intent.
        return;
    }

    createSessionFromIntent(context, intent);
}
 
开发者ID:mozilla-mobile,项目名称:firefox-tv,代码行数:19,代码来源:SessionManager.java

示例4: onResume

@Override
public void onResume() {
	super.onResume();

	// Must disconnectAll before setting closeOnDisconnectAll to know whether to keep the
	// activity open after disconnecting.
	if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == 0 &&
			DISCONNECT_ACTION.equals(getIntent().getAction())) {
		Log.d(TAG, "Got disconnect all request");
		disconnectAll();
	}

	// Still close on disconnect if waiting for a disconnect.
	closeOnDisconnectAll = waitingForDisconnectAll && closeOnDisconnectAll;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:HostListActivity.java

示例5: preInflationStartup

@Override
public void preInflationStartup() {
    super.preInflationStartup();

    // Decide whether to record startup UMA histograms. This is done  early in the main
    // Activity.onCreate() to avoid recording navigation delays when they require user input to
    // proceed. For example, FRE (First Run Experience) happens before the activity is created,
    // and triggers initialization of the native library. At the moment it seems safe to assume
    // that uninitialized native library is an indication of an application start that is
    // followed by navigation immediately without user input.
    if (!LibraryLoader.isInitialized()) {
        UmaUtils.setRunningApplicationStart(true);
    }

    CommandLine commandLine = CommandLine.getInstance();
    if (commandLine.hasSwitch(ContentSwitches.ENABLE_TEST_INTENTS)
            && getIntent() != null
            && getIntent().hasExtra(
                    ChromeTabbedActivity.INTENT_EXTRA_TEST_RENDER_PROCESS_LIMIT)) {
        int value = getIntent().getIntExtra(
                ChromeTabbedActivity.INTENT_EXTRA_TEST_RENDER_PROCESS_LIMIT, -1);
        if (value != -1) {
            String[] args = new String[1];
            args[0] = "--" + ContentSwitches.RENDER_PROCESS_LIMIT
                    + "=" + Integer.toString(value);
            commandLine.appendSwitchesAndArguments(args);
        }
    }

    supportRequestWindowFeature(Window.FEATURE_ACTION_MODE_OVERLAY);

    // We are starting from history with a URL after data has been cleared. On Samsung this
    // can happen after user clears data and clicks on a recents item on pre-L devices.
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP
            && getIntent().getData() != null
            && (getIntent().getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0
            && OmahaClient.isFreshInstallOrDataHasBeenCleared(getApplicationContext())) {
        getIntent().setData(null);
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:40,代码来源:ChromeTabbedActivity.java

示例6: recycledIntent

private boolean recycledIntent() { // TODO this is a kludge, find real solution

        int flags = getIntent().getFlags();
        if ((flags & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) {
            Log.i(TAG, "Launched from history, killing recycled intent");
            setIntent(new Intent());
            return true;
        }
        return false;
    }
 
开发者ID:theGreatWhiteShark,项目名称:mensacard-hack,代码行数:10,代码来源:NfcPlugin.java


注:本文中的android.content.Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。