Smartphone apps in FPC

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Smartphone apps in FPC

donald.pedder
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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Michael Van Canneyt


On Thu, 17 Mar 2016, [hidden email] wrote:

> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Maciej Izak
2016-03-17 11:08 GMT+01:00 Michael Van Canneyt <[hidden email]>:
- 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

donald.pedder
In reply to this post by Michael Van Canneyt
Hi Michael,

   I remember your name from when I was here before.


> I can send a URL for the articles if you want.

That would be great. I would love to read them (I am at the soaking-up information stage :-) ).

thanks,
  Donald.


Email sent using Optus Webmail
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Reimar Grabowski
In reply to this post by Michael Van Canneyt
On Thu, 17 Mar 2016 11:08:01 +0100 (CET)
Michael Van Canneyt <[hidden email]> 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 ^^

R.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Felipe Monteiro de Carvalho
In reply to this post by Maciej Izak
On Thu, Mar 17, 2016 at 11:29 AM, Maciej Izak <[hidden email]> wrote:
> 2016-03-17 11:08 GMT+01:00 Michael Van Canneyt <[hidden email]>:
>> - 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Paul Breneman
In reply to this post by donald.pedder
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Michael Van Canneyt
In reply to this post by Reimar Grabowski


On Thu, 17 Mar 2016, Reimar Grabowski wrote:

> On Thu, 17 Mar 2016 11:08:01 +0100 (CET)
> Michael Van Canneyt <[hidden email]> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Reimar Grabowski
On Thu, 17 Mar 2016 15:49:50 +0100 (CET)
Michael Van Canneyt <[hidden email]> 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.
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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Michael Van Canneyt


On Thu, 17 Mar 2016, Reimar Grabowski wrote:

> On Thu, 17 Mar 2016 15:49:50 +0100 (CET)
> Michael Van Canneyt <[hidden email]> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Reimar Grabowski
On Thu, 17 Mar 2016 17:29:23 +0100 (CET)
Michael Van Canneyt <[hidden email]> wrote:

> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Maciej Izak
In reply to this post by Felipe Monteiro de Carvalho
2016-03-17 14:58 GMT+01:00 Felipe Monteiro de Carvalho <[hidden email]>:
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 :)
 

> 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Ingemar Ragnemalm
In reply to this post by donald.pedder


Maciej Izak wrote:
>> 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Maciej Izak
2016-03-18 10:57 GMT+01:00 Ingemar Ragnemalm <[hidden email]>:

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! :)


--
Best regards,
Maciej Izak

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

donald.pedder
In reply to this post by Paul Breneman
Hi Paul,

> I would suggest checking this out:
> http://castle-engine.sourceforge.net/engine.php
> https://github.com/castle-engine/castle-engine/wiki/Build-Too

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

thanks, 
   Donald.

----- Original Message -----
From:
"FPC-Pascal users discussions" <[hidden email]>

To:
<[hidden email]>
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

_______________________________________________
fpc-pascal maillist - [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Email sent using Optus Webmail
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Michalis Kamburelis-3
In reply to this post by Paul Breneman
2016-03-17 15:17 GMT+01:00 Paul Breneman <[hidden email]>:
> I would suggest checking this out:
> http://castle-engine.sourceforge.net/engine.php
> https://github.com/castle-engine/castle-engine/wiki/Build-Too
>

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Smartphone apps in FPC

Paul Breneman
In reply to this post by donald.pedder
On 03/21/2016 10:41 PM, [hidden email] wrote:

>
> 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal