Anyone who has worked with a RESTful API using JavaScript knows that testing can be a complete pain if the API owner hasn’t enabled CORS on their server. So what is CORS? According to Wikipedia, it is the following:
Cross-origin resource sharing (CORS) is a mechanism that allows many resources (e.g., fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain the resource originated from.
Often API owners will leave CORS disabled even though their API is open to the public. In my opinion it doesn’t feel public if the API owner is not allowing requests from all angles.
Here are a few tricks I’ve picked up in regards to bypassing the awful CORS errors you receive in your browser when testing.
Read MoreThere are roughly seven billion people in the world (7,000,000,000) and roughly 6,500 languages. Lucky for us, Android and iOS does not support all 6,500 of these languages. However, many are supported and this means that when you make an application in your native language, chances are your audience is only going to be a fraction of these people.
Recently I discovered Angular Tranlate, a JavaScript library for AngularJS. It allows you to create translation tables in your web application to quickly switch between depending on the language you desire. When you pair this with Ionic Framework, which supports AngularJS, you have a great way of adding internationalization and localization into your mobile application.
Read MoreSending email directly from your mobile application might be critical at some point in time. You may want to create an easy outlet for users to send you feedback about your app without having to sift through your website. Using the Apache Cordova plugin, Email Composer, you can easily send email from Android and iOS with Ionic Framework.
Read MoreSo you’ve just made an awesome app and you have no idea how to get the word out. This is a problem most app developers have, so you’re not alone.
I’ve released many mobile apps to the app store, most of them Android, but still a diverse collection. It has been tough work, but I’ve established myself by getting many downloads, maintaining a high average rating, and getting a few hundred dollars monthly in app revenue.
Read MoreMany APIs such as Google, Twitter, and Facebook require Oauth in order to use. This can get tricky when it comes to mobile because authorization must happen externally in a web browser. To our advantage, we can handle Oauth 2.0 using the InAppBrowser plugin for Apache Cordova.
Basic instructions on using the InAppBrowser with Ionic Framework can be found in one of my earlier blog posts. If you’re looking to use Oauth in an Ionic 2 application, visit here, otherwise proceed with Ionic Framework 1.
Read MoreI am pleased to announce my first Unity3D plugin is now available for download. EZ Analytics for Android offers Unity3D developers a native solution for Google Analytics with as little as two lines of code.
Read MoreThere is often a scenario where you need to download files from a server onto the Android device. This needs to be done without forcing the user to launch a web browser and have interaction as some of the downloaded data might be private. Let’s use the scenario where you’ve made a game and you have in-app purchases. You want to keep the size of the game small for everyone so you decide to put the purchase items on your server. When a user purchases an item then the item will be downloaded in the background. This is a perfect usage example.
For purposes of the tutorial we will be staying simple. We will be downloading a remote image in the background and then displaying it when it has finished downloading.
Read More