API Express Now Available as a Standalone Version

Today we are introducing a new way for enterprise customers to get the benefits of using our API Express backend services.

API Express allows enterprises to quickly “mobilize” existing systems by making it easier to add RESTful APIs so that theses systems can easily be accessed from other applications including mobile or desktop apps. This enables the modernization of legacy systems without re-writing them. This is highly beneficial as many enterprises are still constrained by legacy applications that are not mobile friendly.

With API Express Standalone, enterprises are now free to deploy this service behind their own firewall, while still taking advantage of the rest of the Appery.io platform in the cloud. Enterprise customers will now be able to install API Express on demand using a Docker container. For more details about the configuration process and about installing see our documentation.

Learn How to Send an SMS with Twilio in 5 Minutes

Twilio is a wonderful communication as a service platform that allows sending SMS messages from your app via a REST API. In this blog post you will learn how to send an SMS message from the Appery.io Server Code in about 5 minutes.

  1. Sign into your Appery.io account (you will also need to have a Twilio account).
  2. Go to the Server Code page.
  3. Server Code has a built-in Twilio SMS plug-in. You just need to add it to your account. Go to the Plugins tab. You will see a list of Server Code plugins:

    Server Code plug-ins

    Server Code plug-ins

  4. Locate the Twilio plugin (Quickly send SMS message with Twilio) and click import. A script called Twilio_SendSMS that sends the SMS will be inserted in the Script panels. A library called Twilio_Base64_library that helps with authentication will also be inserted in the Library panel.
  5. Open the Twilio_SendSMS script:
    var accountSid = ""; //Your Twilio account sid
    var authToken = ""; //Your Twilio account token 
    var twilioUrl = "https://api.twilio.com/2010-04-01/Accounts/";
    
    var from = ""; //Your Twilio number
    
    var to = request.get("to"); //To phone number
    var body = request.get("body"); //Text of the message
    
    var XHRResponse = XHR2.send("POST", twilioUrl + accountSid + "/Messages.json", {
      "body": "To=" + encodeURIComponent(to) + "&From=" + encodeURIComponent(from) + "&Body=" + body,
      "headers": {
         Authorization: "Basic " + encodeBase64(accountSid + ":" + authToken),
         "Content-Type": "application/x-www-form-urlencoded"
      }
    });
    
    Apperyio.response.success(XHRResponse.body, "application/json");

    You need to set the accountSid, the authToken and your Twilio phone number. You can find this information in the Twilio console.

    Twilio SMS

    Twilio SMS

  6. Once you set those values you are ready to test the script. Switch to Script parameters tab.
  7. Add two parameters:
    1. to (that’s the number where the message will be sent)
    2. body (that’s the message)
      These are request parameters into the script (and the API) and are read on lines 9-10.
  8. Switch to Test tab and click the Save and run button.
Testing Twilio SMS API

Testing Twilio SMS API

And this is how it looks on the phone:

SMS message

SMS message

Once you tested the Server Code script, it can be quickly added to your app. Here is a video that shows how to import services into an app. Every Server Code script is also an automatically a REST API. To see the endpoint for this script switch to API information tab. To learn more about Server Code, check our the Server Code YouTube playlist where you will find many short videos.

Amazon AWS Updates for the Appery.io Development Platform

Heads up! As the new year starts, we will have to take down the development platform (App Builder) for two maintenance windows (times US Pacific).

BeginEnd
Jan. 2, 11pmJan. 3, 5am
Jan. 5, 1amJan. 5, 5am

This is all due to Amazon AWS updates that have to be performed. We will try to minimize the Appery.io development platform’s downtime as much as we can, but the downtime could last through the whole window for each window. Remember, though, all our Backend Services will continue to work without interruption during this maintenance.

Preparing for a Bright New Year with a New Release: December Update

To get a good start for the coming year, we’ll be rolling out a new release for this month. What will be in it?

Cordova Update

  • We will add two new libraries, JQM 5 and Angular 2.0, so it’s a big deal.
  • Now you will be able to export sources that are 100% compatible with Android Studio and xCode.
  • And even more: the structure of generated sources is even closer to that of Cordova than before.

iOS11 Support

Nothing to add here. Just enjoy.

Cordova Hooks Now Available

By popular demand, we have added support for Cordova hooks. If you are still not aware of just how useful this feature is, check this link.

Bug Fixes

We work hard every day on bug fixes to make the platform a smoother, more comfortable, and reliable place to work in. So, stick with us, and see you in the next year.

Happy Holidays!

The October Release Is Out!

Here are some highlights of what’s coming in our next platform update that rolled out on October 29th.

New API Express Components

We are happy to present two new components to make your work with API Express more efficient: LDAP and Email.

LDAP stands for Lightweight Directory Access Protocol. It is an application software protocol for enabling anyone to locate organizations, individuals, and other resources such as files and devices in a network, whether on the public Internet or on a corporate intranet.

The Email component allows you to send an email via API Express without using 3rd services.

Check back soon. Our documentation will be updated with more information and examples.

 

Maintenance Mode for Server Code and Database

From now on, when you need to upload or change some data in your database connected with your popular app built in Appery.io, you can simply turn on Maintenance Mode. You make changes while your users see a predefined message instead of a spinner.

You can find it on the Settings tab of the database. And the same feature is available for the Server Code too.

Import Big Database

And, while we’re talking about databases, now you can import and export much larger database collections!

Base64 Type for End Component

End Component has a new field, “Response type”, with three values: JSON, Binary, and Binary base-64. When you choose Binary base-64 for a component, the value of the Use as response field is a string in base64. Component End converts a base64 string into binary if Binary base-64 is selected.

Favicon

We know, some of our customers make apps not only for mobile devices but for publishing them on the Internet. Since our next release, you can add a favicon to your apps!

Bugs (less of them)

What update goes through without fixing bugs? So, yes. We fixed a large number of big and small bugs to make the platform better.

 

Putting Wi-Fi, GPS & Magnetic Positioning to Use in an In-door Navigation App

A top-notch asset management company with offices based in Asia, Europe, and the Americas cares about its over 20,000 employees. To translate into action its corporate social responsibility policy statements, the company wanted a mobile app to ensure comfortable and hassle-free in-door navigation across multi-story building facilities for its professionals with these requirements:

  1. Get real-time directions from the employee’s current positioning within a facility
  2. Browse floor maps while offline
  3. Find the closest facility

This global financial organization selected the Appery.io cloud platform to develop and launch this hybrid mobile app. Picking Appery.io was bolstered by the platform’s rich built-in functionality as well as the efficient teamwork in working with Appery.io.

Architectural pillars

The Appery.io mobile app architecture took into account overcoming GPS signal attenuation, possible Wi-Fi signal fluctuations, and local magnetic field deviations by implementing a combination of Wi-Fi, GPS, and magnetic positioning approaches. The app also used the offline synchronization supported by Appery.io API Express (built into the platform). In addition, the app brought together flat floor plans and geo-coordinates into navigable 3-axis maps.

Never get lost

The app was first distributed to the global asset management organization’s employees in Boston, MA, where it was a great success, enhancing the working environment in the office. And now, Global adoption by all the company’s offices is very near.

What about iOS 11 Support?

iOS 11 came out of beta on September 19th. But, don’t worry. The Appery.io team is close to putting the final touches on our full support for the new version of the iOS. As soon as it’s ready, we will be announcing it here. Stay tuned!

A Quick Note: GeoPoint Data Type Update

August Platform Update

Another month, another platform update! Here’s what’s on for the coming August update coming in a few days.

New Android Cordova Library

We have updated our Android Cordova library version to 6.2.2. This version will be selected automatically in new projects.

Also, we now support Android SDK tools 26.0.1. This means more features, more plug-ins available to import, and being able to export
Appery.io projects to the latest Android Studio.

