Recent

Author Topic: Status of Mobile Dev  (Read 10719 times)

Blestan

  • Sr. Member
  • ****
  • Posts: 461
Status of Mobile Dev
« on: July 21, 2016, 11:55:03 am »
hi!
I have to make a choice for a app i must write.
...going native (java, swift, objective C) or make hybrid with phonegap.
As a Pascal developer for many many years ( since 1986 ) i want to use fpc (delphi is out of question because of the prices) to build the app ... but my fears are about the current status of the mobile capabilities of fpc - expect that iOS is not supported ...are major android device options supported - geolocation, camera, gallery, contacts etc ...
please give me some reasonable advice
Blestan
Speak postscript or die!
Translate to pdf and live!

markus_ja

  • New Member
  • *
  • Posts: 43
Re: Status of Mobile Dev
« Reply #1 on: July 21, 2016, 12:40:37 pm »
Are you aware of SmartMobileStudio http://smartmobilestudio.com ?
You can use Object Pascal to write JS/HTML5 Apps.

Blestan

  • Sr. Member
  • ****
  • Posts: 461
Re: Status of Mobile Dev
« Reply #2 on: July 21, 2016, 12:44:21 pm »
yes.. and i played with it several times for the past 2-3 years ... but this is not a sollution ... this is just a pas to js compiler .. at the end you finish with a bloated css/js files that you submit to pahonegap build ... it basically html/css/js hybrid app
it good only if you dont want to learn new paradigms and you are fanatic about writing pascal code.
« Last Edit: July 21, 2016, 12:46:55 pm by Blestan »
Speak postscript or die!
Translate to pdf and live!

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Status of Mobile Dev
« Reply #3 on: July 21, 2016, 01:17:13 pm »
please give me some reasonable advice
Get your hands dirty on it. One thing for sure, there's no yet unified GUI library for both Android and iOS (don't even think about Ubuntu mobile, Plasma mobile, Tizen, etc.). Interest in (development of) iOS side is kinda low (request is not bad, but millions of requester doesn't make any single dedicated contributor), while Android is just fine and growing at least in LazAndroidModuleWizard and FPC-JVM.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Status of Mobile Dev
« Reply #4 on: July 21, 2016, 01:21:51 pm »
- expect that iOS is not supported ...
That expectation is wrong: it is supported ;)
Specialize a type, not a var.

Blestan

  • Sr. Member
  • ****
  • Posts: 461
Re: Status of Mobile Dev
« Reply #5 on: July 21, 2016, 02:08:07 pm »
i supposed that someone will say that - ios is supported - like a target maybe .... but it s not useful ... can you tell me how to create a single prototype app? with even simple controls? come on!
... it's in early pre-alfa stage ... like swift in available on android ... just a proof of concept
Speak postscript or die!
Translate to pdf and live!

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Mobile Dev
« Reply #6 on: July 21, 2016, 02:35:03 pm »
For the foreseeable future, I think the only realistic approach to using FPC on iOS is to create a hybrid app: Swift UI and Pascal non-UI "core", either in a dynamic library or as a server-side app. FPC fully supports iOS library creation, both 32-bit and 64-bit code.

As an example of this kind of hybrid app, see the SwiftCast app in Part 3 and look at its source in Xcode:

https://dl.dropboxusercontent.com/u/28343282/MacXPlatform/PascalDynLibs.html

If this makes sense to you, then you'll be fine doing an iOS app this way.

While SwiftCast is a Mac app, the approach is almost exactly the same for iOS. One minor difference is that the Pascal library on iOS needs to be in a framework rather than just the single .dylib library file. But creating the framework is trivial.

I think we should accept Swift on iOS the same way we accept JavaScript when creating a Web app's client UI.

-Phil

Blestan

  • Sr. Member
  • ****
  • Posts: 461
Re: Status of Mobile Dev
« Reply #7 on: July 21, 2016, 03:46:28 pm »
ok ... the situation is far from production ready for any platform ...
for the prototype i will go with hybrid UI but with pascal json server for the data ...
mobile angular ui or framework7 backed by a custom made rest server.
aside i will try the components for android (Laz4android) and the custom drawn  widget set ...
last question - on android are device hardware option supported - i mean geolocation and camera for example?
Speak postscript or die!
Translate to pdf and live!

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Status of Mobile Dev
« Reply #8 on: July 21, 2016, 04:55:51 pm »
Yes of course. Just like for iOS the full Android api is  accessible through FPC.
But you are a screen drawer (that's the bad meaning in the different meanings of control-freak) and not a programmer because you want everything pre-cooked and readily served.

It is still too hot in my garden, but I do have icecubes. Hence the measured response.
Specialize a type, not a var.

Blestan

  • Sr. Member
  • ****
  • Posts: 461
Re: Status of Mobile Dev
« Reply #9 on: July 21, 2016, 06:08:11 pm »
hahhaah .cheeers man ;) in my garden is now cool ;) 35C .... with cuba libre is even cooler... btw im a programer but mostly on non gui ... i prefer to deal with "system" projects.... servers, parsers, db ... etc...
but now i have to deal with mobile gui... and after a week of investigations i call tell that this is a complete mess ... not in fpc world but as a whole.. i will try to put some efforts in android for lazarus and custom drawn... my first task is to port the material theme to CD controls
Speak postscript or die!
Translate to pdf and live!

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Status of Mobile Dev
« Reply #10 on: July 21, 2016, 06:27:25 pm »
Recently went into production with an iOS game.
Yeah, it is not using any iOS ui, but still...

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Status of Mobile Dev
« Reply #11 on: July 21, 2016, 06:52:53 pm »

