Android 開發中如何實現intent 的key和value進行打印輸出

Android 開發中如何實現intent 的key和value進行打印輸出。

註意:如果intent取的類型不對則很可能取出的數值為0或者null

        Bundle bundle = intent.getExtras();
        for (String key: bundle.keySet())
        {
            Log.i("Bundle Content", "Key=" + key + ", content=" +bundle.getString(key));
        }

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *