Android, Drupal & DrupalCloud or Android-xmlrpc tutorial?

瘦欲@ 提交于 2019-12-12 08:18:10

问题


Does anyone know of a good tutorial for any of the above?

I need to send data to Drupal from and Android phone.

Data is stored in XML but can be converted to JSON easily.

Then it needs to be stored in a user's profile.

thanks


回答1:


I suggest you use the Drupal Views module to achieve this. It's a very powerful module which allows you to run complex queries on your database and produce output in virtually any format.

Here's some information about using Views and Views Datasource module to produce JSON data.

If Views Datasource isn't any use, then Views Bonus Pack module may be an alternative.

Hope that helps.




回答2:


THe reason DrupalCloud wasn;t working was due to my version of PHP 5.2.14.

The solution was to put the key values in double quotes as that is what JSON is expecting

bnvp[0] = new BasicNameValuePair("nid", "4"); 
bnvp[0] = new BasicNameValuePair("nid", "\"4\""); 

mPairs.add(new BasicNameValuePair("method", "system.connect")); 
mPairs.add(new BasicNameValuePair("method", "\"system.connect\"")); 

etc

Also, make sure all services modules are enable and the proper permissions are set.



来源:https://stackoverflow.com/questions/3813628/android-drupal-drupalcloud-or-android-xmlrpc-tutorial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!