Check available Google Play Service - firebase

firebase_messaging gives MISSING_INSTANCEID_SERVICE error.
This is due to the fact that the device does not have Google services.
There are many solutions, but on pure android. Are there any solutions on Dart?
Is there any way to check if Google play is available on the device without using the library?

If you don't want to use lib, you can use method channel to call native code check,
refer native code here

Related

How to send localized notifications using the Java Admin SDK version of Firebase Cloud Messaging?

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

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.

Can the telegram auth SDK be used within a browser

I'm struggling to get my head around the basics, and to find somewhere to ask for help. I know that the first two questions are a bit wooly by Stack overflow standards.
is there a forum/channel somewhere for a dialog with people trying to use MTProto?
is https://github.com/zerobias/telegram-mtproto the easiest to use implementation of MTProto in JS?
can it be used in a web client (i.e. with and ES6 import in a webpack environment)?
I'm seeing a bunch of errors but some of them seem to do with using webpack 4, but I'm not sure if what I want to do is even possible (see Accessing Telegram API via web-based client), although I have now mananged to get a 2FA code sent
My aim is to create a client that can log into certain telegram channels where all the content comes from a bot, and to parse information from them
Connecting to the Telegram MTProto API is possible in browsers. You should use a library to do that. I'm going to mention some functional and maintained libraries.
There is the official TDLib with browser support, but it is quite hard for newcomers to use.
There is also GramJS which works on both Node.js and browsers, has type declarations for TypeScript and an easy-to-use API. It also take cares of many things like caching entities, so you do your work even faster. You can even change the lib target to use as an ES module in the browser.
is there a forum/channel somewhere for a dialog with people trying to use MTProto?
You can consider joining #gramjschat.

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.

Sharing to WeChat: WeixinJSBridge is undefined

I'm trying to implement sharing to WeChat on our site.
Accordingly to docs, I have to load SDK from http://res.wx.qq.com/open/js/jweixin-1.0.0.js, configure it, and call corresponding methods (onMenuShareAppMessage in my case).
I did all configuration, it seems that it's ok (no errors displayed, wx.ready() callback is executed), but when I call wx methods, nothing happens at all.
Reading SDK code (minified), I can see that everything is wrapped in constructions like window.WeixinJSBridge ? WeixinJSBridge.doSmth() : doNothing(). In my case WeixinJSBridge is undefined.
But what is that WeixinJSBridge and where should I get it? It's not described in docs. Googling it gives some pages on Chinese with same question – "WeixinJSBridge is undefined" and with no answer.
How to properly work with all this stuff?
Or, maybe I'm totally misunderstand the docs and sharing to WeChat from website is impossible at all? Please somebody explain.
Understood. That SDK is only for WeChat browser, built-in inside their mobile application. For other browsers SDK has no sense.
So yep, normally it's impossible to share content to WeChat from website.
WeixinJSBridge is an object available once http://res.wx.qq.com/open/js/jweixin-1.0.0.js is loaded inside the Wechat Web Browser.
It's used specifically to start the payment process in Wechat App.
If you wanna test/debug it, download the wechat testing software for desktop here: https://mp.weixin.qq.com/wiki?action=doc&id=mp1455784140

Resources