Recent

Author Topic: Android Module Wizard  (Read 708075 times)

truetom

  • Jr. Member
  • **
  • Posts: 73
    • http://sourceforge.net/projects/laz4android/
Re: Android Module Wizard
« Reply #675 on: October 17, 2015, 04:25:56 pm »
@jmpessoa

Hello jmpessoa,

I have found this problem,and fixed this problem.
When the error is show , I found in the file "JNIAndroidProject.ini / AndroidPlatform=-1" , then I change it to 0 ,this error not show.
You are right , it's in the file "uformworkspace.pas" , read the "FAndroidPlatform" is not validity, I change ListBoxPlatform.ItemIndex:=0 to fixed this problem.

Thanks and best regards!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

A.S.

  • Jr. Member
  • **
  • Posts: 76
Re: Android Module Wizard
« Reply #676 on: October 17, 2015, 04:29:55 pm »
truetom, Check the last changes, please.

truetom

  • Jr. Member
  • **
  • Posts: 73
    • http://sourceforge.net/projects/laz4android/
Re: Android Module Wizard
« Reply #677 on: October 17, 2015, 05:05:27 pm »
truetom, Check the last changes, please.

Hello A.S.
Now it's works ok!

Thanks and best regards!
laz4android : a Lazarus for Android Package.
http://sourceforge.net/projects/laz4android/

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #678 on: October 26, 2015, 07:24:16 pm »
Hello All!

NEW!!

Added [initial]  "Android Themes" support!

ref. https://github.com/jmpessoa/lazandroidmodulewizard

Thanks to All!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

arezmr

  • Newbie
  • Posts: 2
Re: Android Module Wizard
« Reply #679 on: October 27, 2015, 05:07:33 am »
i have problem installing apk on handset.
Apk build succesfully but apk cant install on handset, whats the prblm

position :
- lazarus 1.4.4 with Fpc 3.1.1 put from laz4android bundle (replaced 2.4.6 )
- android-ndk-r10c
- jdk1.8.0_25
- apache-ant-1.9.6
- SDK 23.0.1

 project option
- NDK platform  : 16
- MinSDKApI  : 17
- TargetSDKApI : 17


other problem when i'm using laz4android bundle (lazarus 5), i cant install androidbridge and android wizard. here the message :
Panic: make: Entering directory `C:/Program Files/laz4android'
Panic: make: Leaving directory `C:/Program Files/laz4android'

thanks for help.
« Last Edit: October 27, 2015, 05:50:53 am by arezmr »

renabor

  • Jr. Member
  • **
  • Posts: 73
Re: Android Module Wizard
« Reply #680 on: October 27, 2015, 01:27:39 pm »
Hello All!

NEW!!

Added [initial]  "Android Themes" support!

ref. https://github.com/jmpessoa/lazandroidmodulewizard

Thanks to All!

Great job!

Thank you!

FPC 3.2.2 | Lazarus 2.2.3 | Kubuntu 22.04 64bit

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #681 on: October 27, 2015, 05:02:19 pm »

Hello arezmr!

1.

Quote
android-ndk-r10c

The updated laz4android is for "android-ndk-r10e"  <<--- "e"

2.
Quote
C:/Program Files/laz4android'

Your laz4android  install path has "space" .... try "C:/laz4android"

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

arezmr

  • Newbie
  • Posts: 2
Re: Android Module Wizard
« Reply #682 on: October 28, 2015, 12:07:35 pm »
Hei jmpessoa
its really working now, its great!!
thanks for helping.  :)

having prblm  again :D

1. building apk for the first compile always error with this msg :
C:\Android SDK\tools\ant\build.xml:716: The following error occurred while executing this line:
but for the second compiling  and next compiling succesfully and working install to the handset

2. screen rosolution too  small. how to fit componnt with 720 x 1280 pixels or streching with all size screen?
« Last Edit: October 28, 2015, 12:14:22 pm by arezmr »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #683 on: October 28, 2015, 03:29:21 pm »

