Kindle - unable to handle incoming call interrupt

I submitted my first App to Amazon and got this back from them:

“Device:Motorola Droid 2.3.4 The app is unable to handle the incoming call interrupt gracefully; app crashes on receiving a call interrupt. Please follow the steps to reproduce: 1. Launch the Application 2. Tap on the Start button. 3. Tap on Tap to Continue. 4. Make call interrupt. 5. Observe that application exits after call interrupt.”

Two questions:

  1. How do I fix this problem? I would love to make it available for all devices. I do not have any android phones for testing.

  2. If I can’t fix the problem programmatically, will changing the form factor to “Tablet” from “Phone + Tablet” in the metadata at least allow the App onto the Kindle?

I don’t know if it’s relevant, but I have an onSuspendResume event with the following code. It doesn’t actually serve any purpose any more that I can remember, but I’m hesitant to make any changes unless necessary.

[code]
local function onSuspendResume(event)
if “applicationSuspend” == event.type then
tSuspend = system.getTimer()
elseif “applicationResume” == event.type then
tPrevious = tPrevious + (system.getTimer() - tSuspend)
end
end

Runtime:addEventListener(“system”, onSuspendResume)
[/code] [import]uid: 99903 topic_id: 22179 reply_id: 322179[/import]

have you added this in build.setting ?

UIApplicationExitsOnSuspend = false [import]uid: 12482 topic_id: 22179 reply_id: 88259[/import]

From what I’ve read, that variable affects iOS builds. I’m not seeing an Android/Kindle equivalent in the corona documentation. I could be wrong.

Also, I’m using corona build 715, if that matters. [import]uid: 99903 topic_id: 22179 reply_id: 88373[/import]

why not to give it a little bit try and chk i think that will work
:slight_smile: [import]uid: 12482 topic_id: 22179 reply_id: 88566[/import]

I am unable to reproduce the problem Amazon mentioned in the Android Simulator (which is a royal pain to use). Adding “UIApplicationExitsOnSuspend = false” had no effect on the simulator, but I’ve tossed the new apk at Amazon anyway. We’ll see what happens.

I would really appreciate a second and third and fourth and etc opinion on the matter. Surely someone has encountered this problem before! [import]uid: 99903 topic_id: 22179 reply_id: 88682[/import]

weird… first time i hear this.
will get back to you asap
c
[import]uid: 24 topic_id: 22179 reply_id: 88692[/import]

Amazon had this to say about my newest build, incorporating UIApplicationExitsOnSuspend = false:

“Device: Galaxy Tablet (2.2),HTC Evo (2.3.3) Device: Motorola Droid (2.3) Issue: The app is unable to handle the incoming call interrupt gracefully; app exits on receiving a call interrupt. Please follow the steps to reproduce: - Install and launch the application. - Tap on the Start and Tap on the continue. - Proceed to the game and received call interrupt. - Observe that the application exits on receiving call interrupt.”

The fact that UIApplicationExitsOnSuspend = false did not improve the situation is not really surprising. I’m back to square one with this app. [import]uid: 99903 topic_id: 22179 reply_id: 89210[/import]

After resubmitting the app for tablets only I got this back from Amazon:

“Comments: If the user receives and ends an incoming voice call while playing the game, the user cannot control the game character. Note: On the HTC Incredible, the user is unable to shoot, but is able to move the character. Steps to reproduce: 1. Launch the application 2. Select ‘Start’ and proceed through a level of the game 3. Receive and end a voice call while the application is running 4. Notice when the voice call is ended the user is not able to control the character Result: Fail SR-03”

I suppose the Amazon testers don’t pay enough attention to the “Form Factor” field in the metadata. Either that or some phones are considered tablets.

This silence from Corona staff is unnerving. Is there any word as to a solution? Or am I doing something wrong? Is the problem being worked?
[import]uid: 99903 topic_id: 22179 reply_id: 90551[/import]

I continue to wait for some news pertaining to this problem. [import]uid: 99903 topic_id: 22179 reply_id: 93601[/import]

Sorry swamped with iPad stuff - i think UIApplicationExitsOnSuspend is iOS only.

If there is not enough memory left on the device, android will kill the app.

c. [import]uid: 24 topic_id: 22179 reply_id: 93646[/import]

The “UIApplicationExitsOnSuspend” is an iOS setting only. All Corona Android apps automatically suspend when an incoming phone call is received or if you press the Home button. The app will only exit when you press the Back button on the app or if the Android OS does not have enough memory to switch to another app, such as when receiving a phone call (adb logcat would indicate this).

