WHERE do you set up the applicationIconBadgeNumber? - javascript

Does anyone know WHERE do you set up the applicationIconBadgeNumber for React Native / Expo application for iOS & Android?
Im using React Native, Visual Studio Code and Expo.
Like, on WHICH Page / File, etc ?
I cannot seem to find: [UIApplication sharedApplication].applicationIconBadgeNumber
If you can please list the Steps to get this working, and any installs (if needed).
I already have Push Notifications working on my App, but Im trying to set this up now.
Any help would be greatly appreciated.
Please help!

Does anyone know WHERE do you set up the applicationIconBadgeNumber for React Native / Expo application for iOS & Android?
Expo API is pretty clear about this, I googled your question and it linked me to it:
Expo.Notifications.setBadgeNumberAsync(number)
Like, on WHICH Page / File, etc ?
This is a pretty open ended question. You could link setBadgeNumberAsync to your redux in an action.
Or just put it anywhere I guess 🤷‍♀️ it's a static method that excepts a number, I would use the redux approach though! 💙

Related

React and Liferay portal routing difference

My thoughts are that a problem is in the routing differences between these two.
The application works when I serve it on localhost:3000 and the whole front-end is presented, but when I build the application using mvn package and upload the .war file to the Liferay Portal, I am presented with only the navigation bar.
Also when I press on any element in the navbar, nothing happens. Neither in the console, network or on the URL. If someone has any clues it would mean a lot to me.
Thank you.
This question needs some clarification about the source code and what did you use
But maybe you are using the BrowseRouter rather than HashRouter

How do I integrate react-native-sensors to my project?

I found a useful library to detect position of mobile phones, but I'm not sure how to integrate it to my project as I'm new to both JavaScript and React Native. I tried making it into a class so I can just call it like this <MotionSensor /> and monitor what it does thru the console. And I'm trying to do this without touching the Android and iOS native code so my code can work for both.
You can take a look at my App.js here.
I use the combination of create-react-native-app and Expo.
Any help is greatly appreciated!

JS works until I bring it into a foundation Framework

I am working on a project where I want to make it look as if a shutter of a camera is opening and closing... I was able to get this to work in a regular html/css/js file structure however when I trie to bring/ incorporate it into Foundations Responsive Frameworks I was not able to get it to work. There are no errors in the console and checked to make sure everything is linked correctly. ... I have attached both folders in the link, the working folder that is not in a framework and the broken folder that I am trying to use foundations framework..
https://drive.google.com/folderview?id=0B4EHdofHefLHZjZpczBybE1xWGs&usp=sharing
Thank you in advance for any feedback/help.
-Jake
Unfortunately, I cannot fix it.
Fortunately, I did figure out the problem.
The jquery.shutter.css is not loading properly. Here is my attempt at your project in React.
When I take your working example and delete the jquery.shutter.css file, I get the exact same result as the React version which has no error message. I gave it a good try and cannot fix it without more time. I hope knowing the problem helps you.
Note: Unfortunately Google will not let me upload a JSON file so you will have to change package.txt to package.json and install using Node

React Widget in React WebApps / Zendesk widget

I ran into trouble yesterday, trying to make the zendesk widget work in my react web app. The config took me 2s (just some line to add to my index.html), and the widget appears as expected.
However...when i "clicked on it" i got a well knowing error : "duplicate react-id 0.3 ...". After some digging, i found that Zendesk team uses - as me - a react based stack for this widget.
I found an issue related to that : https://github.com/facebook/react/issues/2713 and i wanted to know if there was some solution out there ^^
Thanks in advance
Jonathan
Looks like this issue was fixed in React 15 rc2
https://github.com/facebook/react/issues/3916#issuecomment-198564434

Phonegap on Android: getting Drawables/AppIcons back into Javascript environment for display in "browser"

I'm building an Android based WebApp using PhoneGap, and trying to get the app icons of several currently installed applications back into the Javascript environment for displaying in the "browser".
Getting hold of the icons in the ANdroid layer is no problem. I've done that with code similar to this:
Drawable myNewIcon = myResolveInfoInstance.loadIcon(mycontext.getPackageManager());
... but I'm struggling with working out how to get the icon back into the Javascript callback so that I can place it into the "webpage".
If anyone can give me a tip or two on how to achieve this, it would be very much appreciated. It doesn't seem like it should be too difficult...!?
thanks.
If these drawables are going to be used purely on the web side of your project then putting them in the assets folder is the best idea. Then they can be accessed via:
file:///android_asset/www/images/icon.png
for instance.

Categories

Resources