Recent

Author Topic: Advanced app feasibility (camera + gps + storage + TCP)  (Read 332 times)

zebu1er

  • Newbie
  • Posts: 3
Advanced app feasibility (camera + gps + storage + TCP)
« on: August 07, 2019, 12:02:22 pm »
Hi,

I have to realise an app with the following functionalities :
- Take a picture with the camera
- Get current GPS position
- Setup a TCP client connection
- Store raw local data, or even better, in a database (sqlite, ...)
- Multithreading

Is this possible to make it in Pascal ? With what environment (Laz4Android + LAMW, ...) ?

Thanks for your advice !

jmpessoa

  • Hero Member
  • *****
  • Posts: 1401
Re: Advanced app feasibility (camera + gps + storage + TCP)
« Reply #1 on: August 07, 2019, 05:24:17 pm »

Yes!

Laz4Android + LAMW is a good start point.....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

zebu1er

  • Newbie
  • Posts: 3
Re: Advanced app feasibility (camera + gps + storage + TCP)
« Reply #2 on: August 09, 2019, 05:51:55 pm »
I've tested, seems quite viable. I just regret I cannot use Lazarus native positioning (layout) instead of the one of Android.

jmpessoa

  • Hero Member
  • *****
  • Posts: 1401
Re: Advanced app feasibility (camera + gps + storage + TCP)
« Reply #3 on: August 09, 2019, 09:52:26 pm »

Quote
I cannot use Lazarus native positioning (layout) ...

But,  LAMW/Android  layout is not so complicated ....

from here:
https://raw.githubusercontent.com/jmpessoa/lazandroidmodulewizard/master/LAMW_Getting_Started.txt

Quote
[FAQ 2]: [Thanks to Ahmad Bohloolbandi (a.k.a. @developing) ]

#Question: How do we can design a layout that shown same in real device?

[Answer]: You should use the component properties:

      "Anchor",
      "PosRelativeToParent",
      "PosRelativeToAnchor",
      "LayoutParamHeight",
      "LayoutParamWhidth"
         
Example:

1-Put a "jTextView" component on your AndroidModule form:

   Set "PosRelativeToParent"
      "rpCenterHorizontal" [True]
      "rpTop" [True]

2-Put a "jButton" component on AndroidModule form:

   Set "Anchor" to "jTextView" (Because you should set position relative with "jTextView")
   set "PosRelativeToAnchor"
      "raBelow" [True]

3-Put a "jEditText" component on form:

   Set "Anchor" to "jButton".
   Set "PosRelativeToAnchor"
      "raBelow" [True]

NOTE:    Anchor setting is most important section of this design,
   because your component position depends on this property.
   And for change width and/or height of each components you should
   change/configure "LayoutParamWhidth" and/or "LayoutParamHeight".
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

zebu1er

  • Newbie
  • Posts: 3
Re: Advanced app feasibility (camera + gps + storage + TCP)
« Reply #4 on: August 14, 2019, 12:32:06 pm »
Thanks. Yes I already used that positioning mode in my few Android apps. To me it seems it's mainly meant to be used like a flow positioning (like display: inline-block of the css). That approach is totally rational according to the variety of screen sizes.
In fact, ideally, I was seeking to develop in Lazarus over Android but bypassing Android stuff. Just like what I did with Lazarus on a Raspberry running Raspbian. But probably that approach would then prevent from accessing Android sensors (GPS, ...)