Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-03

Smartphone apps in FPC

17 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi all,

   I was on this list years ago, and then fell off at some point for some reason, but back again now. :-)

   Having written for DOS all those years ago, I am now just getting into making smartphone apps, and it would be good to be able to use my old friend FPC for it. :-) I have some familiarity with Java, so learning Android not too difficult (just gotta get around the smartphone-specific knowledge), but I don't know Apple's language at all, and I do want to make my apps available in both Google and Apple stores. I understand Apple have relaxed their attitude towards third-party developer tools in recent years, though I have also heard they frown on some (plus doing it with FPC may be taking me into an area where not so much tutorials available as there are for Java/Swift). Want to be sure my apps don't get rejected from Apple store for such a reason.

   So, just looking for some feedback from anyone on this list who may have used FPC for Android/Apple apps. i.e. have you written in FPC and succeeded in getting into Apple store, etc.? I'm looking to make my decision soon as to which language to use soon, and if FPC is suitable then that saves me having to learn a new language for the project. :-)

thanks,
  Donald.

-------------------------
Email sent using Optus Webmail

Reply by email

Michael Van Canneyt
to Unknown author
Show quoted text 24 lines
Hi all,    I was on this list years ago, and then fell off at some point for some reason, but back again now. :-)    Having written for DOS all those years ago, I am now just getting into making smartphone apps, and it would be good to be able to use my old friend FPC for it. :-) I have some familiarity with Java, so learning Android not too difficult (just gotta get around the smartphone-specific knowledge), but I don't know Apple's language at all, and I do want to make my apps available in both Google and Apple stores. I understand Apple have relaxed their attitude towards third-party developer tools in recent years, though I have also heard they frown on some (plus doing it with FPC may be taking me into an area where not so much tutorials available as there are for Java/Swift). Want to be sure my apps don't get rejected from Apple store for such a reason.    So, just looking for some feedback from anyone on this list who may have used FPC for Android/Apple apps. i.e. have you written in FPC and succeeded in getting into Apple store, etc.? I'm looking to make my decision soon as to which language to use soon, and if FPC is suitable then that saves me having to learn a new language for the project. :-)

There are 2 possible approaches:

- Use the NDK, and then basically you're writing a native Linux application. You can try to use the Android SDK through some JNI tricks; but I am unsure how well this works.

- Use the Android SDK, using the JVM compiler.

I have written several articles on how to use the latter approach; I wrote a real-world app with it.
I can send a URL for the articles if you want.

Michael.

Reply by email

Maciej Izak
to Michael Van Canneyt

2016-03-17 11:08 GMT+01:00 Michael Van Canneyt :

Show quoted text 5 lines
- Use the NDK, and then basically you're writing a native Linux application. You can try to use the Android SDK through some JNI tricks; but I am unsure how well this works.

I can confirm that works very well, even is possible visual remote-debugging from Lazarus (but that requires many IDE modifications).

Best regards, Maciej Izak

Reply by email

Felipe Monteiro de Carvalho
to Maciej Izak: 2016-03-17 11:08 GMT+01:00 Michael Van Canneyt : I can confirm that works very well, even…
Maciej Izak wrote 7 lines
2016-03-17 11:08 GMT+01:00 Michael Van Canneyt : > - Use the NDK, and then basically you're writing a native Linux > application. > You can try to use the Android SDK through some JNI tricks; but I am > unsure how well this works. I can confirm that works very well,

Well, yes, it works fine, but you still need a Java part otherwise a lot of APIs cannot be accessed. In particular APIs that require creating interfaces.

even is possible visual remote-debugging from Lazarus (but that requires many IDE modifications).

wow, any link describing how to achieve that?

Felipe Monteiro de Carvalho

Reply by email

Michael Van Canneyt
to Reimar Grabowski: On Thu, 17 Mar 2016 11:08:01 +0100 (CET) But you don't own a smart phone and have never…
Reimar Grabowski wrote 8 lines
On Thu, 17 Mar 2016 11:08:01 +0100 (CET) Michael Van Canneyt wrote: > - Use the Android SDK, using the JVM compiler. > I have written several articles on how to use the latter approach; > I wrote a real-world app with it. But you don't own a smart phone and have never heard of 'long click' like in android.view.View.OnLongClickListener ^^

Yes, this is all correct.

But, I do have an emulator, and plenty of people in the building do have a smartpone :-)

Amazing, eh ? :)

Michael.

Reply by email

Reimar Grabowski
to Michael Van Canneyt
But, I do have an emulator, and plenty of people in the building do have a smartpone :-) Amazing, eh ? :)

Not really.
But it's amazing that you wrote articles and a real-world application and in the process never stumbled upon 'long clicks' especially as they are essential in Androids keyboard input. Never tried to input an Umlaut on an Android virtual keyboard? Perhaps the concept is not as clearly identifiable as I thought or Google has hidden the OnLongClickListener interface too well. It's also amazing that 'not owning' a smart phone was just an excuse as you clearly have interacted with smart phones (yes, even emulated ones count).

Thought better of you. (-1)
Shame on you. (-1)
Amazed me twice (+2)
---------------------------
Final Score: 0

R.

Reply by email

Michael Van Canneyt
to Reimar Grabowski
Reimar Grabowski wrote 9 lines
On Thu, 17 Mar 2016 15:49:50 +0100 (CET) Michael Van Canneyt wrote: > But, I do have an emulator, and plenty of people in the building do have a > smartpone :-) > > Amazing, eh ? :) Not really. But it's amazing that you wrote articles and a real-world application and in the process never stumbled upon 'long clicks' especially as they are essential in Androids keyboard input.

