I´m creating an app with nativescript and i need push notifications, so i read about onesignal and it looks promissing, so i have created an account with them, follow the instructions for ios, then they sent you here where you are suppose to configure the nativescript SDK for your mobile app. Well, i´m not using typescript, so my first question is:
Where is the javascript version to configure the nativescript SDK,
does anyone knows?
My second question is related with the data that my app receives, which is throught a database, i have a webapp and everytime a user INSERTS in the database, a listview in the nativescript app is "fed"...but when this happens, i need the script from onesginal to send the push does anyone ever used it?
Thanks for your time
Regards
TypeScript makes it easy to maintain large scale JavaScript applications, NativeScript or Angular itself is written in TypeScript for same reason. So personally I would recommend getting started with TypeScript for better.
If you want to convert TypeScript into JavaScript, simply remove all typings from your code, replace import statements with require. At least this should work in NativeScript environment as it supports most of ES6 syntaxes. If you prefer ES5, simply use any online compiler to get JS version of same code, TypeScript Playground for instance.
Also NativeScript docs got examples for extending app delegate in JavaScript if you need further guidance on this.
I don't think the plugin provides any interface to handle notification data at the moment. If you are familiar with the native apis, you may directly access them from JavaScript to access the data sent from server. If possible, I would recommend migrating to Firebase which supports end to end integration with proper examples.
Related
Does anyone know if the Java Admin SDK FCM module supports localization?
According to the docs, at least for the REST interface, we can specify body_loc_key and title_loc_key instead of body and title Strings which will then be localized on the received devices.
It doesn't look like there is any way to do this using the Java SDK, although it seems unlikely though as this must be a common requirement.
With the help of several nested builders, yeah finally we got to the working solution.
https://dev.to/davebrown1975/localised-notifications-with-firebase-cloud-messaging-fcm-ecn
I was wondering if there was any way to run JS encrypted websites in a Kotlin native environment.
Let's just say that I want to get something off the internet, and it's protected, it's website's source code changes from day to day and I can't update the website decryption daily.
Is there a way to run a website in native kotlin? I know you can do it in Android kotlin(JVM) as android sdk includes WebView which can run in the background.
Would there be a way to do it consistently over any platform?
Currently angularfire2 allows you draw from cached data by importing AngularFirestoreModule.enablePersistence()in app.module file.
I'm wondering if it's possible (and how) to do this dynamically after the app has been initialized.
The reason i'm trying to do this, is currently enablePersistence only works on one tab in a browser, but works great for mobile. I would love to just disable it for the web and have it enabled for mobile.
Currently i'm using Ionic for development just in case that helpful.
From the reference documentation for enablePersistence():
Must be called before any other methods (other than settings()).
So you can enable persistence, as long as you haven't made any other Firestore calls.
If nativescript is using javascript engine behind the scene. If I use angular for nativescript development, shouldn't I be able to use angular-fire2 for firebase.
if I could code sharing would be much better with Web and Mob App.
https://stackoverflow.com/a/46088932/6408287 contains the answer you are looking for. In short - NativeScript does not implement the node.js modules specification.
Angular-fire2 is made to run inside node.js, whereas mobile firebase sdks are made to run on mobile platforms. Efficiently. Hence the difference in APIs.
Even if you were to somehow run angular-fire2 on NativeScript, chances are it wouldn't execute as well as the mobile sdks would.
I am a Front-end developer with limited backend knowledge.
My question is do I need other backend frameworks like Django or Ruby on Rails if I use Firebase as a backend? In other words, can I solely depend on Firebase as a backend and build a single page web application or Mobile application without writing a single line of backend code?
Thanks for your time viewing the question.
I was also looking for a platform to minimize server code and I found that firebase can help a lot.
You will get plenty of docs on net. You can start at angular fire + firebase doc
https://www.firebase.com/docs/web/libraries/angular/quickstart.html
Following document was helpful for me to design my app, which requires some amount of off-line processing too.
https://firebase.googleblog.com/2013/03/where-does-firebase-fit-in-your-app.html