How can I connect the app for Google apps with my Android?

I have an application deployed to Google App Engine .. It has a registration form. now I made a registration form in my Android application and I want it to click a button ... it should be sent to the application in the Google App Engine, and it should be saved in a specific db ...

someone told me to use the HTTP request and response method, but I don't know about that. can someone please give me some code example or something else .....

thanksss ....

+3
source share
1 answer

You did not indicate whether you are using Python or Java.

, . Google App Engine. Java , . . Java EE. - (SOAP, RESTful) , , . Google .

, POST. , ( GAE) - :

public void doPost(HttpServletRequest request, 
        HttpServletResponse response) throws ServletException, IOException {

      String value1 = request.getParameter("value1");
}

Android - :

DefaultHttpClient hc=new DefaultHttpClient();
ResponseHandler <String> res=new BasicResponseHandler();
HttpPost postMethod=new HttpPost("http://mywebsite.com/mappedurl");
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();  
nameValuePairs.add(new BasicNameValuePair("value1", "Value my user entered"));  
postMethod.setEntity(new UrlEncodedFormEntity(nameValuePairs));  
String response=hc.execute(postMethod,res);

, 1 " , ".

EDIT: Google Google Cloud Endpoints - RESTful- App Engine Android , App Engine, , , .

+13

All Articles