iOS & Android Development

Previous topic - Next topic

coder14

Hello everyone. Of late, I've been trying to compile simple examples, with great difficulty for iOS, and with no success for Android. Are there any practical examples to accomplish this, or tutorials that might help? I can't seem to find any sort of guide in the GLBasic documentation or in this forum.

Does GLBasic pre-compile to Objective-C for iOS, and if so, is the source file accessible/editable? I can only see a bunch of .a and .m files and a .pbxproj file in the distribute folder. And does it pre-compile to Java for Android apps?

Furthermore, would it be possible to access the hardware functions of these devices, like the GPS, compass, phone, messaging, etc.?

Any help or direction would be greatly appreciated.

Thank you.

bigsofty

GLB compiles to C++ with some Objective C for linkage. It is then complied to a .IPA via XCode.

GLB also compiles to C++ for Android, with some Java for linkage. It is then compiled to .APK using the Android SDK+NDK.

Both of the above have inline C++ available for native calls to API's(See INLINE in the manual and look into the code archives for snippets) or you could patch the JAVA or iOS Obj-C linkage code within the GLB build chain(not advisable IMHO).

You can see the intermediate C++ code in "C:\Users\UsersName\AppData\Local\Temp\glbasic\". This could be edited and compiled separately but there is no inbuilt method for making these temp file changes permanent though, better off using the INLINE command for that.
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

matchy

Learn how to install a iOS wrapper and there are many examples on the forum.

coder14

Quote from: bigsofty on 2013-Feb-17
GLB compiles to C++ with some Objective C for linkage. It is then complied to a .IPA via XCode.

GLB also compiles to C++ for Android, with some Java for linkage. It is then compiled to .APK using the Android SDK+NDK.

Thanks bigsofty for that answer.  Everything to C++ except for some linker code.

What about hardware access, like the camera, phone, compass, GPS, etc.? There's no mention of them in GLBasic.

matchy

Sometimes, I feel invisible.
:sick: :help: :shit:

r0ber7

I saw you matchy! ;-)

I don't know what an iOS wrapper is though. But I was helped by the info given by bigsofty. I'm on a quest to do ads. :P

coder14

Quote from: matchy on 2013-Feb-17
Learn how to install a iOS wrapper and there are many examples on the forum.
Sorry matchy. I did see your answer, but that's just beyond me. All these iOS and Android stuff is alien to me at the moment, and the prospect of learning Objective-C and Java/XML is daunting to say the least.

I may be slow or something, but coming from a BASIC background, I can't understand why it should be such a task to perform a simple string manipulation in those languages (and even in C/C++) when it just takes a couple of simple lines in BASIC.

So, installing a wrapper, let alone an iOS one, naturally escapes my attention.

Nevertheless, thank you for your answer!  :nw:

coder14

Quote from: r0ber7 on 2013-Feb-18I don't know what an iOS wrapper is though. But I was helped by the info given by bigsofty. I'm on a quest to do ads. :P

Hi r0ber7. Any luck with your Android issues?

matchy

Are you able to use the forum search feature because there are 9 pages of iOS wrapper info?

r0ber7

Quote from: coder14 on 2013-Feb-18
Hi r0ber7. Any luck with your Android issues?

Still learning. I have knowledge of C/C++ and Java, so that's useful. I have a simple program running on an Android phone right now. It does require some learning, but thanks to this thread now at least I know where to look. Once I understand how wrappers and inline code work, I think I will try to use some native API stuff for testing. There is much info on the forum, but for me sometimes it gets confusing, especially when a certain basic level of knowledge is required to understand what people are talking about. I'm very new to Android development and I'm still learning about the basics, also trying to understand how Eclipse works and so on.
But I think anything can be done, it's just a matter of persistence.  :) Maybe, when I understand a bit more, I will write a tutorial for dummies, but right now I myself am a dummy, lol.

coder14

Quote from: matchy on 2013-Feb-19
Are you able to use the forum search feature because there are 9 pages of iOS wrapper info?

No, 9 pages are returned when a search for "wrapper" is done, but besides one or two slight examples, still no help. Time for you to become invisible again.


Quote from: r0ber7 on 2013-Feb-19Maybe, when I understand a bit more, I will write a tutorial for dummies, but right now I myself am a dummy, lol.

Aren't we all. It'll be really great if the Android & iOS functionalities of GLBasic are extended. But if we need to wrap each and every missing function ourselves, we'll need to get really familiar with Objective-C and Android Java. And if that's the case, we might as well just code in them directly.

matchy

Invisible eh?  :rant:   dude, in the future, a new GLBer will be asking the same thing and how will you help?

Unless I have access to more forums, here's an example from the old days for iAd wrapper, where it's actually shared and developed with the community:
http://www.glbasic.com/forum/index.php?topic=4664.0

Omadan

Indeed coder which is why I am going to start Obj-c, and focus on that, as I posted the other day.

Though my love for this little program will remain forever, I feel somewhat limited at times, and things are moving way too fast.

:P
Top Arcade Apps - Best game for mobiles and computers

http://www.toparcadeapps.com

kanonet

Quote from: coder14 on 2013-Feb-19Time for you to become invisible again.
Made my day!
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

coder14

Coming back to my original question, I'd like to access iOS & Android hardware functions, like the GPS, compass, phone, messaging, etc.

Can anyone please help me on this? An example on how to initiate INLINE API calls or how to write such a wrapper would be most helpful.

Thank you kindly.


Dear Moderators,
Please don't lock this thread too. I promise to be good.
Thank you.