Code a Real-Time NativeScript App: Social Login and Firebase

Code a Real-Time NativeScript App: Social Login and Firebase

NativeScript is a framework for building cross-platform native mobile apps using XML, CSS, and JavaScript. In this series, we're trying out some of the cool things you can do with a NativeScript app: geolocation and Google Maps integration, SQLite database, Firebase integration, and push notifications. Along the way, we're building a fitness app with real-time capabilities that will use each of these features.

[…]

Next, you also need to add Android as a platform. You can do that by going to the Basic Settings and clicking on Add Platform:

[…]

You need to let the app know which Facebook app it's going to talk to. You can do that by opening the app\App_Resources\Android\AndroidManifest.xml file and adding android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> under the  tag:

Next, create an app\App_Resources\Android\values\facebooklogin.xml file and add the following:

[…]

Once that's done, you have to uninstall the android platform (tns platform remove android) and try to run the app once again (tns run android).

[…]

Now we're ready to add the code. We'll first add the XML, then the JavaScript, and finally the CSS code.

[…]

Finally, open the app/app.css file and add the following below the existing code:

[…]

And in the meantime, check out some of our other posts on NativeScript and cross-platform mobile apps!