Use google ML Kit with react native - firebase

I want to remove backgrounds from images in my react native app. I am already using Firebase in my app, so I tried to find something in Firebase Machine Learning that can do that, but unfortunately not. It seems that the function was moved to a separate SDK, ML Kit. Is there any way to use this selfie-segmentation feature with react-native? Or is there something similar in firebase?

You can use ML Kit wrapper for RN called https://github.com/a7medev/react-native-ml-kit
In your case, unfortunately, it is not implemented yet in this library but you can add it following this PR https://github.com/a7medev/react-native-ml-kit/pull/20/files

Related

How to use Google ML Kit as Firebase ml vision is discontinued?

I want to create a flutter app to detect text from image and I have tried to search resources on internet but all I found was related to firebase_ml_vision but it is now discontinued. So I want to use google_ml_kit but I couldn't find any code to use it. Can you tell me how to use it in Flutter?
Multiple components of the ML can be found in this example
Here.

Is there any way to use Content Based Recommendation using flutter as frontend and firebase as backend?

I am developing a question answering system app like quora, I want to add content based recommendation to my app so that it can give suggestion while searching question based on users previous seen data and also use the recommendation system for showing the similar content at home page!
Well, there's no direct way and Firebase don't have any packages for recommendation system but what you can do is use tensor flow to build your own model, train it and integrate it in to firebase ML which also use the firebase cloud function feature. That's it, now use firebase cloud function in your flutter project.

Configure Onesignal with Nativescript (with javascript)

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.

Using Firebase from google instead of react-native-firebase

At the moment I am using react-native-firebase 4.3.8, but I noticed that google has updated firebase (firestore in particular), which holds some interesting new features. I was trying to use firebase from google directly, but it gives me errors (can't find variable: document) for example.
Is it possible to use firebase instead of react-native-firebase, so the updated features are available.
I know that react-native-firebase are working on an update (v5) to include those features.
To use Firebase within your React Native application you need to bind the JavaScript code to the underlying native iOS/Android SDK. When you use Invertase's react-native-firebase library they take care of that for you.
You can definitely use another library that does the same, or roll your own. But recommending a library is off-topic on Stack Overflow, and showing you how to do this yourself is a bit too broad for a question here.
If you're having problems getting the Invertase library to work, it is best if you share the minimal code that reproduces where you are stuck. That way we can see what you tried, and help you get unstuck.
If none of these apply, you will have to wait until the feature you want it available in the library. Note that Invertase's react-native-firebase library is open source, so they might be taking pull requests in case you want to help.

Why can't we use angular-fire2 package for firebase with Nativescript Angular app

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.

Resources