Android and IOS application cross-platform development

Issue

I have to develop a simple application for Android and IOS (Gui with use standard android/ ios components – both have equivalent components for what I want use). So I’m looking for a cross-platform solution that can make it easier. I found nativescript with angular and react native. Both look cool and I read a lot of positives and differences between them. Now I prefer nativescript with angular because of pieces of code in angular which I can use in web.

Here is but:

But I need be able to send some bytes via wifi (not to web or via http). And I can not find a solution for it. It’s easy to do it in native app development. So is it some option to call java code from native script or how can it be done?
Or is in this case is better / only way to achieve it use native app development?

Thank you for any answer.

EDIT: I found manual to create native plugin and it works:
https://www.nativescript.org/blog/plugins-and-jars

Solution

For react it is pretty easy, you can wrap any native code within a react module. Have a look at this documentation page: https://facebook.github.io/react-native/docs/native-modules-android

For native script you access native APIs via JS code, see here: https://docs.nativescript.org/core-concepts/accessing-native-apis-with-javascript

I know Cordova isn’t in question, but having a big chunk of work done in Angular for web, you could take it into consideration too. Integrating any native functionality/sdk is super easy with Cordova.

Answered By – Lukasz

Answer Checked By – Mary Flores (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.