My android app exit after starting if there is no network ?

Team,

After implementing " Tutorial: “Android-izing” a Mobile App" as shown in the link below and including the license part in my app. I noticed the following :

  • my app exits if there is no network .

As I understand the app checks the license every time it stats and exit if there is no network or no valid license. Is this normal behavior for all apps ? how to solve it for places with weak network coverage specially inside home.

Please advice.

http://coronalabs.com/blog/2013/03/26/androidizing-your-mobile-app/

Abdulaziz

Our tutorials are not designed to cover every possible combination of results and usage.  They provide a simple “how to do this” and it’s up to you to figure out what you  need to do for your specific needs.

In this case, that tutorial doesn’t take network connectivity into consideration.  You need to decide how best you want to handle no network vs. making sure you’re licensed.

Rob

Thanks Rob for your reply.  :slight_smile:

I know the tutorials cant take every possible combination of usage but the idea of this forum is to share knowledge and issues which many people can benefit from. Also it can be considered as areas to improve any tutorials or knowledge in Corona world ( example is your tutorials about ultimate config file, then one comes after it : modrenzing it :slight_smile: )

i really appreciate your effort and tutorials in Corona as i learned a lot from your great work. 

Abdulaziz

Hi All,

 

any one has come across this scenario and can advice.,.

 

thanks

Abdulaiz

Have you checked your console? If not tgen find article about corona basic debuging

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

I have checked the console… the message is clear there is no network, actually I have disconnect my data network just to simulate the situation  I got   “Pirates: Walk the Plank!!!”"

Is this something I should worry about  ? or just normal behavior…

thanks All

Abdulaziz

That sounds like you took the code from the Licensing tutorial and implemented it without adapting it to your needs.  Tutorials are there to get you started and by default if it can’t talk to the licensing server it exits.  But if your app needs to run when there is no network connection, you  have to decide how to handle that.

thanks Rob,  I will try to find out what is going on.

Our tutorials are not designed to cover every possible combination of results and usage.  They provide a simple “how to do this” and it’s up to you to figure out what you  need to do for your specific needs.

In this case, that tutorial doesn’t take network connectivity into consideration.  You need to decide how best you want to handle no network vs. making sure you’re licensed.

Rob

Thanks Rob for your reply.  :slight_smile:

I know the tutorials cant take every possible combination of usage but the idea of this forum is to share knowledge and issues which many people can benefit from. Also it can be considered as areas to improve any tutorials or knowledge in Corona world ( example is your tutorials about ultimate config file, then one comes after it : modrenzing it :slight_smile: )

i really appreciate your effort and tutorials in Corona as i learned a lot from your great work. 

Abdulaziz

Hi All,

 

any one has come across this scenario and can advice.,.

 

thanks

Abdulaiz

Have you checked your console? If not tgen find article about corona basic debuging

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

I have checked the console… the message is clear there is no network, actually I have disconnect my data network just to simulate the situation  I got   “Pirates: Walk the Plank!!!”"

Is this something I should worry about  ? or just normal behavior…

thanks All

Abdulaziz

That sounds like you took the code from the Licensing tutorial and implemented it without adapting it to your needs.  Tutorials are there to get you started and by default if it can’t talk to the licensing server it exits.  But if your app needs to run when there is no network connection, you  have to decide how to handle that.

thanks Rob,  I will try to find out what is going on.