Mobile developers often face the need to upload binary files, such as images, to the database. For example, this could happen in an app like Instagram, where a user takes photos with the device’s camera and then publishes it to their followers. Of course, all the data — including images — should be stored in the database, so the user can sign in from any device and see his or or her feed.
Another possible case for uploading images is sending an MMS (multimedia message) from your app, which can be done via the Twilio API. Twilio accepts a direct URL to an image. A user takes a picture with the device and uploads it to the Appery.io database. Then, a direct image URL is passed to the Twilio API.
In Appery.io, there are three ways to upload files to the database :
We’ve created a plug-in for the first two of these, and, with it, you can quickly implement file uploading in your mobile Appery.io app. It consists of two pages – cordovaupload and webupload. The cordovaupload uses the Cordova file-transfer plug-in. To make it work, the app has to run on the device or via the Appery.io Tester app.
The webupload page uses the browser FormData API to upload a file. This approach can be used to test the app in the browser, which is faster than on the device without having to take a picture each time. The Web API can be also used to upload images taken via the camera on the device.
A quick note about configuring the plugin: the Appery.io database requires a sessionToken for uploading files to the database. To make the plugin simpler to use, it uses the Master Key. So, to configure this plugin, you should provide the ID of the database that will be used to store files and the Master Key instead of sessionToken.
However, please keep in mind that for security reasons, we recommend you use sessionToken instead of Master Key. You can learn how to implement user authentication and registration with Appery.io here.
This plug-in is configured out-of-the-box to work with the Appery.io database, but it can be modified to work with any other API provider that allows file upload. You will need to change the upload REST API and update any parameters.
As usual, we’ve prepared a detailed tutorial for this plug-in, which you can find here.
If you have any problems with this plug-in or with file uploading in Appery.io, contact our support and they will help you right away.
Originally posted on the Appery.io blog.
Happy New Year!
Get hackathon ready. This video shows how to build a complete HTML5/hybrid mobile app. This video was recorded as part of AT&T Bootstrap Week in preparation for the AT&T Summit 2015 in Las Vegas. The video shows:
Enterprises are adopting mobile technologies at an unprecedented rate. As Business News Daily recently reported, 1.3 billion workers will go mobile by 2015, and with that massive number, the need for enterprise mobile apps can only skyrocket.
With that increase, many mobile app developers will be called upon to create internal mobile enterprise apps. These apps have many requirements and considerations that differ from the typical app destined for the public app stores. In this article, we will take the top three challenges and share some tips on how to meet these challenges:
This 6-minute video shows how to build an Airport Status mobile app with REST API.
Service used in this app: http://services.faa.gov/docs/services/airport/
We just made it incredibly easy and fast to build enterprise mobile apps connected to Salesforce API with the Salesforce Mobile Pack for Appery.io. Appery.io has two plug-ins that make it super easy to connect to Salesforce:
A step by step tutorial shows how to import and use the plug-ins.
The Salesforce Contacts API Sample App has a complete app that allows to view and edit contacts in your Salesforce account. Use this app to learn how to use Salesforce API or as a starting for your app.
The Salesforce OAuth API has everything you need to get started. It includes a number of examples to get you started: using Salesforce API, using SOQL, and use Chatter API.
The Appery.io drag and drop visual app builder makes it incredibly easy to build or modify the app UI. You simply drag and drop components into the phone area. For example, editing the edit contact page from Contacts app:
You are not limited to what the plug-in provides. You can build any app UI using the visual editor and connect to any Salesforce APIs. Here is an example defining a service that connects to Salesforce:
Our guide shows in detail how to setup any Salesforce API service.
By combining the power of Salesforce and Appery.io dev. tools – we just made it super easy to build enterprise mobile apps entirely in the cloud. Visit http://appery.io/saleforce for a special promo code for Salesforce developers.
Now that we got the project, we are ready to build the UI.