Kastri icon indicating copy to clipboard operation
Kastri copied to clipboard

[StartAtBoot] Allow changes to the startup notification message

Open DelphiWorlds opened this issue 3 years ago • 7 comments

As per title. Needs changes to the broadcast receiver to read from shared preferences or metadata

DelphiWorlds avatar Dec 29 '21 19:12 DelphiWorlds

Thanks

kabiri avatar Dec 30 '21 07:12 kabiri

Has this problem been fixed? How to use it?

kabiri avatar Apr 21 '22 16:04 kabiri

The change is yet to be included. Thanks for the reminder

DelphiWorlds avatar Apr 21 '22 20:04 DelphiWorlds

Hi! I'm creating an application in Delphi, for android, and I would like to know how I make it start with the boot (StartAtBoot). I looked at the Kastri Demo, but I couldn't see the modification you guys made, where you made it, to work on boot. Do you have a video/tutorial?

DiamatBR avatar Jun 29 '22 18:06 DiamatBR

The change is achieved by the use of the manifestmerge tool. In the Project Options of the demo, look at the Build Events:

image

This is the file that gets merged into the manifest:

https://github.com/DelphiWorlds/Kastri/blob/master/Demos/AndroidStartAtBoot/AndroidManifest.merge.xml

DelphiWorlds avatar Jun 29 '22 22:06 DelphiWorlds

Which of these options do I choose? image

DiamatBR avatar Jun 30 '22 21:06 DiamatBR

You don't choose any of those options. The command just needs to be present, as per the image I posted.

In the demo, the Tools folder is two levels up, which is why the path is: ..\..\Tools\manifestmerge for the command. The AndroidManifest.merge.xml file is in the same folder as the demo, and the target $(Platform)\$(Config)\AndroidManifest.xml is what is generated by Delphi

DelphiWorlds avatar Jun 30 '22 21:06 DelphiWorlds

I tried to test this project (Delphi 11.2) on an android 12 device. And unfortunately it doesn't work. At the same time, the example compiled in Delphi 10.4 works on this device. What's the matter here?

alextim400 avatar Jan 26 '23 14:01 alextim400

The phrase "it doesn't work" on its own is meaningless. Are there any error messages? If so, what are they? What is the actual result, versus what was expected?

DelphiWorlds avatar Jan 26 '23 18:01 DelphiWorlds

Although my comment above still applies, I have discovered issues that I have now pushed changes for - the AndroidManifest.merge.xml and dw-kastri-base-2.0.0.jar files have been updated

DelphiWorlds avatar Jan 26 '23 19:01 DelphiWorlds

The phrase "it doesn't work" on its own is meaningless. Are there any error messages? If so, what are they? What is the actual result, versus what was expected?

After turning it off and on again, the program does not start. I'll check your changes and let you know.

alextim400 avatar Jan 26 '23 19:01 alextim400

Many thanks. With updated dw-kastri-base-2.0.0.jar it worked. I fixed the AndroidManifest.merge.xml file even earlier.

alextim400 avatar Jan 26 '23 19:01 alextim400

Great!

DelphiWorlds avatar Jan 26 '23 19:01 DelphiWorlds