What version of the Corona SDK are you building with?

Older versions did have a crash problem if you’ve set up a Lua listener for system events such as suspend/resume/exit. This was fixed by release version 704.
[import]uid: 32256 topic_id: 22179 reply_id: 94532[/import]

I’m building with version 715.

The only Android hardware I have for testing is a Samsung Galaxy Tab 10.1, and I have yet to encounter a crash with any of my test builds. I tried reproducing the problem with the android emulator. I used telnet to simulate an incoming phone call. After each phone call was ended, the emulator returned to the home screen. Clicking the app icon launched the app to where it was when the interrupt occurred. That is to say, the app did not seem to lose its current state during the phone call. I’m not sure whether this constitutes an exit or a suspend.

I don’t remember off the top of my head, but the app uses something like 20MB of texture memory. I’m not sure how to test for the total memory used. What is a reasonable upper limit for memory use to avoid this problem? How much memory do other typical, successfully submitted apps use? [import]uid: 99903 topic_id: 22179 reply_id: 94573[/import]

20 MB of texture memory is not a lot. Your app should be fine.

Since you and I cannot reproduce the issue that Amazon is citing and we have no open bugs on this issue, then I’m going to have to conclude that Amazon has misinterpreted the results. Either they did not recognize that your app was resumed or some other app on Amazon’s device was exited and they mistakenly thought it was yours.

I would recommend that you just resubmit your app to Amazon again. [import]uid: 32256 topic_id: 22179 reply_id: 95240[/import]

Have the exact same problem + rejection from amazon…i have the listeners in place and everything works perfectly on iOS…not so with android apparently. additionally, I kinda failed to arrive to a conclusion after reading this post…

@dyson122, what did you end up doing? did you just resubmit and hope amazon won’t catch it? how did it turn out?

@Joshua Quick, is that really your recommendation? not trying to be cynical, i just want to be 100% sure before i resubmit.

i suppose i can check the texture memory, but im pretty sure its not a lot…simple app.

any advice appreciated

thanks

niko [import]uid: 34595 topic_id: 22179 reply_id: 109707[/import]

bump [import]uid: 34595 topic_id: 22179 reply_id: 109750[/import]

Niko,

The issue dyson is talking about here is that his suspend/resume listeners do in fact work on Android when he tested it, but Amazon claimed that his app exits instead of suspending. The key thing here being that neither dyson nor I were able to reproduce the issue Amazon was citing.

Niko, if your suspend/resume listeners are not being invoked on Android when you test it, then you’re probably facing a different issue. My advise to you is to try running sample app “Hardware\SystemEvents” on your Android device and see if that works for you, then isolate it within your own app from there. [import]uid: 32256 topic_id: 22179 reply_id: 109753[/import]

If it helps, I’m pretty sure Amazon doesn’t particularly care how many times you resubmit your app. At least it never came up when I was trying to solve this problem.

I never did solve the problem. I set my app to run on “Tablets” only instead of “Tablets and Phones,” and left it at that. I sure do wish I had been able to get it to work on both Tablets and Phones, though; even restricted to tablets I’m getting as many sales on the Amazon store as I am on Apple’s App Store. (And I’m getting vastly more sales than both combined from the original version developed with GameSalad for the Mac App Store. I’m sure looking forward to Corona Mac App development!) [import]uid: 99903 topic_id: 22179 reply_id: 109781[/import]

I’m having this EXACT same issue! My game functions as it should. Upon exit it saves any unsaved data. So a phone call would be exiting the app and need to save stuff. Any better solution to this other than having to set it to “phone” only? Thanks for any help [import]uid: 46082 topic_id: 22179 reply_id: 137350[/import]

I’m having this EXACT same issue! My game functions as it should. Upon exit it saves any unsaved data. So a phone call would be exiting the app and need to save stuff. Any better solution to this other than having to set it to “phone” only? Thanks for any help [import]uid: 46082 topic_id: 22179 reply_id: 137350[/import]

(looked for this info everywhere, not clearly listed in the documentation that I could find)

Joshua, would you verify/clarify these questions regarding Android?

  1. The onSuspendResume function (listed above) has no effect (because it’s built-in Corona to automatically suspend on phone calls, etc.)?

  2. There is no Android code for the IOS “UIApplicationExitsOnSuspend”?

Thanks. [import]uid: 40033 topic_id: 22179 reply_id: 141219[/import]