Recent

Author Topic: Best Android development tool  (Read 6948 times)

dbaxter

  • New Member
  • *
  • Posts: 13
Best Android development tool
« on: July 27, 2015, 04:04:29 pm »
What is the current thinking on the best tool set for Android cross compiling?
I've tried CodeTyphon, laztoapk, laz4android, and lazandroidmodulewizard all without success. Rather than continue to flounder, I thought I'd check in and see if there is something I'm missing or which of those to concentrate my efforts with trying to get it to work.
Thanks.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Best Android development tool
« Reply #1 on: July 27, 2015, 06:04:44 pm »
Expand your knowledge and build the toolset yourself. If none of the above you mentioned works, I suggest not to go any further but lookback and go backward, find which steps you skip. The original package is not ready yet for instant use (at least until 3.0 is out, and that's even still require some people to maintain the cross compilers) and that's what the first 3 tries to do, which works in many cases. The last one has nothing to do with the first 3, it's a library package for those who already have working android cross compilation system.
« Last Edit: July 28, 2015, 09:14:52 am by Leledumbo »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Best Android development tool
« Reply #2 on: July 27, 2015, 09:53:46 pm »
@dbaxter

A  rapid "get_start" for windows: "Laz4Android + lazandroidmodulewizard"

Note 1: for Linux:  go to " lazandroidmodulewizard folder  "...\linux" and read: "new_how_to_install_by_renabor.txt"

I. Infrastructure

Java  sdk_x86 [32 bits]

Android sdk, NDK-r10c

Laz4Android [All in one!] =
 FPC: 3.1.1 trunk svn 29987
     --->>win32/arm-android/i386-android/jvm-android
              Note: required: NDK: r10c (arm-linux-androideabi-4.6 + x86-4.6)                               
Lazarus:1.5  trunk svn 47987
      http://sourceforge.net/projects/laz4android/files/?source=navbar :
     To Install [*.7z], please, read the "Laz4Android_readme.txt"

Android NDK-r10c   -  this version is required by "Laz4Android" 
http://dl.google.com/android/ndk/android-ndk-r10c-windows-x86.exe

Ant [to build Apk]
http://ant.apache.org/bindownload.cgi
Simply extract the zip file to a convenient location...

Eclipse is not mandatory!  [but to  facility, the Demos projects are Eclipse compatible!] 

II. LAMW:  Lazarus Android Module Wizard

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

.Install ordem.

tfpandroidbridge_pack.lpk
lazandroidwizardpack.lpk
amw_ide_tools.lpk     [../ide-tools]

.USE.

1. Configure Paths:

Lazarus IDE menu "Tools" ---> "[Lamw] Android Module Wizard" -->  "Path Settings ..."

2. New Project

   Lazarus IDE menu "Project" ---> New Project ---> JNI Android Module [Lamw GUI]

   Projects workspace [yours main projecs folder or eclipse workspace]:  ____________   
   Project Name: _____________
   etc....

   OK!

  save all!

3. From "Android Bridge" component tab drag/drop a jTextView in jForm
     set property: PosRelativeToParent  = [rpTop,rpCenterHorizontal]

4. From "Android Bridge" component tab drag/drop a jButton     in jForm
     set property: Anchor = jTextView1
     set property: PosRelativeToAnchor : [raBelow]
     set property:PosRelativeToParent = [rpCenter]
     write code for event property "OnClick"  =  ShowMessage('Hello!')

5.  Lazarus IDE menu "Run" ---> "Buld"   

6. Connect your Device to Computer [usb] and configure it to "debug mode"     

     "App settings"  ---> more -- developer options: 
      stay awake  [checked!]
       usb debugging [checked!]
       verify apps via usb [checked!]

7.Lazarus IDE menu "Run" ---> "[Lamw] Build Apk and Run" [Congratulations!!!]

8.PANIC!!! Fail to buid "Apk"

-----Try change project  "AndroidManifest.xml" according your system installation....

Code: [Select]
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="17"/>

try other target:   "android:targetSdkVersion" !!

----Change your project "build.xml"  according...

Code: [Select]
<property name="target"  value="android-17"/>


8. How to configure a Demo to Use/Test:

      .Lazarus IDE menu Open a [*.lpi] Demo Project   [...\jni]

      .Lazarus IDE menu "Tools" ---> "[Lamw] Android Module Wizard" -->  "Change Project [*.lpi] Ndk Path"

      .set your "NDK" path!

      .change/edit project "build.xml"   according your system..

Code: [Select]
<property name="sdk.dir" location="C:\adt32\sdk"/>

Note 2: there are some [olds] docs:   

"install_tutorial_ant_users.txt"
   and
"install_tutorial_eclipse_users.txt"


Thank you!
« Last Edit: July 28, 2015, 02:22:06 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

dbaxter

  • New Member
  • *
  • Posts: 13
Re: Best Android development tool
« Reply #3 on: July 28, 2015, 01:54:54 am »
Thank you for the replies, folks. I realize I had a component pack along with the compilers, but was just stating all the rocks I've looked under.
I will follow the jmpessoa instructions and hopefully get things going. It's certainly not a project for the timid, is it?

dbaxter

  • New Member
  • *
  • Posts: 13
Re: Best Android development tool
« Reply #4 on: July 29, 2015, 04:36:49 am »
By Jove, it works!
Now to get the hang of positioning things and the different component properties (from Lazarus ones). This is exciting. Thank you, jmpessoa.
(By the way - is it possible to have the jseekbar be vertical?)
« Last Edit: July 29, 2015, 05:37:53 am by dbaxter »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Best Android development tool
« Reply #5 on: July 29, 2015, 07:21:35 am »
Yes!

Here is my easy/simple test:

I put a jSeekBar in jForm and

Code: [Select]
PosRelativeToParent = [rpCenterInParent]

and:

Code: [Select]
procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);
begin
  jSeekBar1.SetRotation(270);
  jSeekBar1.SetProgress(50);  //default:  0 <----> 100
end;     

I got it vertical!

PS.

    If possible,  there is an "Android Module Wizard" topic:
    http://forum.lazarus.freepascal.org/index.php/topic,21919.0.html
   [so we avoid noise in all forum..]

Thank you!
« Last Edit: July 29, 2015, 07:37:27 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Best Android development tool
« Reply #6 on: July 29, 2015, 12:41:43 pm »
Hi all, especially jmpessoa,
This is a really nice Quick-start, I looked in the Wiki, and found nothing, so how about putting this in a Wiki ?
If it's OK with you I can do it. And also some translation...
Greetings
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Best Android development tool
« Reply #7 on: July 29, 2015, 01:25:29 pm »

Hello jc99!

Quote
...If it's OK with you I can do it. And also some translation...

Nice! Please, do it!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Best Android development tool
« Reply #8 on: August 01, 2015, 07:12:25 pm »
Nice! Please, do it!

Just did:
http://wiki.freepascal.org/Talk:Android_tutorial
Since there already was a tutorial, i put it in the discussion-section.
(Maybe you/or someone else could help me with the formatting ... )
« Last Edit: August 01, 2015, 07:15:27 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

 

TinyPortal © 2005-2018