@Blestan:

Quote
...on android are device hardware option supported - i mean geolocation and camera for example..

Yes, LAMW: Android Module Wizard support all these... [components and "demos"]

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



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

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Status of Mobile Dev
« Reply #12 on: July 21, 2016, 08:24:35 pm »
ok ... the situation is far from production ready for any platform ...
for the prototype i will go with hybrid UI but with pascal json server for the data ...
mobile angular ui or framework7 backed by a custom made rest server.
aside i will try the components for android (Laz4android) and the custom drawn  widget set ...
last question - on android are device hardware option supported - i mean geolocation and camera for example?

Hello Blestan. I'm a newbie in this Lazarus Android area. I can't tell you much how well or not the recent development of Android support. But here I can share what I found in LAMW:

Components provided by LAMW for Android development in the component tabs are:
jMenu, jContextMenu, jTextView, jEditText, jButton, jCheckBox, jRadioButton, jRadioGroup, jProgressBar, jRatingBar, jSeekBar, jSpinner, jAutoTextView, jGridView, jListView, jScrollView, jHorizontalScrollView, jActionBarTab, jPanel, jCustomDialog, jChronometer, jDigitalClock, jAnalogClock, jSwitchButton, jToggleButton, jImageBtn, jWebView, jImageView, jImageList, jDrawingView, jSurfaceView, jBitmap, jView, jCanvas, jCanvasES1, jCanvasES2, jDatePickerDialog, jDialogYN, jDialogProgress, jNotifactionManager, jIntentManager, jBroadcastReciver, jSensorManager, jContactManager, jMediaRecorder, jMediaPlayer, jDownloadManager, jDownloadService, jAlarmManager, jSMS, jCamera, jLocation, jPrefernces, jTextFileManager, jImageFileManager, jShareFile, jHttpClient, jSMTPClient, jTCPSocketClient, jTimer, jAsyncTask, jBluetooth, jBluetoothClientSocket, jBluetoothServerSocket, jSqliteDataAccess, jSqliteCursor, jShellCommand, jDumpJavaMethods, jMyHello  %)

I'm not a cult fanatic who will try to convert you.  >:D Oppositely, I will tell you don't use Lazarus/FPC to build commercial projects. At least for now.

I started to learn how to use Lazarus to develop Android apps a year ago. Many months of experiments wasted without any progress. So started to think what went wrong. I changed my strategy. I read the documentations thoroughly, I visit the forum frequently to hear people sharing their experiences about Android development, and I learned how to cross compile.

Now, I get the result. I'm now able to write OpenGL ES 2 animation apk that can run on Android both ARM and Intel targets. Isn't it great  :D. Yep, but I found several bugs that I'm sure that's not my fault. I still haven't submit any bug reports, because those issues are hard to explain.

 :'( So, it is sad to tell you don't use Lazarus/FPC if you're going to build commercial Android apps. I still use and learn it, because I'm having fun playing it. It can be your toy, but not your tool.

And you've been told, there is no unified GUI library. Several options are available.

Laz4android + Custom Drawn is great. This combo was my first choice. Unfortunately the development seems stopped and there has a bug I can't tolerate. After months of waiting, I gave up and tried Lazarus Android Module Wizard alias LAMW. Sorry to say :-[, both are buggy. But LAMW was and is still improving. The documentation is okay, but no tutorial. Luckily it's packed with lots of demos to show how to use each of the components.

I heared some people succeed to use JVM to build Android apps. There is also attempts to use SDL to generate codes that can compile easily on both PC and Android. Bravo! Although my first try failed, but seems very promising.

 :-X ssst ... don't use Lazarus/FPC to build commercial apps.
I've warned you.
« Last Edit: July 21, 2016, 08:35:03 pm by Handoko »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Status of Mobile Dev
« Reply #13 on: July 21, 2016, 10:47:37 pm »
Here are my notes from several years ago working with both PhoneGap and FPC JVM:

https://dl.dropboxusercontent.com/u/28343282/qxotica/QxoticaTechNote1.html

https://dl.dropboxusercontent.com/u/28343282/pba/PbaStatus.html

The link to pba source in the 2nd page is broken. Here's the updated link:

https://dl.dropboxusercontent.com/u/28343282/pba/pba.zip

Also, the 1st page is part of a larger project:

https://sourceforge.net/projects/qxotica/

-Phil

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Status of Mobile Dev
« Reply #14 on: July 22, 2016, 12:49:03 am »
i supposed that someone will say that - ios is supported - like a target maybe .... but it s not useful ... can you tell me how to create a single prototype app? with even simple controls? come on!
... it's in early pre-alfa stage ... like swift in available on android ... just a proof of concept
http://blog.naver.com/simonsayz/220498531474
There was integration package with form designer, but it's totally gone now. If you can use some wayback machine, search for pas4ios.

 

TinyPortal © 2005-2018