What is an Android PendingIntent ?
What is an Android PendingIntent ?
A PendingIntent is a token that you give to a foreign application (e.g. NotificationManager, AlarmManager, Home Screen AppWidgetManager, etc.), which allows the foreign application to use your application's permissions to execute a predefined piece of code[1][2].
If you give the foreign application a regular Intent, it will execute your Intent with its own permissions. But if you give the foreign application a PendingIntent, that application will execute your Intent using your application's permissions[2].
Some key points about PendingIntents:
PendingIntent.getActivity()
, PendingIntent.getService()
, etc.[1][3]middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào