Why do some Android phones cause our app to throw an java.lang.UnsatisfiedLinkError?

EDIT: Since I got another crash report yesterday for one of my apps I dug a bit deeper into the matter and found a third very likely explanation for that problem: Google Play Partial APK Update Goes Wrong To be honest, I did not know about that feature. The APK file name suffix “-2.apk” made … Read more

mylib.so has text relocations. This is wasting memory and is a security risk. Please fix

This would appear to be a result of two ndk-gcc bugs mentioned at https://code.google.com/p/android/issues/detail?id=23203 and stated there to have been fixed as of ndk-r8c. It would appear that the check for libraries with the issue has been added only recently. Note: please do not edit this post to hide the link URL. It is explicit … Read more

ViewPager animation fade in/out instead of slide

This should work better for the fade in/out transform: public void transformPage(View view, float position) { view.setTranslationX(view.getWidth() * -position); if(position <= -1.0F || position >= 1.0F) { view.setAlpha(0.0F); } else if( position == 0.0F ) { view.setAlpha(1.0F); } else { // position is between -1.0F & 0.0F OR 0.0F & 1.0F view.setAlpha(1.0F – Math.abs(position)); } … Read more

change button color react native

The react Button component renders the native button on each platform it uses. Because of this, it does not respond to the style prop. It has its own set of props. The correct way to use it would have been <Button color=”#ff5c5c” title=”I’m a button!” /> You can see the documentation at https://facebook.github.io/react-native/docs/button.html Now, say … Read more

Repeating background image in native iPhone app

Apparently a UIColor is not necessarily a single color, but can be a pattern as well. Confusingly, this is not supported in Interface Builder. Instead you set the backgroundColor of the view (say, in -viewDidLoad) with the convenience method +colorWithPatternImage: and pass it a UI Image. For Instance: – (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = … Read more

How to call methods in Dart portion of the app, from the native platform using MethodChannel?

The signature is void setMethodCallHandler(Future<dynamic> handler(MethodCall call)), so we need to provide a function at the Dart end that returns Future<dynamic>, for example _channel.setMethodCallHandler(myUtilsHandler); Then implement the handler. This one handles two methods foo and bar returning respectively String and double. Future<dynamic> myUtilsHandler(MethodCall methodCall) async { switch (methodCall.method) { case ‘foo’: return ‘some string’; case … Read more

Is there a native machine code compiler for JavaScript? [closed]

As far as I know, there are no static compilers for JavaScript. It is certainly theoretically possible; however, a static compilation of JavaScript would need a very heavyweight runtime to support all of its features (such as dynamic typing and eval). As a small aside, when presented with the need to statically compile Python (another … Read more

Why do some Java library methods delegate to a native method with a nearly-identical signature?

The native version is just an implementation detail. This pattern separates the public interface of the method from the actual implementation. I see at least 5 reasons why this is useful: test purpose (you can mock the java method call) alternative implementation: a particular version of the java library may implement that method in pure … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)