Mat*_*hew 18 android android-intent android-pendingintent
任何人都可以说如何使用待定意图启动新活动,并使用待定意图传递值.提前致谢.
小智 27
Intent intent = new Intent(getApplicationContext(), ActivityToLaunch.class);
intent.putExtra(<oneOfThePutExtraFunctions>);
PendingIntent pi = PendingIntent.getActivity(this, 0, intent, 0);
Run Code Online (Sandbox Code Playgroud)
您可以使用以下各种Intent.PutExtra()函数之一将额外数据添加到Intent中:http://developer.android.com/reference/android/content/Intent.html
然后,当您准备好启动PendingIntent时,请使用位于以下位置的Send()函数之一:http://developer.android.com/reference/android/app/PendingIntent.html
| 归档时间: |
|
| 查看次数: |
19494 次 |
| 最近记录: |