Recent

Author Topic: Android Module Wizard  (Read 708266 times)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #345 on: April 09, 2015, 05:56:47 pm »

@m4u_hoahoctro

You need open a common/trivial window project! Not a Lamw project!

Just curiosity: What is your main speak language? My is Portuguese!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

A.S.

  • Jr. Member
  • **
  • Posts: 76
Re: Android Module Wizard
« Reply #346 on: April 09, 2015, 06:45:56 pm »
m4u_hoahoctro, check dependencies of your project. I think, LCL becomes a part of them. If so, remove it.

rx3.fireproof

  • New Member
  • *
  • Posts: 49
Re: Android Module Wizard
« Reply #347 on: April 10, 2015, 12:17:52 am »
Hello Jmpessoa

For information.

I found a pseudo solution to my main problem.
 
I moved all the code from "AndroidModuleJNIPrompt" to "jTimerTimer" .
 
Now in "AndroidModuleJNIPrompt" only  "jtimer.enable:=true"  with "jtimer.interval:=20"

 

With Respect

rx3.fireproof



« Last Edit: April 10, 2015, 03:37:02 am by rx3.fireproof »

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #348 on: April 10, 2015, 06:47:07 am »

@m4u_hoahoctro

You need open a common/trivial window project! Not a Lamw project!

Just curiosity: What is your main speak language? My is Portuguese!

I am vietnamese  :)

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #349 on: April 10, 2015, 10:35:58 am »
I choose menu file>new>application
then I compile and install all new packages, all are ok. But I can't see anyandroidmodule from your demo folder, althought I can see all android modules from my projects.

and: I also can't receive apk file from above projects when run build-debug.bat (error message is: Panic: internal error: missing executable "" )

