What is the step I should do for the log in

Hi everyone, I am new to corona development and i found corona is easy and fast to use. But I got some problem with the design.

My application need to connection to a website, then sign up as new user or log in to the website. Then return something from the website to indicate user have log in.

What is the steps I should do? Anyone have sample for me to reference?

If you are not using Corona Cloud for user registration / sign in / log in, then you want to look into network.request API:

http://docs.coronalabs.com/api/library/network/request.html

Naomi

Thank Naomi. I have already read that, just I am not sure how I should start. Anyway thanks, I will do further study on that. =)

Hey, @pukch21, the first time I set out to work on network request API, what I did was to post a couple of variables to web service (php script).  I wanted to make sure my app can talk to my web service and get some response back.  Once I sorted out that extremely basic bit of mechanics, everything else naturally came together without much trouble (and mind you, I’ve never coded php before, let alone creating and working with database tables before I started working on it, and in fact, I had to pick up a book on PHP and MySQL to get started.)  So… you might just want to try some super simple network request and elaborate upon it?

Naomi

May I recommend:

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

Ah, yes, Rob, that is an excellent tutorial.

Naomi

Thanks :slight_smile:

@Naomi and @Rob Thanks for the help!!  :slight_smile:

One question: If I use system.openurl to open browser, is there any control that I can close the browser?

No.  Calling system.openURL backgrounds your app and foreground’s the apps’s browser.  The app user has to re-activate your app to bring it back to the foreground.

However, this is the job for a native.newWebView() API Call.  It runs within your app as part of your app and you can intercept link taps and do things with them.

Okay, Thank you Rob =)

If you are not using Corona Cloud for user registration / sign in / log in, then you want to look into network.request API:

http://docs.coronalabs.com/api/library/network/request.html

Naomi

Thank Naomi. I have already read that, just I am not sure how I should start. Anyway thanks, I will do further study on that. =)

Hey, @pukch21, the first time I set out to work on network request API, what I did was to post a couple of variables to web service (php script).  I wanted to make sure my app can talk to my web service and get some response back.  Once I sorted out that extremely basic bit of mechanics, everything else naturally came together without much trouble (and mind you, I’ve never coded php before, let alone creating and working with database tables before I started working on it, and in fact, I had to pick up a book on PHP and MySQL to get started.)  So… you might just want to try some super simple network request and elaborate upon it?

Naomi

May I recommend:

http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/

Ah, yes, Rob, that is an excellent tutorial.

Naomi

Thanks :slight_smile:

@Naomi and @Rob Thanks for the help!!  :slight_smile:

One question: If I use system.openurl to open browser, is there any control that I can close the browser?

No.  Calling system.openURL backgrounds your app and foreground’s the apps’s browser.  The app user has to re-activate your app to bring it back to the foreground.

However, this is the job for a native.newWebView() API Call.  It runs within your app as part of your app and you can intercept link taps and do things with them.