1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Toronto, Canada
    Posts
    25
    Vote Rating
    1
    burrellramone is on a distinguished road

      0  

    Default Answered: Native Android Packaging With PHP Files

    Answered: Native Android Packaging With PHP Files


    I am curious to know how does packaging an application that uses back-end code works? I am currently developing an application that uses PHP to interact with a mysql database. Can such an application be packaged?

  2. PHP won't work because you won't have a web server to execute the PHP. You would have to send a call to a remote PHP file.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,399
    Answers
    3549
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    PHP won't work because you won't have a web server to execute the PHP. You would have to send a call to a remote PHP file.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    1
    Vote Rating
    0
    skogmo is on a distinguished road

      0  

    Default


    How exactly would one go by 'sending a call to a remote PHP file'? :-)

  5. #4
    Sencha User
    Join Date
    Feb 2010
    Posts
    356
    Answers
    15
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default


    i'm asking to me the same question

    How exactly would one go by 'sending a call to a remote PHP file'? :-)

    It means that whe have to put all the PHP url's in absolute mode: http://domain.com/any.php ??
    -------------------
    Manel Juàrez

  6. #5
    Sencha User
    Join Date
    Feb 2012
    Location
    Toronto, Canada
    Posts
    25
    Vote Rating
    1
    burrellramone is on a distinguished road

      0  

    Default Native Android Packaging With PHP Files

    Native Android Packaging With PHP Files


    Yes, the url has to be an absolute path to the server and you will likely have to use JSONP request to fetch data across domain. I have done it before and it has worked so it is possible.

  7. #6
    Sencha Premium Member
    Join Date
    May 2010
    Posts
    9
    Vote Rating
    1
    udesh is on a distinguished road

      0  

    Default


    You can use JsonP or Ajax with CORS support. JsonP can only do HTTP GET, whereas CORS can handle any HTTP method.

    - Eranga

  8. #7
    Sencha User
    Join Date
    Feb 2010
    Posts
    356
    Answers
    15
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default


    "burrellramone" or "udesh", do you have a little example about this ?

    thanks
    -------------------
    Manel Juàrez