Did I do it amiss ?  :(
« Last Edit: April 10, 2015, 12:54:39 pm by m4u_hoahoctro »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #350 on: April 11, 2015, 02:04:19 am »
@m4u_hoahoctro

Quote
... I can't see anyandroidmodule from your demo folder

The demo folder has two folder: Ant and Eclipse..... if you choice Eclipse folder you can see: many demos applications. For example:   ....\demos\Eclipse\AppBluetoothDemo1

If you open  "jni" folder you can see the  lazarus project "controls.lpi".

Alternatively you can go to Lazaru IDE  --> "Project --> Open Project"  and go to

"...\demos\Eclipse\AppBluetoothDemo1\jni" and open the "controls.lpi"

but you need modify "controls.lpi"  in two places according to your system paths:

1.
Code: [Select]
    <SearchPaths>
      <Libraries Value="C:\adt32\ndk10\platforms\android-15\arch-arm\usr\lib\;C:\adt32\ndk10\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.6\"/>
      <UnitOutputDirectory Value="..\obj\controls"/>
    </SearchPaths>

2.
Code: [Select]
    <Other>
      <CustomOptions Value="-Xd -CfSoft -CpARMV6 -XParm-linux-androideabi- -FDC:\adt32\ndk10\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin -o..\libs\armeabi\libcontrols.so"/>
    </Other>

in fact path "C:\adt32\ndk10\" is the configuration of my system.... change it to conform with your system....

Quote
Note: But to simply learn from the example code you need only study "unit1.pas" and "unit1.lfm"
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #351 on: April 11, 2015, 04:41:02 am »
@m4u_hoahoctro

Quote
... I can't see anyandroidmodule from your demo folder

The demo folder has two folder: Ant and Eclipse..... if you choice Eclipse folder you can see: many demos applications. For example:   ....\demos\Eclipse\AppBluetoothDemo1

If you open  "jni" folder you can see the  lazarus project "controls.lpi".

Alternatively you can go to Lazaru IDE  --> "Project --> Open Project"  and go to

"...\demos\Eclipse\AppBluetoothDemo1\jni" and open the "controls.lpi"

but you need modify "controls.lpi"  in two places according to your system paths:

1.
Code: [Select]
    <SearchPaths>
      <Libraries Value="C:\adt32\ndk10\platforms\android-15\arch-arm\usr\lib\;C:\adt32\ndk10\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.6\"/>
      <UnitOutputDirectory Value="..\obj\controls"/>
    </SearchPaths>

2.
Code: [Select]
    <Other>
      <CustomOptions Value="-Xd -CfSoft -CpARMV6 -XParm-linux-androideabi- -FDC:\adt32\ndk10\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin -o..\libs\armeabi\libcontrols.so"/>
    </Other>

in fact path "C:\adt32\ndk10\" is the configuration of my system.... change it to conform with your system....

Quote
Note: But to simply learn from the example code you need only study "unit1.pas" and "unit1.lfm"

source editor window doesn't appear, and it's forms, too :(
I go to menu window> but it doesn't have Source Editor and Androidmodule option

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #352 on: April 11, 2015, 05:26:17 am »
@m4u_hoahoctro

For Lamw, You need the following packages installed in that order:

1.tfpandroidbridge_pack.lpk

2. lazandroidwizardpack.lpk

and look for  .../ide-tools

3.amw_ide_tools.lpk

and again:

Quote
HINT: to compile/install/reinstall a package in Laz4Android, please, open a "dummy"    Windows project.... you always MUST close the cross compile[Lamw] project! 
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #353 on: April 11, 2015, 06:33:25 am »
Problem is still appears. I can create new and build my project, but can't see source editor when open your demo.
as this (your demo), it doenst have source editor option

p.s:All packages were installed successfully, so I think error is different place

« Last Edit: April 11, 2015, 06:51:44 am by m4u_hoahoctro »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #354 on: April 11, 2015, 06:55:11 am »
Sorry!


Please do as follows:

Lazarus IDE menu:  "Project" --> "View Project Source"

and:

Lazarus IDE menu:  "Project" --> "Forms...."

Thank You!

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

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #355 on: April 11, 2015, 07:36:28 am »
thanks very much  :) now all worked
and I hope you will update reading sms to jsms soon  ;D

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #356 on: April 11, 2015, 08:09:10 am »
ooops
what is this window ? (open demo ActionBartab)


Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android Module Wizard
« Reply #357 on: April 11, 2015, 08:49:07 am »
ooops
what is this window ? (open demo ActionBartab)
That's what happened when you open a project relying on components whose certain published properties are removed. The fix is trivial, though. Simply open the .lfm and delete the respective propert(y|ies) line(s).

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #358 on: April 11, 2015, 12:27:06 pm »
I saw demo AppBluetooth1 and do as it:

Code: [Select]
procedure TAndroidModule1.jButton3Click(Sender: TObject);
var jimage:jobject;
  varcop:boolean;
begin
  jimage:=jimagefilemanager1.LoadFromAssets('doremon.jpg');
  jimagefilemanager1.SaveToFile(jimage,'doremon.jpg');
  varcop:=self.CopyFile(self.GetEnvironmentDirectoryPath(dirInternalAppStorage)+'/doremon.jpg',Self.GetEnvironmentDirectoryPath(dirSDCard)+'/doremon.jpg');
  if varcop then
  begin
  direnv:=TEnvDirectory.dirSdCard;
  jbluetooth1.SendFile(self.GetEnvironmentDirectoryPath(direnv),'doremon.jpg','image/jpg');
  end;
end;         

but when run on my phone (android 2.3)
the app notes: The application parents(my  project name) (process org.lazarus.parents) has stopped unexpectedly. Pease try again

and with this code: my app also auto closes (on phones use android 2.3 and 4.2.2),although bluestack can play it:

Code: [Select]
procedure TAndroidModule1.jButton2Click(Sender: TObject);
begin
 name1:=tstringlist.create;
 name1.Add(jtextfilemanager1.LoadFromAssets('name1.txt'));
 showmessage(name1.strings[0]);
end;   

« Last Edit: April 11, 2015, 05:19:08 pm by m4u_hoahoctro »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #359 on: April 11, 2015, 07:01:57 pm »
@m4u_hoahoctro

1.

Quote
ooops
what is this window ? (open demo ActionBartab)

If you prefer you can just choice "Continue Loading" .... but then you will need simulate any property change [ex tag=3] and SAVE to fix the error....

2. some attempts: 
2.1 try 'image/*'   or    'image/jpeg' 
2.2 try copy to  others [public!] folder [ex. /Downloads]

3. some attempt:  showmessage(name1.text);
just hint: you nedd too "name1.Free;"
« Last Edit: April 11, 2015, 09:33:12 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018