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.

(more…)

TPDP Episode #15: Authorizing Access with OAuth

I am pleased to announce that the latest episode of The Polyglot Developer Podcast is now available to download from all the popular podcasting networks. In this episode titled, Authorizing Access with OAuth, I’m joined by Ryan Chenkie from Auth0 to talk about OAuth and how it can be used to authorize access to your data by third-party applications.

Episode #15 can be downloaded for free from iTunes, Pocket Casts, and every other popular network, but it can also be heard below.

(more…)

Determine Network Availability In A NativeScript With Angular Mobile App

When developing mobile applications, there is often a need to perform certain tasks when a network connection is available. Not only this, but sometimes you only want to perform tasks depending on the type of network connection. For example, what if you wanted to backup large photos only when the Android or iOS device is connected to WiFi rather than 3G or 4G? To accomplish this, we need to determine the network availability and monitor it for changes.

We’re going to see how to check the network connection type and monitor it for changes within an Android and iOS mobile application using NativeScript and Angular.

(more…)

Consume RESTful API Endpoints Within A Golang Application

I am a huge fan of the Go programming language and have written a decent amount of material on the subject. For example, a popular tutorial I wrote titled, Create a Simple RESTful API with Golang, focuses on developing an API. However, I recently received questions on the subject of consuming data from other APIs from within a Go application.

We’re going to see how to issue HTTP requests from within Go, in an effort to consume or send data to other RESTful APIs that might exist on the internet.

(more…)

Use Fingerprint Authentication In A NativeScript Angular Application

More than a year ago, before I started using Angular, I had written a tutorial on the topic of fingerprint authentication in a core NativeScript application. Since then, I’m doing almost all of my mobile development with Angular which means that the previous article deserves an upgrade.

I recently released a mobile application called Solar Flare for Cloudflare that protects your account with device level fingerprint authentication. We’re going to see how I included fingerprint authentication, sometimes referred to as touch id, in a NativeScript with Angular application.

(more…)

Apache Cordova And Ionic Framework Apps Are Not Native Mobile Apps

If you’ve been keeping up with my content since the birth of The Polyglot Developer, you’ll know that I was once a huge advocate of Apache Cordova development using frameworks like Ionic Framework. Having been a web developer and coming from native Android development with Java, cross-platform development using hybrid technologies seemed like a logical next step. Fast-forward to now, I’m no longer using Apache Cordova with Ionic Framework and have gone back to native development.

I recently came across an article by Ionic’s CEO, Max Lynch, titled, Cordova/Ionic Apps are Native Apps trying to explain that Ionic applications are native mobile applications. There are some valid points made in this article, but as someone who spent several years using the technology as well as using applications built with the technology, it is not something I agree with as a whole.

(more…)

Display Local Notifications In A NativeScript Application With Angular

A while back I wrote a tutorial that demonstrated how to use local notifications in a NativeScript Core project, also referred to as a vanilla NativeScript project. Since writing that tutorial I had received several requests to demonstrate the same in a NativeScript with Angular project.

If you’re unfamiliar, local notifications are scheduled notifications rather than notifications sent from a server. These notifications are useful when you need to trigger reminders in your application or based on events. For example, maybe you develop an iBeacon application and as you approach an iBeacon you want to receive a notification. This type of notification would be a local notification.

We’re going to see how to schedule and display notifications in Android and iOS using NativeScript and Angular.

(more…)

Validate Form Submissions In Node.js With Google reCAPTCHA

Anyone that operates a website or web application with a contact page knows how bad the SPAM problem on the internet is. Spammers, phishers, and other malicious people create bots that will crawl search engines for contact forms and send emails to the hosts, register accounts, or something else. There was a point in time that I was receiving more than ten emails a day from spammers that wanted to redesign my website. This kind of activity is incredibly annoying on my inbox.

This is where CAPTCHA and reCAPTCHA form elements come into play. These elements typically require some interaction such as typing words from an image or solving a math problem. Adding this small amount of form complexity can go a long way towards stopping bots.

We're going to see how to hook up a Google reCAPTCHA element into a client facing form and validate that element using a Node.js backend.

TPDP Episode #14: Object Storage for Application Developers

I am pleased to announce that the latest episode of The Polyglot Developer Podcast is now available to download from all the popular podcasting networks. In this episode titled, Object Storage for Application Developers, I’m joined by Krishna Srinivas from Minio to talk about what object storage is and the various solutions that are available.

Episode #14 can be downloaded for free from iTunes, Pocket Casts, and every other popular network, but it can also be heard below.

(more…)