Phonegap App closes automatically

  • 1
  • Problem
  • Updated 8 years ago
Hi Team,

I've a very simple / minimal code phone gap application. I'm sharing the tweets on twitter by using child browser concept,

While trying to tweet the second time, app closes itself / exists automatically. No exception is thrown.
Same situation happens for other operations also.

I am checking my application with both android and iOS.

I'm really stuck. Any help / idea is highly appreciated!

Thanks,
Prasad.
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Can you try running logcat, or looking at the iOS console, to see if any error messages are being logged?

You can download apps to do both; for example, here is an Android logcat reader:
https://play.google.com/store/apps/de...

and here is one for iOS:
https://itunes.apple.com/us/app/conso...
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes
Hi Andrew Lunny,

I am facing one more issue in iOS from the last few days,

While I run my application first time in iOS, at that time values(What I received from server) are showing perfectly. But after doing any changes at application that page wont show new(current) values still showing that old values only but server giving new values.

if I reinstalled that application in that device means its showing new(latest) values, if I changed any it wont show new values.

Same application working fine and perfectly in android.

Do I want to refresh ? or is there any solution.

please give any solution , it is very help full for me.

Thanks,
Prasad.
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes
Hi Andrew Lunny,

Still I didn't clear that problem,While I run my application first time in iOS, at that time values(What I received from server) are showing perfectly. But after doing any changes at application that page wont show new(current) values still showing that old values only but server giving new values.

Please give any solution for my problem.

Thank you,
Prasad.
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Your app might store server's data somewhere. You might want to clear that cache (localStorage, WebSQL, Cookies?) each time the app runs.

-Amir
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes
Hi Amir,

Thank you for your kind response.

Thank you,
Prasad.
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes
Hi Amir,

I cleared cache, again its behaving like that only.

Actually, While I logged in another account its showing corresponding that account details, but if I changed any thing at that account details that time it doesn't changed at that page, but updated in database perfectly.

I am unable find out that problem, where i did mistake.
Please help me amir, I am struggling from past few days.

Thank you,
Prasad.
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hi Gudluri

Unfortunately, I am unable to help with your programming problems. You might want to ask the same at stackoverflow or subscribe to our dedicated support below:

http://phonegap.com/support

Cheers
-Amir
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes
Amir,

Thank you for kind response.

Thank you,
Prasad.
Photo of gudluri siva

gudluri siva

  • 62 Posts
  • 0 Reply Likes
Hi Team,

Solution for that above problem.

It was solved using this:
$.ajax({
url: yourUrl,
type: 'GET',
data: yourData,
cache: false, //Clean your cache
success: function(data){
//Do stuff
}
})

Thank you,
Prasad.