<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 九寶 閱讀(6205) 評論(1)  編輯  收藏 所屬分類: android

    評論

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

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

    主站蜘蛛池模板: 美女裸体无遮挡免费视频网站| 亚洲丰满熟女一区二区v| 在线观看亚洲专区| 成人毛片免费播放| 中文无码亚洲精品字幕| 免费涩涩在线视频网| 亚洲欧美自偷自拍另类视| 日本一道高清不卡免费| 精品韩国亚洲av无码不卡区| 波多野结衣一区二区免费视频| 国产精品亚洲二区在线| 亚洲色婷婷综合开心网| 中国videos性高清免费| 久久精品亚洲日本佐佐木明希| 日韩人妻一区二区三区免费| 亚洲综合综合在线| 成人激情免费视频| 激情吃奶吻胸免费视频xxxx| 奇米影视亚洲春色| 永久黄色免费网站| 亚洲综合精品第一页| 无码不卡亚洲成?人片| 182tv免费视频在线观看| 亚洲神级电影国语版| 精品国产免费观看一区| 免费一级毛suv好看的国产网站| 亚洲人色婷婷成人网站在线观看| 久久久久免费看黄a级试看| 亚洲av乱码一区二区三区| 国产真实伦在线视频免费观看| 一区二区三区免费看| 亚洲视频免费观看| 国产伦一区二区三区免费 | 国产av无码专区亚洲av果冻传媒| 国产午夜精品理论片免费观看| 亚洲高清免费在线观看| 国产免费131美女视频| 一级毛片免费观看| jizzjizz亚洲日本少妇| 亚洲AV日韩AV鸥美在线观看| 免费观看男人免费桶女人视频 |