10
任何人都可以請說出如何使用待定意圖啓動新活動,還可以使用未決意圖傳遞值。 在此先感謝。如何使用待定意圖啓動新活動
任何人都可以請說出如何使用待定意圖啓動新活動,還可以使用未決意圖傳遞值。 在此先感謝。如何使用待定意圖啓動新活動
Intent intent = new Intent(getApplicationContext(), ActivityToLaunch.class);
intent.putExtra(<oneOfThePutExtraFunctions>);
PendingIntent pi = PendingIntent.getActivity(this, 0, intent, 0);
您可以通過使用各種Intent.PutExtra的一個()位於函數添加額外的數據到一個意圖:http://developer.android.com/reference/android/content/Intent.html
然後,當您準備啓動你的PendingIntent,使用Send之一()功能位於:http://developer.android.com/reference/android/app/PendingIntent.html