A few questions and some build issues

Hello,

I am getting closer to completing my first app and have started creating builds for the iPhone. In doing this, some problems came up that I need to address.

  1. For some reason the display on the iPhone is much darker than in my simulators (not dimmer, at least I dont think, just the blacks are more black and it is difficult to see some of my text on it). Is there anyway to adjust contrast or other settings that are app specific?

  2. The first line in my main.lua is: display.setStatusBar( display.HiddenStatusBar ) However, when the game opens it is still displayed for half a second before going away. Is there a way to have it gone before the app loads?

  3. The app I am making is geared towards toddlers and young kids. I had my 3 year old son test it today. It worked pretty well, but there were times when one finger would be touching part of the screen on accident, so when he went to push a button with his other hand, nothing would occur. I dont want multiple actions to go off at once, but I also dont want a finger touching part of the screen to stop the action. Is there anyway around this?

I think that is it for now. Any input would be greatly appreciated!

Thanks,
Scott [import]uid: 79834 topic_id: 17409 reply_id: 317409[/import]

Hi Scott,

  1. That sounds very odd - I haven’t seen this happen. Black should always be black. What kind of computer are you using and which iPhone? What version of Corona?

  2. Put this line inside plist in build.settings;
    [lua]UIStatusBarHidden=true[/lua]
    That will fix it :slight_smile:

  3. Not really, it’s just about design if enabling multitouch is something you don’t want to do. That said maybe someone else who has also developed apps for young kids might have some new ideas on this.

Peach :slight_smile: [import]uid: 52491 topic_id: 17409 reply_id: 65915[/import]

Thanks for your help Peach!

  1. I believe the screen is dimming when the box indicating it is a trial is popping up, then it is not going back to full brightness for some reason. Is there a way to control the brightness within the program? Its an iPhone 4s.

Actually I just went in and messed with the brightness on the phone. If I turn up the brightness in my settings and turn off Auto-Brightness it looks fine. For some reason the Auto-Brightness is setting it dimmer than it should be. Anything I can do about this?

  1. Thanks!

  2. I’d like to try and enable multitouch to see what would happen. When I tried to though and built it for the iPhone the app would not open. What do I need to do to make multitouch work?

Thanks,
Scott [import]uid: 79834 topic_id: 17409 reply_id: 66183[/import]

Hey Scott,

  1. I haven’t heard about this issue before however I will bring it up in our next meeting just to be on the safe side.

  2. No worries :slight_smile:

  3. Put this line near the start of your app;
    [lua]system.activate( “multitouch” )[/lua]
    That should work fine but if you have any issues let me know.

Peach :slight_smile: [import]uid: 52491 topic_id: 17409 reply_id: 66220[/import]

Thanks again Peach for all of your help! I enabled multitouch this time and it is working great for what I need. There were a few little glitches that I am working on fixing since enabling multitouch and most I have now solved, but one I am struggling with and I am guessing there is a simple solution.

So I have a swipe function and here is some of the coding (just did post the other direction if statement):

local function swipe (event)

if event.phase == “began” then
startPos = event.x
end
if event.phase == “ended” then
dragDistance = event.x - startPos
if dragDistance > 150 then
move = 0
background:removeEventListener(“touch”,swipe)
Runtime:removeEventListener(“enterFrame”,move)
button1:removeEventListener( “touch”, drive )
button2:removeEventListener( “touch”, lift )
cleanSounds()
director:changeScene( “zone”,“moveFromLeft” )
end
end

background:addEventListener(“touch”,swipe)

Swipe is attached to the background image as a touch event. It functioned fine with single touch, but what’s happening now is that when I touch the left side of the screen with one finger, then touch the right side of the screen with the other, and then lift the right finger, it is calling on this function. Also, this slides me to the next screen and as soon as I lift my left finger, it immediately slides me back to the first screen. I just want to be able to swipe one finger to go to the next screen. What can I do? Hopefully this makes sense.
As far as the (1) problem goes, I’m working around it. But I do notice in the xcode console that it says “unable to cancel system wake” Could this have something to do with it?

Lastly, one more new two part question, 1) I set my plist: UIApplicationExitsOnSuspend = false. I want it to resume when it suspends, but I would like it to reset after a while (around 5 mins or so after suspension preferably. There is no way to get back to the title screen if it does not reset, because I do not want the child to be able to go back to it when using). Also, the resetting of the app will eventually activate the prompt to rate the app. (2) If the app did crash for any reason, is there a way to get it to restart on its own if it gets some sort of error?

Thanks,
Scott [import]uid: 79834 topic_id: 17409 reply_id: 66396[/import]

There’s no way to have the app in the background switch from resume to exit on suspend after a set amount of time, no.

For the crash, this also isn’t possible - because it crashes you aren’t running your code any more so it just can’t happen. (This is not a Corona limitation.)

For your swipe problem you may be able to rework your code, although without experimenting with it I can’t provide any examples. If you need a snippet written for you then premium support is the way to go; http://www.anscamobile.com/corona/support/

Peach :slight_smile: [import]uid: 52491 topic_id: 17409 reply_id: 66413[/import]