React-native facebook login crash on Android - javascript

I'm using react-native facebook login through this library: react-native-fbsdk. Following the installation guide did not completely get it working, but I managed to get it working after modifications on the native side, as instructed in many github issues etc.
Anyways, it was working fine two weeks ago, but now, when I try to login with facebook, the application immediately crashes. It doesn't open any login page or do anything else.
What is weird is that if I open a browser in the emulator, leave it to background, and then try to login, the login goes further (I get to actually login, but when I'm directed back, the application crashes).
From the tombstone files I am able to get following warnings/messages:
Expected native library version number "",actual native library
version number ""
Tens like these:
Could not find generated setter for class
com.facebook.reactnative.androidsdk.FBLoginButtonManager
How could I solve this problem? And why it doesn't work anymore? I didn't change anything in the code. Only thing I can think of is that it loads something from the internet during compiling the application. How could it otherwise fail?

This is answer for how I solved the problem, not that much about why it was behaving like this.
In short:
I got it working again by updating the emulator and android API 6.0 through Android Studio.
<Rant state='begin'>
I have no idea why this worked, nor why did it broke in the first place. As it was working good with the old emulator and API 6.0 earlier.
It seems like the react-native fbsdk is far from stable. Or then it is completely react-native's fault, idk to be honest. But this just makes me want to develop fully native, instead of react-native, which seems unstable from my experience so far.
<Rant state='end'>

Related

Cant get Tizen app to work which is written in preact

I have an app written in preact which I would like to test, but I am unable to get it working on the Tizen tv emulator.
After some research, I found a few instances of people creating apps for Tizen with react but never actually using preact.
Has anyone experience with getting preact apps to work on the Tizen platform?
thanks in advance :)
There's nothing in preact itself that might cause the app to not work on Tizen. In fact it should work much better then a react version. I've not only seen, but have written apps in React for Tizen (even legacy ones). The real reason of the failure might be that the app is not transpiled appropriately for the Tizen platform. You should be targeting at least ES2015. Also be sure to include pollyfills if you are using fancy data structures, like Set for example.
It would help if you could post the error that you receive in Tizen emulator. You can run the app in debug mode and actually see all suspicious output in the console of the detached WebKit devtools that debug mode auto-opens for you.

How do you make a launch/splash screen for android in React-Native?

I've been searching for a while now and I have not found anything on how to add a launch/splash screen to my android app with react-native.
I've seen many examples of how to do this for iOS, but I also need it to work with android. I'd love something that can work cross-platform but if that is not possible with current react-native, I can implement it for both. I've also seen a way to do it with java, but I would really prefer not tainting my app with java code, trying to keep as much as I can written in react.
Would anyone know how this could be done?
Splash screens are a built-in feature of iOS apps - you can't not have a splash screen on iOS.
However, generally Android apps don't have them. The apps that do tend to simulate it by having an image that displays for a couple of seconds when they first start.
That's pretty easy to do in react-native (use a setTimeout with setState({showSplashScreen:false}) or similar. Wrap it in a check for Android, and you're there.
EDIT: As the OP points out in the comments, this causes a 'white flash' while the app is loading, so it looks like for now the best solution is to use a plugin or custom Java code.

Cordova plugins became undefined after restoring application

I'm working on html5/css3 application based on angularjs. And building this into android application using cordova 3.5.0.
Everything works fine until I hide application using 'home' button on the phone and then restore it: after that whole app reloads, and plugins became undefined.
Any ideas why this happening and how to fix it? Maybe I need to clarify something about project structure?
I wanted to try calling plugins using cordova .exec() but this method is undefined as well.
Well, I figured out what's the problem and I feel really stupid right now.
There is an option in dev options: "Don't keep activities", I was testing application on my co-worker's device and this option was turned on(I believe it turned off by default), so it was the root of a problem.

How to go about implementing a webkit based windows application?

This is a bit of an open-ended question, since I am just starting out on the project.
Problem: I have clients who cannot install web-browsers on their machines, and are stuck with IE6. The app we are selling them is a web-based app using a lot of javascript and jquery.
Solution: Implement a windows application that has a web-browser control based on webkit (since the regular webbrowser control is not going to support javascript and jquery), which loads the app.
I started doing research, and I found 2 controls:
https://code.google.com/p/open-webkit-sharp/
and
http://webkitdotnet.sourceforge.net/
I started off with the second one, and tried the sample app they built, only to discover that the version of webkit they used is really old and doesn't run our app right.
So my current solution is to compile webkit myself and include the newer version in the control and see how that works out.
Since this is a time-sensitive issue I thought I'd also ask for the experience of StackOverflow at the same time I am going down my route, to see if there is a simpler solution, or if there are any libraries or pre-built controls I could use that I missed in my search?
Thank you for any help!

PhoneGap Android Querystring issue

I seem to be having a issue using phoneGap with querystrings
I wanted to have a page as:
view.html?matchid=1234
I have also tried:
view.html#1234
Both of these work in the emulator (running 2.3) but neither work when on my phone (ICS 4.0) - It errors as if the page doesn't exists...
I believe it may be a issue with the version of android. Does anyone know of a fix/work around I could possibly do.
Ideally it would be still using the query in some way. If not the other option I thought of was to use localStorage. Save something to it before going to a generic view.html page which then takes the Id out of localStorage....
There is an issue for this in the Android issue tracker.
http://code.google.com/p/android/issues/detail?id=17535
It affects all versions of Honeycomb and ICS.
It has been fixed and marked for Future release, so don't expect it anytime soon.
You can find some workarounds on the issue thread.

Categories

Resources