<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    常用鏈接

    統計

    最新評論

    onNewIntent 什么時候調用

    protected void onNewIntent (Intent intent)

    Since: API Level 1

    This is called for activities that set launchMode to "singleTop" in their package, or if a client used theFLAG_ACTIVITY_SINGLE_TOP flag when calling startActivity(Intent). In either case, when the activity is re-launched while at the top of the activity stack instead of a new instance of the activity being started, onNewIntent() will be called on the existing instance with the Intent that was used to re-launch it.

    An activity will always be paused before receiving a new intent, so you can count on onResume() being called after this method.

    Note that getIntent() still returns the original Intent. You can use setIntent(Intent) to update it to this new Intent.


    在IntentActivity中重寫下列方法:onCreate onStart onRestart  onResume  onPause onStop onDestroy  onNewIntent
    一、其他應用發Intent,執行下列方法:
    I/@@@philn(12410): onCreate
    I/@@@philn(12410): onStart
    I/@@@philn(12410): onResume

    發Intent的方法:
    Uri uri = Uri.parse("philn://blog.163.com");
    Intent it = new Intent(Intent.ACTION_VIEW, uri);    
    startActivity(it);

    二、接收Intent聲明:
     <activity android:name=".IntentActivity" android:launchMode="singleTask"
                      android:label="@string/testname">
                 <intent-filter>
                    <action android:name="android.intent.action.VIEW" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
                    <data android:scheme="philn"/>
                </intent-filter>
      </activity>

    三、如果IntentActivity處于任務棧的頂端,也就是說之前打開過的Activity,現在處于
    I/@@@philn(12410): onPause
    I/@@@philn(12410): onStop 狀態的話
    其他應用再發送Intent的話,執行順序為:
    I/@@@philn(12410): onNewIntent
    I/@@@philn(12410): onRestart
    I/@@@philn(12410): onStart
    I/@@@philn(12410): onResume

    posted on 2011-02-14 11:18 九寶 閱讀(6204) 評論(1)  編輯  收藏 所屬分類: android

    評論

    # re: onNewIntent 什么時候調用 2012-02-14 10:12 tingtingyang

    寫的很清晰!支持  回復  更多評論   

    主站蜘蛛池模板: 国产成人精品日本亚洲11| 亚洲人成色7777在线观看| 亚洲香蕉免费有线视频| 国产99精品一区二区三区免费| 精品久久免费视频| 中文字幕亚洲情99在线| 精品福利一区二区三区免费视频 | 香蕉免费看一区二区三区| 免费人成在线观看视频播放| 亚洲精品成a人在线观看夫| 成年男女男精品免费视频网站| 中文字幕亚洲综合久久| 色欲A∨无码蜜臀AV免费播| 亚洲第一区香蕉_国产a| 亚在线观看免费视频入口| 亚洲av无码精品网站| 久久精品人成免费| 亚洲毛片基地日韩毛片基地| 全免费毛片在线播放| 亚洲一线产区二线产区区| 免费人妻无码不卡中文字幕18禁| 一区二区三区免费视频观看| 亚洲AV无码一区二区三区DV| 精品香蕉在线观看免费| 亚洲国产精品无码第一区二区三区 | 毛片免费在线观看网站| 亚洲AV无码一区二区三区性色 | 亚洲国产精品专区在线观看| mm1313亚洲国产精品美女| 免费无码又爽又刺激网站直播| 亚洲欧好州第一的日产suv| 免费精品久久久久久中文字幕| 亚洲中文字幕久久精品无码A| 在线看片无码永久免费aⅴ| 成人免费观看男女羞羞视频| 亚洲三区在线观看无套内射| 中文字幕免费观看| 亚洲AV无码一区二区三区鸳鸯影院| 国产亚洲精品免费视频播放| 131美女爱做免费毛片| 亚洲av乱码一区二区三区按摩|