Page 1 of 1
Converting from iOS to Android
Posted: Fri Aug 10, 2012 12:45 am
by jnmediaGAd195
My app, Number Wizard, is in the App Store and I would like to convert it to Android. I was able to load it on to a Kindle Fire but I have the following issues:
1. The picklists don't work.
put " Reset Current Score" & cr & " Reset High Scores" & cr & " Reset All" into optionList
iphonePick optionlist, 1
put the result into chosenItem
According to the Dictionary, this is Android-compatible or does it need to be converted to mobilePick?
2. Animation does not work.
put 131 into tCounter
repeat until tCounter = -1
put ("smile_" & tCounter) into tName
set the width of image tName to the width of button "drawFace"
set the height of image tName to the height of button "drawFace"
set the icon of button "drawFace" to the id of image tName
show button "drawFace"
wait for 0.03 second
subtract 6 from tCounter
end repeat
3. It's a math app. It executes one problem and goes away. This could be related to the animation issue because the next thing that is supposed to happen is animation and it never occurs.
Any help is greatly appreciated.
Judy
Re: Converting from iOS to Android
Posted: Fri Aug 10, 2012 11:37 am
by Klaus
Hi Judy,
I do not develop for Android, but here some general hints.
jnmediaGAd195 wrote:My app, Number Wizard, is in the App Store and I would like to convert it to Android. I was able to load it on to a Kindle Fire but I have the following issues:
1. The picklists don't work.
put " Reset Current Score" & cr & " Reset High Scores" & cr & " Reset All" into optionList
iphonePick optionlist, 1
put the result into chosenItem
According to the Dictionary, this is Android-compatible or does it need to be converted to mobilePick?
Did you try if this works with "mobilepick"?
jnmediaGAd195 wrote:
2. Animation does not work.
put 131 into tCounter
repeat until tCounter = -1
...
end repeat
Try this and see my comments:
Code: Select all
put 131 into tCounter
## Reset icon in button and only show the button once
set the icon of btn "drawFace" to empty
show button "drawFace"
## Check fo SMALLER AND EQUAL -1, the subtraction might result in NOT exactly -1! :-)
repeat until tCounter <= -1
lock screen
put ("smile_" & tCounter) into tName
set the width of image tName to the width of button "drawFace"
set the height of image tName to the height of button "drawFace"
set the icon of button "drawFace" to the id of image tName
unlock screen
wait for 0.03 second
subtract 6 from tCounter
end repeat
jnmediaGAd195 wrote:3. It's a math app. It executes one problem and goes away.
Sorry, don't understand.
Best
Klaus
Re: Converting from iOS to Android
Posted: Fri Aug 10, 2012 2:13 pm
by jnmediaGAd195
Klaus,
Thanks for the info.
1. I tried mobilePick and it seems to be working so I think I am good to go. I was a little hesitant to start changing code. My thing is that if I have to change a lot of code, I'm not going to bother porting it to Android.
2. I figured out that the issue wasn't with the animation but with the command I was using to generate sound. I replaced iPhonePlaySoundOnChannel with mobilePlaySoundOnChannel and it's working.

3. I put in an answer to the first math problem and checked my answer. The next problem should be generated and it's not. I looked to see if there was anything iPhone-specific that I am doing in the code but it's pretty generic code. I'm still kind of puzzled by this.
Thanks for your help. Much appreciated.
Judy
Re: Converting from iOS to Android
Posted: Fri Aug 10, 2012 2:27 pm
by Klaus
Hi Judy,
jnmediaGAd195 wrote:Klaus,
Thanks for the info.
1. I tried mobilePick and it seems to be working so I think I am good to go. I was a little hesitant to start changing code. My thing is that if I have to change a lot of code, I'm not going to bother porting it to Android.
Just use the FIND & REPLACE feature in LiveCode to replace this kind of stuff in your scripts.
I don't think there are too many changes neccessary.
jnmediaGAd195 wrote:2. I figured out that the issue wasn't with the animation but with the command I was using to generate sound. I replaced iPhonePlaySoundOnChannel with mobilePlaySoundOnChannel and it's working.

No comment
Glad you got it working!
Best
Klaus
Re: Converting from iOS to Android
Posted: Fri Aug 10, 2012 2:35 pm
by jnmediaGAd195
"Stupid Developer Error" on why the next problem wouldn't generate. I fixed the last of the iPhone-specific code, copied it to the Kindle but didn't install it. Wow!
Number Wizard, coming to a Kindle Fire near you!
