1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    fancyoung is on a distinguished road

      0  

    Question How to "login" when use Sencha-Touch + phoneGap?

    How to "login" when use Sencha-Touch + phoneGap?


    I have some confrustion when I dev a web app with Sencha-Touch and phoneGap.

    1. Does it means we must use JSON-P instead of JSON?
    (because it is a app, so it has the cross-domain problem)

    2. What is the best approach if the server is RESTful(request and get JSON response)?
    I saw we need rewrite some server code(such as add "callback" param) if use JSON-P.

    3. How to manage auth such as login function?
    how does the session/cookie works in this app?
    Is there any example?

  2. #2
    Sencha User
    Join Date
    Aug 2010
    Posts
    303
    Vote Rating
    3
    steve1964 is on a distinguished road

      0  

    Default


    Hi, you can use json, no need to use jsonp. When you package an app with Phonegap there is no cross domain problem because you haven't a "starting url". I suggest to use server side session variable, is what i do. Once you login you can check the validity of the session variable at every ajax call. If you dont have ajax call after login just check the validity of session variable at regular interval (setInterval) with a an ajax call to the server.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    28
    Vote Rating
    0
    Shariar Shaikot is on a distinguished road

      0  

    Default I am also facing same problem

    I am also facing same problem


    Hello,
    I am facing same cross domain ajax problem.
    When I am sending a ajax request to a server after package up the app with phone gap
    But no response returns.

  4. #4
    Sencha User Sameer Khan's Avatar
    Join Date
    Oct 2011
    Location
    Bangalore, India
    Posts
    113
    Vote Rating
    0
    Sameer Khan is on a distinguished road

      0  

    Default Hi, Ext.Ajax.Request

    Hi, Ext.Ajax.Request


    Ext.Ajax.reqeust() ..restricted to do cross domain communication...So use JSONP or JSON but not Ajax.request()
    Sameer Khan

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar