davo Posted July 9, 2015 Share Posted July 9, 2015 We're doing a rapid development project as a proto type using an android app and processwire as the back end. In essense the app captures some data and then needs to send it to a server. It will be a short list of strings and integers along with an image. Both the app and the backend database have been built to show the concept but just to tidy things up we're looking at showing the data moving from one to the other. Does anyone have any simple ideas? I've thought about using the email to page module by getting the app to send the data to an email address along with the image and then allowing pw to pick it up. I've also thought about ways of using JS calls to the api Just looking for ideas to demo it working. Link to comment Share on other sites More sharing options...
gebeer Posted July 9, 2015 Share Posted July 9, 2015 I am working on a similar scenario where mobile clients are sending and getting data to/from PW. My approach was to implement a RESTful service. I am using clsource's REST helper class and it is working fine. But it is not really a simple solution. There also is Ryan's Pages Web Service module. But I'm not sure if you can use it to push data from the client to the server. Link to comment Share on other sites More sharing options...
Sergio Posted July 9, 2015 Share Posted July 9, 2015 Just a brainstorm here: maybe have the mobile app talk to a Firebase database via json, and PW could talk to it, parse the json and store in the MySQL db? https://www.firebase.com/docs/rest/ https://github.com/ktamas77/firebase-php Link to comment Share on other sites More sharing options...
Pete Posted July 9, 2015 Share Posted July 9, 2015 Email isn't a bad idea - could just save the data to a JSON array and sent via email as a text file and read it in that way via a script and a cron job if the data is more complex than email to page will handle. Link to comment Share on other sites More sharing options...
LostKobrakai Posted July 9, 2015 Share Posted July 9, 2015 Just a brainstorm here: maybe have the mobile app talk to a Firebase database via json, and PW could talk to it, parse the json and store in the MySQL db? Isn't that kinda overkill to go though a second database to get things into the pw database? I'd also vote for a simple rest api endpoint. They are not to hard to create even by hand. At least as long as one doesn't need more than basic authentication. Link to comment Share on other sites More sharing options...
davo Posted July 9, 2015 Author Share Posted July 9, 2015 Thanks guys. I'll do some research into each of those methods and see what I can do. It's only for a prototype to prove the concept so authentication isn't a real issue... The model is likely to go to a bespoke developer once proved. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now