Recent

Author Topic: How to create a Desktop Shortcut for my LAMW application ?  (Read 4981 times)

corpsman

  • New member
  • *
  • Posts: 9
    • My Delphi / Lazarus Programming site ( www.Corpsman.de )
How to create a Desktop Shortcut for my LAMW application ?
« on: October 24, 2016, 05:12:52 pm »
Hello all,

i did the http://wiki.lazarus.freepascal.org/LAMW tutorial on my WinXP virtual Machine and finally got a *.apk file that i transfered to my nexus 7 (Android 5.1) (was unable to connect the nexus into the machine, so i copy the .apk file by hand)

by opening it through Midnight Commander on the nexus 7 i could install the file and run the application *jeah*.

But there is no Icon on my dashboard or any other screen (as normally appears when i install a .apk file via the google app store).

So if i want to start my app again i have to reinstall the .apk wait until the installation process has finished to get the screen where i can run the program, this is a workaround but no practical solution.

Can anyone please help me and show how to create a shortcut link that can start the application without installation ?



[ Asked same question in german here : http://www.lazarusforum.de/viewtopic.php?f=9&t=10144 ]
--
Just try it.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How to create a Desktop Shortcut for my LAMW application ?
« Reply #1 on: October 24, 2016, 07:57:48 pm »

Hi corpsman...

try execute "build-debug.bat"  to install the apk... [project folder]

But, there are some actions you need to perform to enable your device to the development mode ..

ex. ref.

http://nexus7.wonderhowto.com/how-to/enable-developer-options-your-nexus-0158559/

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

corpsman

  • New member
  • *
  • Posts: 9
    • My Delphi / Lazarus Programming site ( www.Corpsman.de )
Re: How to create a Desktop Shortcut for my LAMW application ?
« Reply #2 on: October 24, 2016, 08:21:59 pm »
i will give it a try.

Dou you think that this will fix my "icon" issue or will it only help the installation ?
--
Just try it.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How to create a Desktop Shortcut for my LAMW application ?
« Reply #3 on: October 24, 2016, 08:41:49 pm »

Yes, the default "ic_launcher.png" in ".....\res\drawable-XXXX"

You change the image... but keep the file name....

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

corpsman

  • New member
  • *
  • Posts: 9
    • My Delphi / Lazarus Programming site ( www.Corpsman.de )
Re: How to create a Desktop Shortcut for my LAMW application ?
« Reply #4 on: October 25, 2016, 09:13:48 am »
*g*

switching to debug mode lead, that the WinXP USB driver crashes with an error and it is now unable to find the Nexus.

So i switched back, copied the .apk file, reenabled the usb debugging, installed the apk file and then i got the Desktop icon *jeah*.

Once the desktop icon is visible it stays visible when reinstalling the .apk file, so my problem is solved ;)

Thanks for that hint.

Getting me direkt to my next problems.
When i install my Hello world app, the installer asks me for several rights eg. Call telephone numbers, receive sms, gps-Sensor ..
is there a way to edit the requested list ?
The program i plan to write uses a lot of jEditText, jTextView, jButton and maybe a store and load config button. so lots of the listed features are not necessary.
--
Just try it.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How to create a Desktop Shortcut for my LAMW application ?
« Reply #5 on: October 25, 2016, 07:55:31 pm »

Quote
When i install my Hello world app, the installer asks me for several rights eg. Call telephone numbers, receive sms, gps-Sensor ..
is there a way to edit the requested list ?

Yes. Go to Lazarus IDE menu: "Project" -->  "Project Options" --> "[Lamw] Android Project Options"

Or edit the file  "AndroidManifest.xml" in your project folder.

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

corpsman

  • New member
  • *
  • Posts: 9
    • My Delphi / Lazarus Programming site ( www.Corpsman.de )
Re: How to create a Desktop Shortcut for my LAMW application ?
« Reply #6 on: October 26, 2016, 07:45:44 am »
if nobody has told you yet, your work is awesome.

Three weeks ago i didn't know what android is, now i am a "Android develepor" using my favourite IDE Lazarus ;).

Two more questions and i think i can finish my geocaching solver tool *g*.

First: is there a way to hide the "triangle circle quad" buttons on the bottom of the screen ?

Second (not really a question): when creating panels in panels and configuring them using the LayoutParam* properties e.g. to lpOneThirdOfParent
in Android Widgetset.pas Line 4580 :      lpOneThirdOfParent:     Result:= Trunc((1/3)*GetParamByParentSide(paren, side)-14);
why "-14" this is resulting that three panels ordered from top to buttom using the anchor routines have a empty space of 42 pixels below the last panel. (if margins set to 0).
--
Just try it.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: How to create a Desktop Shortcut for my LAMW application ?
« Reply #7 on: October 26, 2016, 05:50:34 pm »

Quote
First: is there a way to hide the "triangle circle quad" buttons on the bottom of the screen ?

the hide/show "triangle circle quad" is a system functionality ...

Quote
why "-14"  ....
the "magic" -14  is approximation of the height of the menu bar [action bar in android] ...
but, yes,  we need it in exact terms!

I will try fix it.

Thank you!


Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018