Peecho’s Cloud Print Button makes it easy to turn digital content into professionally printed products like photo books and magazines. It's not hard to add the button to your website and get started selling prints. But what about mobile? In this article, Willem Vermeer, our Senior Java Engineer and founder of our partner company MobPri, will elaborate on how you can leverage the Cloud Print Button in a mobile environment.
Deciding which technical approach works best for you
Adding the Cloud Print Button to an HTML WebView within the Android app
There are a few things to consider if you choose to add the Cloud Print Button to an HTML webview within your app. This is basically the same as adding the Cloud Print Button to a website. First, you need to know the characteristics of the document or image you'd like to print. Then, you can add an HTML snippet inside a WebView in one of your Android activities and you're in business. The button can be styled using your own CSS and therefore it can seamlessly fit into the design of our app. Surely this is the easiest and quickest way to accomplish the integration. You don't need to worry about APIs or other complex integration tasks and can focus on designing the remainder of your app - for instance, leading your customer through the creation of some form of digital content using the photos stored on their mobile device.
However, choosing this simple integration strategy has its disadvantages. When users click on the Cloud Print Button, they exit your mobile app and enter Peecho’s Checkout process- which in itself is not a bad thing- but it is a pre-defined process beyond your scope of control. If this presents a problem for your specific purpose, you’ll need to establish an integration at a deeper level. Luckily, Peecho provides you with the means to do so!
Native Integration of Peecho’s Cloud Print Button
The technical architecture of Peecho’s Cloud Print Button enables you to set up a native integration of the checkout process into your mobile app. This is best explained with an example. Suppose you want to develop an app which allows users to select a PDF from their mobile device and have it printed and delivered to a certain address. Let's assume that the user knows the number of pages and the dimensions of the PDF. Knowing the document’s characteristics, you can invoke Peecho’s checkout API and ask the API to suggest a list of matching print products. Users select the print product (hardcover, glossy paper, etc.) of their liking and are subsequently presented with a (native) form to fill out their address details. Since you're building a native app, you can use the Contacts API to let the user select an address from their contacts database. Peecho’s checkout API is built in such a way that the information you're collecting during this process is added to a temporary order using a simple JSON data flow. Having done this, you present your users with a confirmation page and proceed to the payment page.
After a successful payment, you can thank your customers for their order and invite them to share their Peecho experience with their friends on social media.
Which approach would work best for you? Share your thoughts with us in the comments and contact us if you’d like more information about integrating your app with Peecho’s API.