Hello arezmr!

1. and 2.

Please, zip and send me your test project..... [put it in some open drive]


Quote
screen rosolution too  small. how to fit componnt with 720 x 1280 pixels or streching with all size screen?

We do not have problem with real device screen size... only with AVD/emulator
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

dinmil

  • New Member
  • *
  • Posts: 45
Re: Android Module Wizard
« Reply #684 on: November 04, 2015, 05:34:57 pm »
Hello. I'm new to this thread. I have one question regarding jHtppClient.
Is it possible to retrieve gzip response from server and somehow ungzipit via jHttpClient component.


var MyString
begin
  jHttpClient1.AddClientHeader('Accept-Encoding', 'gzip');
  MyString := jHttpClient1.Get('http://some.server.which.return.gzip');
  // MyString is compressed - how to uncompress
end;

Second question. Is there any way to save String to file which is available (visible) via usb cable and some storage folder on phone

Regards, Dinko

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #685 on: November 05, 2015, 01:04:56 am »
Hello dinmil!

Quote
Second question. Is there any way to save String to file which is available (visible) via usb cable and some storage folder on phone...

Yes! You can use jTextFileManager component and "CopyFile" ...

[see demo AppShareFileDemo1]

Code: Pascal  [Select][+][-]
  1.    //myString: string;
  2.    
  3.    //save to Internal App Storage
  4.     jTextFileManager1.SaveToFile(myString, 'hello.txt');
  5.  
  6.    //copy to "public" folder download ...  
  7.    Self.CopyFile(Self.GetEnvironmentDirectoryPath(dirInternalAppStorage)+'/hello.txt',
  8.                            Self.GetEnvironmentDirectoryPath(dirDownloads)+'/hello.txt');  
  9.  
  10.  

For now I could not answer question 1... please try it!
« Last Edit: November 05, 2015, 02:40:16 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

dinmil

  • New Member
  • *
  • Posts: 45
Re: Android Module Wizard
« Reply #686 on: November 05, 2015, 02:13:24 pm »
I checked AppShareFileDemo and tried to Copy hello.txt to /download/public.
Function returns that Copy is OK but it is not visible ouside of phone. Even file manager of phone can not find the file.
Path say that this is /emulated/0/downloads  path or something like that.
I have HTC 310 for test which is not routed.

About httpclient.get method. This method returns utf unicode string. So if server returns gzip of 33 bytes it is converted to unicode of 63 bytes.
Is there some function which will convert unicode string to byte array or stream? This will solve problem.
Or even better, is there some function which will get http data in stream format or byte array?

So far, I think this project is excellent. Installation is little bit painful, but once setup is finished almost everything work OK.

Regards, Dinko

dinmil

  • New Member
  • *
  • Posts: 45
Re: Android Module Wizard
« Reply #687 on: November 05, 2015, 02:50:21 pm »
Copy is OK. After installing and starting Total commander for Android I was able to find the files.

So it seems one problem is solved, still stays jHttpClient and gzip.

Regards, Dinko

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android Module Wizard
« Reply #688 on: November 05, 2015, 03:07:55 pm »
Quote
Is there some function which will convert unicode string to byte array or stream? This will solve problem....

Good! Now we have a Pascal question.... maybe someone can help here!

Quote
. Installation is little bit painful, but once setup is finished almost everything work OK

Yes, we need improve docs and tutorial.... suggestions are welcomed!

Thank you!
« Last Edit: November 09, 2015, 01:52:49 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #689 on: November 09, 2015, 01:39:57 pm »
Hi jmpessoa, i am developing an english study app, but it has a problem with jactionbartab

When I press on image button , tabs will be created and show, but if i want back home page, tabs  still be there ( on the top of screen)

I tried to use both command

self.RemoveAllTabsActionBar();
jactionbartab1.RemoveAllTabs();   

but they can't solve this
You can see image below to understand more

 

TinyPortal © 2005-2018