Android, Drupal & DrupalCloud or Android-xmlrpc tu

2019-04-03 02:19发布

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

2条回答
不美不萌又怎样
2楼-- · 2019-04-03 02:58

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.

查看更多
倾城 Initia
3楼-- · 2019-04-03 03:05

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.

查看更多
登录 后发表回答