Adding Limits on the Request Body Of Custom And Generated Services

Until now API Express services didn’t have a limit on request size, but we know that some of you really need this option. In this release, you’ll see this message if the body of the request is more than 5 MB:

{
"code": "AE018",
"message": "Body request max size is exceeded",
"status": "REQUEST_ENTITY_TOO_LARGE"
}

Ability to Order JS and CSS Files Inclusion

In previous releases of Appery.io JS and CSS files were executed by creation date. Yes, this was really annoying in some cases. Now you can go on the App settings tab, open Resources, and select the order of these files. For instance, simply drag the CSS3 file and drop it on the top of the list and this file will run before the CSS1 file if you like.

Extended Database Statistics

There are are a lot of different stats you might want to know about a database: longest requests, successful requests, error requests, information about collections with issues, selected operation, and much more! All of this data is now available on the Statistics tab of your database. Just look at the screenshot:

Ability to Create an Index for System Fields

Our users can already use system fields in their queries (a really useful capability). So for better performance, we have added a possibility to create indexes for system fields. Check it out!

Multi-Language Support Updated

In Appery.io, you can easily build an app that provides a UI that switches among several languages with the updated and improved i18next plugin.

Bugs (Less of Them)

A large number of bugs were fixed by our development team. You’re gonna like it!

Get in Touch

As always, we want to get your feedback. You can always email us (support@appery.io) or post on our forum.

OAuth Login with Google App in Android/iOS Apps (An Update)

This blog post supplements “OAuth Login with Google App” in the Appery.io documentation.

Since April 20, 2017, all OAuth requests through InAppBrowser are blocked (see http://blog.ionic.io/google-oauth-changes/ for details). Now it’s necessary to use the Google Sign-In Cordova/PhoneGap plug-in.

So, first of all, download the plug-in and add it to the project (more details on this).  When ready, you can proceed with specifying the settings for iOS or Android apps. We’ll describe both ways and then show you how to set up your app at the end.

Google setting for iOS projects

  1. On the Google project page, go to the Credentials tab and select Create credentials > OAuth client ID
  2. In a new window, select iOS.
  3. Define the Bundle ID (you can get it from App settings > iOS binary > Bundle ID).
  4. Click Create.
  5. Now, copy the iOS URL scheme from the created Client ID:
  6. Add the iOS URL scheme as the REVERSED_CLIENT_ID parameter of the Google Sign-In plug-in and save:

Ready!

Google setting for Android projects

  1. On the Google project page, go to Credentials and select Create credentials > OAuth client ID
  2. In a new window, select Android.
  3. You will need the SHA-1 fingerprint of the certificate that you are using for signing up your app to link the client ID to the app. To get it, export your certificate (Resources > Certificates) and run the following command in the console:
    keytool -exportcert -keystore path-to-debug-or-production-keystore -list -v

    keytool is a key and certificate management utility.

    It is included in the jdk, you can install either jdk or download the keytool utility.

  4. The obtained SHA1 code should be added to the Signing certificate fingerprint.
  5. Insert the Package name (App settings > Android binary > Package name).
  6. Click Create.

Changes to make to the Appery.io project

  1. Add the button Login with Google on Device on the LoginWithGoogle page.
  2. Add the following JavaScript code to the click event:
    window.plugins.googleplus.login(
        {
          'scopes': 'https://www.googleapis.com/auth/drive' // optional, space-separated list of scopes, If not included or empty, defaults to `profile` and `email`.
        },
    function (obj) {
            Apperyio.storage.token.set(obj["accessToken"]);
            Apperyio.navigateTo("WelcomeOnDevice");
        },
        function (msg) {
          alert('error: ' + msg);
        }
    );
  3. Duplicate the Welcome page and rename it to WelcomeOnDevice.
  4. Remove the JavaScript code from the Page show event (leave only Invoke service there).

Please note that the selected Android certificate will only work with the release option enabled.