Is it possible that I can embed some native code with cordova ?
i.e In native application I can Intercept some javascript in webview and run native code
Is it possible in corodova ?
As far as I know it's not possible.Is there any plugin ? or something like that.
Yes it is possible.
Please refer here
http://docs.phonegap.com/tutorials/develop/1-embed-webview/ios/
Related
I am a newbie to react native.
1.) I need to know if I can create a react native application and import it to Xcode, then add code in swift?
2.) I also need to know if the components I developed with swift can be compiled and run as a Android application?
Yes you can definitely do this, it's pretty common.
No, that swift code will not run on android
To help understand this, all UI code written in React Native is translated into corresponding native languages, everything else stays as Javascript.
Your Swift code cannot be translated back into Javascript that can then run on Android and certainly cannot be translated into Java.
I'm building a React Native native module (aka 'bridge') for iOS and Android and need to log to the JS console in native code (Objective C and Java). This is done easily in iOS using RCTLog but I can't figure out how to do it in Java.
I tried Log.i but those messages aren't forwarded to Javascript.
The only thing I can think of at this point is to emit a JS event from the Java module and have a handler on the JS side just call console.log with the message but that's a pretty roundabout way of doing it.
I would expect to be able to do something like this.getReactApplicationContext().log("see me in the JS console") but no dice. Anyone know how to do this?
It looks like as of upcoming react native 0.63 we may be getting the equivalent of iOS's RCTLog in Android: https://github.com/facebook/react-native/commit/52b3105f652eca72892f200923e1687f1d995486
The files are in master: https://github.com/facebook/react-native/tree/master/ReactAndroid/src/main/java/com/facebook/react/util
public void logEvent(String text) {
System.out.print(String.format("logEvent: %s ", text));
}
or just
System.out.print("Hello");
If I add a package that requires changes in the native code, like MainActivity for android, is it still possible to use codepush to update the app?
I don't think that's possible, since code-push runtime on the device can only replace the javascript part and not the native parts.
I have seen that titanium support CoverFlowView in titanium but it works only on ios, Can anyone have idea to achieve CoverFlow in android with titanium
Thanks in advance
Looks like you are in luck! Someone already built a coverflow module for Android using the Android development environment.
https://github.com/moondroid/CoverFlow
You need to be willing to write the additional code for that to turn it into a module for Titanium.
http://docs.appcelerator.com/titanium/3.0/#!/guide/Android_Module_Development_Guide
It should be possible, but I must admit I've never tried to write one myself.
Basically you cannot get Coverflow on Android. Since it is a native iOs component which is not implemented in Android at all. Frameworks like Titanium always "link" your commands to internal system APIs. When there is no API there is no way to access it. Of course you could try to build it on your own but I think this would not work that well. And its a lot of work!
Additionally cover flow is not really useful (except for holding just a few items). Have a look at my question at ux.stackexchange.
Does anyone have a clear idea about or a sample of air native extension that helps me use alert view of apple touch devices.
I tried a lot for the same but ended up getting no success.
Thanks in advance.
I am not tried this library anyhow please try with NativeAlert.
(OR)
This for alternative for access native UI.
You can try with ios-theme-for-flex-mobile-projects link.
This link shows like iOS Alert view.
Please find mobiletheme_ios_usage.fxp link you can download that project then workout.You can see iOS alert view(Not Native UI).