Page 1 of 3

LiveCode program on mobile

Posted: Tue May 24, 2016 9:35 pm
by MarkoSato
Hello,

I have a little Project with livCode with a .livecode ending.
I wonder if I can now somehow make it, so that I can run the program on my mobile phone for example on Android.
Is there maybe an easy way for it?

Best regards
Mark

Re: LiveCode program on mobile

Posted: Tue May 24, 2016 9:52 pm
by Klaus
Hi Mark,

well, not really easy, I'm afraid! 8)
Check this to get started: http://lessons.livecode.com/m/4069


Best

Klaus

Re: LiveCode program on mobile

Posted: Tue May 24, 2016 10:14 pm
by MarkoSato
Hey,

So I have done almost everything for it to work.
And I did all the steps in this video https://www.youtube.com/watch?v=83qrKr9bR3M
Now the problem: if I click the test button to run the program on the emulator it pops out an error message.
I put a screenshot as an attachment.
(As I chose the path for the android SDK folder, it did not find the JDK path.. it was empty. Could it be because of this?
And I don't have the "android-sdk-mac_x84" in my Android folder, it is just "sdk")

Best regards
Mark

Re: LiveCode program on mobile

Posted: Wed May 25, 2016 11:17 am
by Klaus
Hi Mark,

I'm afraid I cannot help you here, because I do not develop for mobile.
I don't even own a cellphone! 8)

And yes, I am german, no idea why you deleted your last posting?
I read it but did not have the time to answer yesterday evening.


Best

Klaus

Re: LiveCode program on mobile

Posted: Wed May 25, 2016 11:25 am
by LCNeil
looks like you created an intel based emulator. Make sure the emulator architecture is ARM based and try deploying again.

more info on this can be found here-

http://stackoverflow.com/questions/2457 ... nstall-apk

Re: LiveCode program on mobile

Posted: Wed May 25, 2016 1:41 pm
by MarkoSato
Hello,

I deleted it because after I posted it I tried some things so almost everything worked and I thought it would be unnecessary to leave it here.
I changed it to ARM and now I am able to test a new stack with only one button for a test on the virtual device.
But as I tried to test my actual program, which is a little big bigger with almost 300MB, it didn't work.
Would you maybe know why ?
(By the way.. it took a lot of time when opening the virtual device to boot up like almost 5 minutes.. is that normal?)

Best regards

Re: LiveCode program on mobile

Posted: Wed May 25, 2016 1:53 pm
by LCNeil
Android emulators are notoriously slow they can take a long time to load. Deploying a large stack to the emulator may not work due to this speed limitation. I would recommend playing about with the emulator settings (memory, screensize) as these can have a performance impact.

If possible, I would run your Android app on a physical device as this will show the true speed of how your app will run in a real world situation.

Another possible emulator alternative is explained here-

https://livecode.com/turbo-charging-the ... -emulator/

Although deploying to these emulators is possible, we cannot provide any support for them

Re: LiveCode program on mobile

Posted: Wed May 25, 2016 6:27 pm
by MarkoSato
Thanks for the help!
Can you maybe help me out how to run my App on a physical device.
I mean it is still in the .livecode format. Don't I need a .apk or something like that.
I have a Samsung Galaxy S3 and it would be a blast for me to test my program on my phone.

Best regards
Mark

Re: LiveCode program on mobile

Posted: Wed May 25, 2016 8:35 pm
by Klaus
Hi Mark,

connect your device via USB to your comouter and (chances are good that) it will appear in menu:
Development: Test Target: Your device here

Select it and then "Test" (from the same menu) and Livecode will copy the
(temporarily created) APK to your device so you can actually run it there.


Best

Klaus

Re: LiveCode program on mobile

Posted: Wed May 25, 2016 11:16 pm
by Simon
Hi Mark,
Don't forget you have to set "Allow installation from unknown sources" on your phone.

Simon

Re: LiveCode program on mobile

Posted: Thu May 26, 2016 2:17 pm
by LCNeil
also make sure to enable usb debugging. See the section "Configuring a physical device" in this lesson for more information-

http://lessons.livecode.com/m/2571/l/27 ... er-on-a-pc

Re: LiveCode program on mobile

Posted: Sat May 28, 2016 10:19 am
by MarkoSato
Hello,

I have a mac so I had to install a file transfer program so that I could connect my phone with the mac.
I enabled USB debugging and allowed unknown sources.
If I start LiveCode now and click "Development" --> "Test Target" there appears a new android with some numbers and letters, but I can't click on it?

*Edit: Now I actually got it to work (and I don't even know how)
Now I have the problem: My stack is 800x500 but my phone is obviously smaller. I tried to flip my phone but it didn't work so I can only see only half of my Stack.
Do you know how to make it, so the screen size will automatically fit?

-- When I save as standalone Application it creates the .apk. When I try to install it on the phone first it says "installing.." but after a while it says "could not install" and I can only quit.

Oh and I do not have any sound on my phone ( normally I have background music in my stack.. would be great if that could work too.. :D)

Re: LiveCode program on mobile

Posted: Sat May 28, 2016 10:33 pm
by MarkoSato
Sry for posting a lot.. but I try and find new things all the time :D (It's my first time programming my own app so i got a little bit hyped :oops: )

.. So the installing works now after i changed in the standalone Application Settings to "Signing only for develop."
2 problems remaining:
- Still can't play any sound. On my mac the original stack sounds work fine, on my phone there is no sound.
- the screen size is not adjusting.. As I mentioned my Stack is bigger than my phone screen. I really hope that there is a way to adjust the screen size on the phone so that I don't have to change the real stack size for it to work.

Hope you can help me.

Re: LiveCode program on mobile

Posted: Sat May 28, 2016 11:01 pm
by Simon
Hi Mark,
Check out "fullscreenmode" in the dictionary. Mind you I don't think the aspect ratio you are using will look good on mobile.

I've only heard on one sound problem on mobile and the answer was to take the phone off mute. :)

Simon
Edit; Here is the lesson on fullscreeenmode
http://lessons.livecode.com/m/4069/l/15 ... ll-devices
Edit2; I take it you know how to copy your sound files in the "Copy Files" tab of the standalone builder?

Re: LiveCode program on mobile

Posted: Sun May 29, 2016 11:02 am
by MarkoSato
Hello,

Thanks, the fullscreen is now working and it actually looks quite good. (I have it on "Landscape")

My phone wasn't on mute :D everything else worked fine.
No I did not know that I had to copy files in the "Copy Files".
I found this link: http://lessons.livecode.com/m/4069/l/12 ... ios-device but I have some questions.
I have several ".wav" files for every card.
Do I have to set all of them into the special Folder? So that I have several lines for each sound file? And how do I do it? In the Lesson it was like:

Code: Select all

"on mouseUp
set the beepsound to specialFolderPath("engine") & "/sound.aiff"
beep                 --> what is the "beep" for?
end mouseUp"
But I don't have a "beepsound" , it's just a normal mp3 converted in wav.

*Edit: Beside that,, I have the problem that the application crashes always at the same card. Shortly before the end I have some cards with animations like a "credits" scene, but the app will always close in the same place. I could not figure out what the problem is.