Obviously they are not so essential as you seem to think ?

Never tried to input an Umlaut on an Android virtual keyboard?

No.

Perhaps the concept is not as clearly identifiable as I thought or Google has hidden the OnLongClickListener interface too well.

I honestly never encountered it. I didn't look for it either, of course.

It's also amazing that 'not owning' a smart phone was just an excuse as you clearly have interacted with smart phones (yes, even emulated ones count).

I really don't see that.

I have never used a smartphone, and on the emulator all I had to do was swipe and click to test my program. Basically it was a bunch of listviews to select a particular list, and a listview with some checkboxes embedded. In the username/password dialog, I could suffice with regular keys.

Hardly a shocking interface, and as such 'long clicks' didn't enter the picture at any point...

The biggest stumbleblock (and even so) was parsing JSON and sending JSON to a server.

Michael.

Reply by email

Reimar Grabowski
to Michael Van Canneyt
Obviously they are not so essential as you seem to think ?

You are right, they are not.
They are only useful to access strange chars like "0"-"9" or " etc." which are not often used in passwords or user names. But of course it depends on the used virtual keyboard and the chars can be accessed in other ways. I am sure you really never encountered 'long clicks' (no irony or sarcasm here) and you never really looked too deep into the API Guides about Android UI that's what amazes me.

The biggest stumbleblock (and even so) was parsing JSON and sending JSON to a server.

Jackson (external) and HttpURLConnection (part of the API) do the trick very easily but I know nothing about how FPC accesses API classes and even less how it can use external Java libs (fcl-json could not be used?).

I apologize if I did offend you.

R.

Tip of the day: There is no double click listener in Android.

Reply by email

Maciej Izak
to Felipe Monteiro de Carvalho: Well, yes, it works fine, but you still need a Java part otherwise a lot of APIs cannot…

2016-03-17 14:58 GMT+01:00 Felipe Monteiro de Carvalho <

Show quoted text 6 lines
: Well, yes, it works fine, but you still need a Java part otherwise a lot of APIs cannot be accessed. In particular APIs that require creating interfaces.

I can confirm too :)

Show quoted text 5 lines
> even is possible visual remote-debugging > from Lazarus (but that requires many IDE modifications). wow, any link describing how to achieve that?

Work in progress.

Best regards, Maciej Izak

Reply by email

Ingemar Ragnemalm
Maciej Izak wrote 5 lines
> Well, yes, it works fine, but you still need a Java part otherwise a > lot of APIs cannot be accessed. In particular APIs that require > creating interfaces. > I can confirm too :)

But for completeness, surely you do NOT have to write the Java (JVM) parts in Java, but you can write that too in FPC, right? I mean, using the FPC JVM compiler. But you need to interface JVM and native code like you do with Java code.

>> even is possible visual remote-debugging >> from Lazarus (but that requires many IDE modifications). > wow, any link describing how to achieve that? Work in progress.

I am looking forward to more information here! :)

/Ingemar

Reply by email

Maciej Izak
to Ingemar Ragnemalm

2016-03-18 10:57 GMT+01:00 Ingemar Ragnemalm :

Show quoted text 5 lines
> But for completeness, surely you do NOT have to write the Java (JVM) parts in Java, but you can write that too in FPC, right? I mean, using the FPC JVM compiler. But you need to interface JVM and native code like you do with Java code.

Probably is possible to use FPC JVM, but I don't have time for this (yet). Currently in my "production" project is used Java frontend and FPC backend (communication by JNI) as client and FPC(Linux)/Delphi(Win) as Server.

Ad: in both cases (client and server) is used ofc mORMot framework

I am looking forward to more information here! :)

as a proof ;) :
https://drive.google.com/file/d/0B4PZhd929_ZRY2NmT1QtSTdlWEU/view?usp=sharing

Best regards, Maciej Izak

Reply by email

Unknown author
to Paul Breneman: I would suggest checking this out: http://castle-engine.sourceforge.net/engine.php…

Hi Paul,

   My app isn't a game, so not sure that is of much help to me, but thanks anyway.
thanks, 
   Donald.

Earlier message 14 lines
----- Original Message ----- From: "FPC-Pascal users discussions" To: Cc: Sent:Thu, 17 Mar 2016 09:17:06 -0500 Subject:Re: [fpc-pascal] Smartphone apps in FPC I would suggest checking this out: http://castle-engine.sourceforge.net/engine.php https://github.com/castle-engine/castle-engine/wiki/Build-Too Lots of links here: http://turbocontrol.com/devoptions.htm

Reply by email

Michalis Kamburelis
to Paul Breneman: I would suggest checking this out: http://castle-engine.sourceforge.net/engine.php…

2016-03-17 15:17 GMT+01:00 Paul Breneman :

Small correction, the link should be:

https://github.com/castle-engine/castle-engine/wiki/Build-Tool

(final "l" was missing from the URL). Our instructions how to setup environment (FPC + Android SDK, NDK) may also be useful, https://github.com/castle-engine/castle-engine/wiki/Android

Regards,
Michalis

Reply by email

Paul Breneman
to Unknown author:    My app isn't a game, so not sure that is of much help to me, but thanks anyway.…
Show quoted text 12 lines
Hi Paul, > I would suggest checking this out: > http://castle-engine.sourceforge.net/engine.php > https://github.com/castle-engine/castle-engine/wiki/Build-Tool My app isn't a game, so not sure that is of much help to me, but thanks anyway. thanks, Donald.

I don't develop games either, but for FPC developers their tools for "building and packaging your programs for various platforms" seems to be something to pay attention to!

Regards,
Paul
www.ControlPascal.com

Reply by email