0

I am developing a chat app in Android which runs in all versions of Android ( starting from 2.3.5 to the latest kitkat) and every thing is working fine when it comes to chatting, but I am facing one BIG issue.

The issue is when I generate the apk and install the apk in Android mobile (using package installer), the user goes offline in some time ( say in XYZ mins ).In S3 it is 40 mins and in S5 it is 30 mins and in htc desire hd it is 20 mins after which the user is disconnected.

But when I install the same app using Eclipse to an android phone, the user is online ( as I am checking the status of the XMPP connection every 5 seconds and reconnecting if there is a disconnect to the ejabberd server even after 1 day which is as expected)

I am terribly confused as whether I am doing something wrong when I generate apk from the Android project. But not to my knowledge.

If anyone can shed some light on this blocker issue I will be really greatful.

I am using asmack library and the version is asmack-android-8-4.0.4

Honestly I am not finding any issue with the ejabbered server nor with the ejabberd server.

Any pointers to solve the issue will be greatly appreciated. Please let me know if you need any additional info.

To summarize its the installation mode which is giving me issues and sleepless nights

Thanks

ligi
  • 39,001
  • 44
  • 144
  • 244
Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62
  • The difference in the two forms of the app is the key the app is signed with. One is a debug key and the other is your custom key. If you're using an API to perform anything in your app make sure the SDA or however youre identifying your app to the api is correct for both the debug and the release versions – Developer Paul Sep 24 '14 at 12:46
  • Thanks a lot Paul. I have taken care of this during the apk generation and the issue still persists. Thanks for your comments. – Timothy Rajan Sep 24 '14 at 17:38
  • possible duplicate of [asmack library behaving differently when installed from Eclipse vs installed from apk in Android](http://stackoverflow.com/questions/26037691/asmack-library-behaving-differently-when-installed-from-eclipse-vs-installed-fro) – Flow Sep 25 '14 at 12:15
  • Man the question you are linking too has no answer @Flow ,so what's the significance of reffering it? – nobalG Sep 25 '14 at 13:08
  • It's the same question (by the same author btw). The fact that it has no answer doesn't change that. – Flow Sep 25 '14 at 13:12
  • Thanks a lot @Flow. Yes. the question is the same. I was not sure whether the initial question which I raised was having more details for an Android (XMPP asmack) expert to answer. That is the reason I raised another question with more minor details. Hope I will be able to get a solution for this. Pulling my hair for the past few days and was not able to arrive at a solution. Thanks once again. – Timothy Rajan Sep 25 '14 at 20:57

0 Answers0