Request Android Permissions In NativeScript Using Angular

With every version of Android comes more security measures dropped into place. For example, in Android 6+ the user needs to grant permissions when doing certain activities, such as using the camera. These security measures are more aggressive than the previous form of asking permissions in the manifest file.

So what if we want to prompt the user to grant permissions at a time other than when trying to use the feature that requires the permissions? For example, asking for camera permissions when the application loads, rather than when we try to use the camera feature of the application?

We’re going to see how to request permissions in an Android NativeScript project with Angular.


Use The HTTP Module Instead Of Fetch In NativeScript

Not too long ago I wrote about using the NativeScript fetch module for making HTTP requests in an Android and iOS mobile application.  Personally I find that the fetch module is a bit awkward to use, so this time we’re going to take a look at using the http module instead.

The great thing about the NativeScript http module is that it is pretty much the same as it is in the other languages.


Make HTTP Requests In An Ionic 2 Android And iOS App

Anyone looking to build a mobile application is going to find themselves needing to make HTTP requests to some remote web service at some time.  It is just how the modern web and modern app development process is now.  Previously I had demonstrated how to make HTTP requests in an Ionic Framework 1 application, but since Ionic 2 is all the rage right now, we’re going to switch gears and see how it is done in the latest framework version.

The bulk of this tutorial will be demonstrating how to make these web service requests in Angular 2 since it is fairly different from the first AngularJS version.


Create A Simple RESTful API With Node.js

I’ve written a few tutorials regarding Node.js and the ExpressJS framework, but I never took a step back and explained how to make a super simple RESTful API for processing HTTP requests from a front-facing interface.

With this API created, you can use it with just about any application that can submit HTTP requests.  It is a great way to test a mobile application or one that uses JavaScript frameworks like jQuery, ReactJS, or AngularJS.


Make HTTP Requests In iOS With React Native

If you’ve been keeping up with my blog, you’ll know I did an article for doing HTTP requests with Ionic Framework.  Since I’ve been playing around with React Native a lot lately, I figured it is probably a good idea to figure out how to do RESTful HTTP requests sooner than later since everything has an API back-end now.

The Facebook documentation for React Native has (or had at the time of writing this) a tutorial for getting movie data from a remote API.  However, it hardly explained how to customize the HTTP request.  In fact, I found that a lot of the internet was missing clear cut documentation for RESTful requests with React.

This article should clear things up!


Using An Oauth 2.0 Service With IonicFramework

Many 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 IonicFramework 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.