Created
October 16, 2021 00:46
-
-
Save DelphiWorlds/1a7534be4f765ab2acd4d780c5b54550 to your computer and use it in GitHub Desktop.
How to put a PendingIntent into an ArrayList
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses | |
Androidapi.JNI.JavaTypes, Androidapi.JNI.App, Androidapi.JNI.GraphicsContentViewText, Androidapi.Helpers; | |
var | |
LArrayList: JArrayList; | |
LIntent: JIntent; | |
LPendingIntent: JPendingIntent | |
begin | |
LIntent := TJIntent.Create; | |
// *** Here, call setAction and whatever else needs to be done to initialize LIntent *** | |
LPendingIntent := TJPendingIntent.JavaClass.getBroadcast(TAndroidHelper.Context, 0, LIntent, 0); | |
LArrayList := TJArrayList.Create; | |
LArrayList.add(LPendingIntent); | |
// Now you can pass LArrayList to a method that takes one as a parameter | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment