Recent

Author Topic: Android Module Wizard  (Read 705474 times)

Robert Gilland

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #1215 on: April 13, 2020, 01:25:32 am »
Thank you got through that hurdle.

Now I am trying to  use demo "appmenudemo2" on an API 17 device using latest GIT version of LAMW and I get the following:

E/AndroidRuntime(25858): FATAL EXCEPTION: main

E/AndroidRuntime(25858): java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to com.android.internal.view.menu.ActionMenuView$LayoutParams

Kind Regards,

Robert Gilland.

Robert Gilland

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #1216 on: June 06, 2020, 11:57:43 pm »
Okay, I think I know the reason why I am getting these java class not found errors.

It is my lack of knowledge as how the java class repository is built up for the application.
I think it looks in all files that are in the".lpr" file or it could be as you add objects to form in the application.
Not sure.

But somehow the object was not in the java libraries for the application.

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Android Module Wizard
« Reply #1217 on: July 07, 2020, 01:04:17 pm »
Hello!
Tell me, please, is it possible to debug an Android application created using LAMV on a real device and how to do it.

Guser979

  • New Member
  • *
  • Posts: 40
Re: Android Module Wizard
« Reply #1218 on: July 07, 2020, 02:48:58 pm »
Hello!
Tell me, please, is it possible to debug an Android application created using LAMV on a real device and how to do it.


Good question. Sometimes I get lost at some point in a project because failures occur during execution on the device. I only started with LAMW a few days ago. I'm exploring Android Studio and LAMW. It is a fantastic work done by the authors of LAWM. I believe that with some effort I can do what I need.

HotShoe

  • New member
  • *
  • Posts: 8
Re: Android Module Wizard
« Reply #1219 on: July 20, 2020, 10:25:07 pm »
I have run into an oddity while using LAMW. I created a new LAMW GUI project and used a Jpanel and several jbitbuttons to re-create a dialer app that I wrote years ago. This is just to compare the 2 and see if there are any surprises.

Anyway. I saved my main unit as Main.pas as I always do, and I renamed the form to Mainfrm as I always do. Everything seemed fine until I had to shut everything down for a meeting. I saved everything and closed Lazarus.

When I came back, I could not load the project again. I get a Property "Caption" not found. I can still load the demo projects without a problem, so I created a new project again and placed the same components on the Jform again. This time I did not rename the main form, I lseft it a AndroidModule1, and I can close the ide , re-open it and it loads the project just fine.

I can't find any differences between the 2 projects that I created except the name of the main form, so I suspect this is not supported, or the renaming makes the project look like it is a standard Tform again? Jforms do not have a caption property, but do have a Text property. It's just a guess but something that will force me to change my normal naming practices.

I should add that I am using Lazarus 2.0.10 and FPC 3.2.0, the latest LAMW and the Arm and Aarch64 cross compilers.

Thanks,
--- Jem
« Last Edit: July 20, 2020, 10:48:51 pm by HotShoe »

ketch

  • New member
  • *
  • Posts: 8
Re: Android Module Wizard
« Reply #1220 on: July 27, 2020, 08:36:03 pm »
Hi guys,

for the past two weeks, i have been trying to implement admob Rewarded Ads starting with the good admob demo in LAMW.

Google documentation can be found here: https://developers.google.com/admob/android/rewarded-ads

I'm not a Java expert and modifying LAMW is an hard work. I've tried a lot of things but don't really know how to do this.

Please could you implement this for LAMW, that would be great.

Thanks.

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Android Module Wizard
« Reply #1221 on: August 24, 2020, 04:58:08 pm »
Dear friends!
Sorry for my English (translating with the help of Google translator).
http://Https://github.com/jmpessoa/lazandroidmodulewizard/issues/165 talked about BluetoothSPP. Recent versions of LAMW even have a jcBluetoothSPP component, but I can't figure it out. I have a big request, post an example using this component.

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Android Module Wizard
« Reply #1222 on: August 24, 2020, 07:02:17 pm »
Sorry.
The latest version of lazandroidmodulewizard posted this month at https://github.com/jmpessoa/lazandroidmodulewizard has an example AppJCenterBluetoothSPPDemo1.
Thanks to the developers!

Guser979

  • New Member
  • *
  • Posts: 40
Re: Android Module Wizard
« Reply #1223 on: September 04, 2020, 12:12:48 am »
an observation ... jcustomcamera has memory leak and Inevitable crash after certain time saving photos ... As I have to activate jcustomcam many times in my app, so I had to investigate. I don't know Java, but researching it, I discovered that it was a memory leak. After testing, I solved the problem with a line of code in jcustomcamera.java ....... bitmap.recycle (); added in private void saveBitmapToJpg (Bitmap bitmap, String bmpPath) ....exactly after outStream.close () ;. My app had no more problems. I hope I helped this fantastic work.
« Last Edit: September 04, 2020, 12:27:29 am by Guser979 »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Android Module Wizard
« Reply #1224 on: September 04, 2020, 03:22:10 am »

@Guser979

Fixed!

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

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Android Module Wizard
« Reply #1225 on: October 30, 2020, 07:13:42 pm »
NEWS!

Version 0.8.6 [AndroidX]

LAMW Migrate Material Theme/AppCompat to AndroidX [by @ADiV]

Requires SDK 28 or higher
and
Gradle 6.6.1
 
(downloaded from: https://gradle.org/releases/)

Thanks to  @ADiV!!
« Last Edit: October 30, 2020, 10:19:13 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

rsu333

  • Full Member
  • ***
  • Posts: 110
Re: Android Module Wizard
« Reply #1226 on: December 01, 2020, 03:33:10 pm »
i am trying external file permission in Action Tab module but not success also adding Actionbar tab in share file modul but got error .
How can I use external storage permission  keeping actionbar tab [use of three panels].
exact which code is useful and where it to keep.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Android Module Wizard
« Reply #1227 on: December 01, 2020, 08:04:04 pm »

Quote
How can I use external storage permission...

You can see the code in demo "AppCameraDemo"  and others demos.....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Android Module Wizard
« Reply #1228 on: June 28, 2021, 05:18:07 am »
Hello All!

LAMW Ide-Tools:  NEW!  "Export LAMW Project as Template/Theme..."

Now you can use an entire project as a starting point for your nice new app....

Warning: Make sure that the project you want to use as template works perfectly.
Warning: Project Options/SearchPaths  -Fu  will not be exported!
Warning: secondary gApp.CreateForm in  ".lpr"  will not be exported** !

The Project Exported will be saved as LAMW template/theme in the Folder:

''....\android_wizard\smartdesigner\AppTemplates"

and can be selected in the next [LAMW] "New Project" as Theme!

Have Fun!

** hint: If need, put all secondary gApp.CreateForm in [main form] "OnActivityCreate" event.
« Last Edit: June 29, 2021, 05:18:34 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: Android Module Wizard
« Reply #1229 on: June 28, 2021, 06:44:54 am »
 :), Thank you, saving a lot of time creating same theme.

 

TinyPortal © 2005-2018