java - How to work with woocommerce API in android without using PHP codes -
i'm developing app android woocommerce online shop. want work woocommerce api , authenticate http . searched on web , of programmers using php codes connect woocommerce api , gson php code. way gson woocommerce api directly in android code? i'm using android studio. tnx
there's no reason can't contact wc api directly android without needing go through php. return json object regardless of language use contact it.
the better question "why other programmers use php it?" , there 2 potential reasons it.
the first reason they're developing php platform they're never sending response onto android system they'd ever using php.
the second reason it's easier update php platform update android one. if find in situation need change how api calls work can't guarantee android platforms updated in time (because can never guarantee that) can easier have android contact own server passes call onto wc api.
for example of second scenario, let's assume you're contacting http://exampleshop.com change on using https everything. need contact https://exampleshop.com app still trying contact http://exampleshop.com , continue until receives app update. in situation, it'd easier have app contact http://yourserver.com , have server contact https://exampleshop.com app. way url , output remain constant , can make required changes on server quicker , doesn't rely on every instance of app receiving update. mean app customers won't ever see app breaking because of change in api.
Comments
Post a Comment