This file contains hidden or 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 *** |
This file contains hidden or 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 | |
System.SysUtils, System.DateUtils, System.StrUtils; | |
// examples: | |
// Wed, 3 Nov 2021 18:20:21 +1030 | |
// 21 Dec 2021 19:04:06 GMT | |
function FeedDateToDateTime(const AFeedDate: string): TDateTime; | |
var | |
LParts: TArray<string>; | |
LISO8601, LDay, LMonth: string; |
This file contains hidden or 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
// Original demo is at: | |
// https://github.com/Embarcadero/RADStudio11Demos/tree/main/Object%20Pascal/Mobile%20Snippets/Notifications/SendCancelNotification | |
// Code to add to the implementation section. Use code completion to add it to the interface section: | |
const | |
cNotificationChannelId = 'NotificationsDemo'; | |
constructor TNotificationsForm.Create(AOwner: TComponent); | |
begin |
This file contains hidden or 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
unit DW.Multipeer.Mac; | |
interface | |
uses | |
System.TypInfo, | |
Macapi.ObjectiveC, | |
{$IF Defined(IOS)} | |
iOSapi.Foundation, | |
DW.iOSapi.Foundation, |
This file contains hidden or 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
// Inspired by: | |
// https://en.delphipraxis.net/topic/7258-printer-ip/?do=findComment&comment=61498 | |
// | |
// Implemented in the simplest way I could think of that is also practical | |
// Note: This was thrown together in a few minutes, so please take care. Saving it as a Gist for posterity | |
uses | |
System.Net.HttpClient, System.JSON; | |
const |
This file contains hidden or 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.PlayServices.Maps; | |
procedure TForm1.FormCreate(Sender: TObject); | |
var | |
LMap: JGoogleMap; | |
begin | |
if Supports(MapView1, JGoogleMap, LMap) then | |
LMap.getUiSettings.setMapToolbarEnabled(False); | |
end; |
This file contains hidden or 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
unit Unit1; | |
// Form just has a button and a label on it | |
interface | |
uses | |
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | |
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, | |
System.TypInfo, |
This file contains hidden or 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
unit Codex.Wizard.Android.CreateJarProcess; | |
interface | |
uses | |
System.Classes, | |
DW.RunProcess.Win; | |
type | |
TJarProcessStep = (None, BuildJava, BuildJar, DexJar); |
This file contains hidden or 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
unit Codex.Wizard.Android.Java2OPProcess; | |
interface | |
uses | |
System.Classes, | |
DW.RunProcess.Win; | |
type | |
TPostProcessState = (None, UnitStart, ForwardDeclarations, ClassDeclaration, InstanceDeclaration, ImplementationSection, IgnoreDeclaration, UnitEnd); |
This file contains hidden or 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.JNIBridge, Androidapi.JNI.JavaTypes, Androidapi.Helpers; | |
type | |
Jutil_LogClass = interface(JObjectClass) | |
['{62108FE8-1DBB-4C4F-A0C7-35D12BD116DC}'] | |
{class} function _GetASSERT: Integer; cdecl; | |
{class} function _GetDEBUG: Integer; cdecl; | |
{class} function _GetERROR: Integer; cdecl; | |
{class} function _GetINFO: Integer; cdecl; |