Learn How to Display a PDF File in Your Mobile App from a Database

We are often asked about displaying a PDF file in a mobile app. In this tutorial, you’ll learn how to display a PDF file uploaded to the Appery.io cloud database in your mobile app.

First, upload the PDF file into the Files collection of your database. You can use any existing database or quickly create a new database.

 

filesCollection_upload

Appery.io Database Files collection

Read the rest of this entry »

Development Tip: Creating App Routing for an AngularJS Apps

routingConfiguring your app routing is really easy with the Appery.io Routing tab. You can find it under Project > Routing. When creating a new page, a route for it will be created automatically. You can then change its name or select needed dependencies, which is really convenient.

Then, in your code, you can get to that page using Route name this way:

Apperyio.navigateTo("Screen2");

Routes with dynamic parameters are available as well. You can find out more about it (and, generally, about the Appery.io routing feature) in our documentation.

Make sure to check out all of our mobile development tips.

Do you want to build apps fast? Start developing with our trial plan!

How to Install and Use the Cordova Background Plugin for Route Tracking

Every Appery.io app comes with the Apache Cordova library automatically installed. This means you have access to default Cordova APIs such as Camera, Contacts, Geolocation, and more. Many users also wanted to add 3rd-party Cordova plugins to the app. To make this process very simple, we’ve added a simple wizard. In this tutorial you are going to learn how to upload a Cordova plugin to your app and use it. You will build an app that will track your route and draw it on a map. The app will do this in the background. (This is a popular feature in fitness apps.)

Read the rest of this entry »

PayPal Secure Payments for Your Ionic & AngularJS App

paypal_logoPayPal API is one of the most popular Appery.io plug-ins, and now it’s also available for Ionic & AngularJS!

Our users have frequently requested the ability to add payments to their Ionic & AngularJS mobile apps more quickly, for example, to create an online shop. Now, with the help of this plug-in, you could build an online shop (for instance) to be used by your Ionic & AngularJS app really easily.

A few notes about the security implemented in this app:

  • Authentication with PayPal occurs via a Server Code script. It takes your PayPal app credentials and sends XHR to PayPal. The token is stored to the database.
  • By using the Secure Proxy feature, the actual token value will be substituted on the server side. This way any PayPal API can be triggered.
  • Because of the server-based authentication, sensitive data such as the client secret or token value will never be shown in the app, which eliminates the possibility of theft.

Finally, a few, more general, notes:

  • The flow implemented in this plug-in is similar to PayPal’s flow.
  • We have a PayPal API plug-in tutorial here. Check it out to configure the plug-in.
  • The plug-in is configured for a test environment, so use the PayPal guide too see what you need to do when going live.

Development Tip: Managing Your App Images With Media Manager

media_manager

The Media Manager allows you to work with image files in the App Builder. You can upload, rename, and delete images, as well as select them as assets for the Image component. You can open the Media Manager by clicking “additional menu” (the “three lines” button) in the upper-right corner of the builder and select “Media Manager”:

media_manager_icon

Opening the Media Manager

For example, you can upload your image through the Media Manager and use it as a custom page background via CSS (don’t forget to add the appropriate CSS class to the page):

.background
{
    background-image: url('../files/images/background.png');
}

Learn more in our documentation, and make sure to check out all of our mobile development tips.

Do you want to build apps fast? Start developing with our trial plan!

Development Tip: Displaying and Centering a Spinner in an Ionic App

With Appery.io and Ionic, you can easily add a spinner to a page:

  1. Drag’n’drop the spinner component to a page.
  2. Provide an expression for ng-show in the properties panel. It could be a variable that returns true or false.
  3. To vertically and horizontally center the spinner do the following:
    1. Add a centered-spinner class to Class in the properties panel.
    2. Create new CSS by going to CREATE NEW > CSS > Create CSS.
    3. Add the following code to create the CSS file:
.centered-spinner {
    width: 28px;
    height: 28px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -14px;
    margin-left: -14px;
}

.scroll
{
    height:100%;
}
spinner
Ionic spinners

Your spinner is ready to use! Don’t forget to change the variable provided for ng-show to true when you need to show the spinner, and to false when you need to hide it.

You can find related information here or here.

Make sure to check out all of our mobile development tips.

Do you want to build apps fast? Start developing with our trial plan!

How to Build a Mobile Chat App with Ionic, Server Code and EventSource API in Appery.io

The Appery.io platform comes with many visual tools to help you build your mobile app fast. We understand that there are cases where you need to go beyond visual tooling and be able to customize your app with code. There are a number of ways to do that in Appery.io.

  • You can write any custom JavaScript code in the app (client). You can also include any 3rd party libraries.
  • With Appery.io Server Code you can develop any custom logic on the server, also using JavaScript. This logic is automatically exposed via a REST API. That’s like creating a custom API on the fly.

In this tutorial we are going to show you how to combine the visual tools with custom code to build a chat mobile app. In particular, you’ll learn how to use EventSource API to receive server-sent events and create a simple chat application. The app will be based on the Ionic Framework and also use Server Code script. The app looks like this:

IonicChat

Chat app

 

Read the rest of this entry »

Development Tip: Coding Less With Function Snippets

snippets

There’s a set of time-saving snippets available to you when you’re writing app logic in AngularJS. They are located on the right side of the function editor window.

For example, you can generate REST service-invoking code by clicking on “Invoke service” snippet. Then, all you need to do is change the "service_name" to your actual service name.

Another popular snippet is “Open modal page” – the snippet will generate code to open the modal and modalOptions object as well.  As with the “Invoke service” snippet, you’ll have to change modal_name to your modal name. Then you can execute this function when needed (on button click, for example) and the modal will be opened.

Make sure to check out all of our mobile development tips.

Do you want to build apps fast? Start developing with our trial plan!

Development Tip: Adding Cordova Plug-ins To Your App

import_cordova_plugins

With just a few quick steps, you can easily add any 3rd-party Cordova plug-in to your Appery.io app:

  1. Go to the Github page of the plug-in and download the latest stable version by clicking “Download ZIP.” It’s important to download the latest stable version.
  2. Go to Resources > Cordova plug-insand click Import Cordova plug-in, then: Choose file, locate the downloaded file and click Import plug-in The plug-in will appear under Cordova plug-ins

To manage all of the Cordova plug-ins for a particular app, go to Project > App settings > Cordova plug-ins and you’ll see the list. You can quickly enable or disable any plug-in.

Learn more in our documentation, and make sure to check out all of our mobile development tips.

Do you want to build apps fast? Start developing with our trial plan!

Deadline Coming Up for the 10th Developer Economics Survey

Developer Economics

UPDATE: The deadline has been extended to Dec. 6 by the organizers.

The new Developer Economics survey is almost over! The last day, November 27th, is only a week away. Developers, don’t miss out on this opportunity to voice your opinions on the trends and top development issues of the day.

Read the rest of this entry »