• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Different return in android and browser

Agashh

Lurker
Hello, I am creating a website and I want the user to log in the browser and app, but I don't how do this, because the return for each type of log are different now. Let me explain.

When logging through android, the return would be in the form of json (with the variables obtained from the User Database), however in the case of logging through the browser it would save the variables in session and redirect to the user's area (another return).

So I have two different returns if the user login through android and another if the user logging in via browser.

How do I deal with this problem?

Note: Using the MVC pattern, could handle this logging system using the same controller? (in case the same method post (URL))

Since now, thank you.
 
If you want user to have some data shared between web and android - the most common way is to save this data on your server. And both web and android will communicate with the server.
It is possible to use one controller method on the server side (post username and md5 password for example and return 200 on success)
 
Back
Top Bottom