ICU for Mobile(iOS/Droid) devices - android

Since both iOS and Android use ICU under the hood and provide some functionalities provided by ICU in their own API, Is ICU important in mobile app development. I am looking for best practices in mobile app development considering a scenario where i want to develop cross platform(iOS, Android) apps. Will there be any benefit in compiling ICU for both iOS and Android ( One i see is similar API's in Code base of app) and using them instead of using ios/android API.
How do app developers who develop both for iOS and Android go about their g18n requirements.
Thanks

I am developing a cross-platform (iOS + Android) app that uses ICU very heavily.
According to the team that create the data for the apps neither the Android or iOS built in versions implement enough of the features for us to use it.
So I have had to compile it for iOS and Android.
In iOS this proved to be relatively easy, I forked: https://github.com/zhm/icu-ios and followed the instructions.
In android I had to use: https://github.com/android/platform_external_icu4c and build it using the NDK.
I had issues building because the default Android.mk files don't work correctly and there are settings in Application.mk that need to be set, neither of which are mentioned in the help files.
On top of that the NDK doesn't let the .dat file be included in the library, so I needed to also mmap that.
I would suggest that on an app-by-app basis you decide if you can live with the built in features or not, because building the full version for Android is not pleasant.

Related

Using Android NDK for an existing iOS app

I'm bidding for a contract that insists on using the NDK for their iOS app. Basically, they're arguing that they already have an iOS app and they want to use the Android NDK to have an Android app for it.
I'm sorry if this comes off ignorant. I suggested that I could rewrite the entire app in Native Java/Kotlin but they don't see it any other way. Is there a way to use Android NDK to create an android version of an existing iOS app? I've never worked with the NDK.
Android does not support either Objective-C or Swift, the two main development languages for iOS development. If the iOS app is written in either of those then there's nothing for it but to rewrite the app for Android.
As #CommonsWare says in their comment, if the app is written in C++ using OpenGL ES, which is cross-platform, then you might be able to share significant parts of the code between platforms.
You also say "I'm bidding for a contract that insists on using the NDK for their iOS app." That doesn't really make sense. The Android NDK does not support cross-development for iOS. You can't use it to develop iOS apps, full stop.

Cross-platform advice Android / iOS / Windows

I'm maintaining a plethora of apps for one of my clients all of which have native projects for each of the three main platforms. The apps are relatively simple in functionality. My client wants to always take advantage of the latest features in each platform for marketing opportunities. They also want to appear to be a native app (responsive, not laggy). I haven't followed cross-platform development very much lately, so that's why I'm reaching out to SO.
My initial idea is to write a C++ library that has all the functionality shared by the three platforms. Then, for each platform, I'll write some network, file access, and UI-code that connects the abstract library code to the concrete platform.
Of course, this is exactly what cross-platform systems aim to do. Would it be a waste of my time to write the above myself when this has already been done by platforms like PhoneGap? My concern is that I would be dependent on a third-party. If I write the code myself, I have full control, and I will always have access to the latest features.
Hope to get some pro's and con's.
Thanks!
Yet a third option (after Facebook's React Native and Microsoft's Xamarin) is Google's new Flutter and as the other answers suggests "then writing the Windows app purely natively". BTW, React Native does have Windows support the lack of which in Flutter could be a plus or a minus depending on how you look at it.
Have you considered using React Native for iOS and Android, then writing the Windows app purely natively?
There are tons of articles out there about pros and cons for React Native.
PhoneGap is just a web, written in HTML, CSS and JavaScript. React Native actually renders native components for iOS/Android.
There is also Xamarin. It supports multiple platforms and uses c#. The new features from the native languages all work great.

Using JNI FOR IOS and Android

Is it Reccommended to use JNI and C++ Code to make a shared library code between IOS and Android ?
I'am asking this because i think it not just saves us plenty of wasted time for implementing same logic in both platforms but also we will have the speed of a C++ core Backing the logic-process of our modules.
Update :
I ask my question in another way :
is it recommended to share a C++ Library for core functions of Android And IOS versions of a similar app ? or it would be better to completely migrate the codes to a multiplatform language ?
Since I remember my needs back then, I know that hybrid apps were not an option, Also JNI is not used for making cross-platform apps but the best use is to drive hardware peripherals via native UNIX scripts for Android or run c++ code on Android. So if we omit PhoneGap, Appcelerator, Ionic etc we will be facing several cross-platform technologies that have attracted many developer attentions so far.
Xamarin:
The framework was founded by the same people who have created Mono, an Ecma standard-compliant, .NET Framework-compatible set of tools. Xamarin offers developers a single C# codebase that can be used to produce native apps for all major mobile operating systems.
Unlike many other frameworks, Xamarin has already been used by over 1.4 million developers from around the world. Thanks to Xamarin for Visual Studio, developers can take advantage of the power of Microsoft Visual Studio and all its advanced features, including code completion, IntelliSense, and debugging of apps on a simulator or a device. Xamarin Test Cloud makes it possible to instantly test apps on 2,000 real devices in the cloud. This is by far the best way how to deal with the heavy fragmentation of the Android ecosystem and released bug-free apps that work without any major issues.
But being honest I didn't enjoy my first time face-to-face meeting with Xamarin. There were so many bugs and also speed and performance problems were bothering.
React Native
React Native is developed by Facebook and used by Instagram, Airbnb, Walmart, Tesla, Baidu, and many other Fortune 500 companies. It is an open-source version of Facebook’s React JavaScript framework. Because React Native uses the same UI building blocks as regular iOS and Android apps, it’s impossible to distinguish a React Native app from an app built using Objective-C or Java. As soon as you update the source code, you can see the changes instantly manifest in an app preview window. Should you ever feel the urge to manually optimize certain parts of your application, React Native lets you combine native code with components written in Objective-C, Java, or Swift.
The ones I mentioned above are not the only options, but since now they are the most used frameworks between programmers. But beware that Flutter is being publicly announced by Google in Google IO and maybe it may be going to create a hit soon.

Why should I use portable class libraries with Xamarin?

I am currently evaluating Xamarin for my company with the goal to develop iOS and later on maybe Android applications. (Windows Phone or Windows store apps are not a concern for us). We are thinking of putting shared functionality into a common library and according to the Xamarin Docs PCLs are the way to go. However why can’t I just create normal .net class libraries and reference against them?
Mono serves as the base for Xamarin and has in most areas a quite mature implementation of .net Framework which should be both available on Android and on iOS since it is part of Xamarin.
Am I missing some important fact or are PCLs only needed when I also want to develop Windows Store applications?
Regular .NET libraries support a single target framework. The .NET framework used by Xamarin iOS is not the same as the one used by Xamarin Android, or Windows Phone, etc. They all use different subsets and variations of the "full" framework. So a dll compiled against one flavor of the framework will not work with a different target.
PCLs avoid this by allowing you to target multiple frameworks and use the intersection of functions that they all support.
PCLs are one of the two ways of sharing code between platform-specific projects in Xamarin (the other being Shared Projects). They allow you to target multiple platforms, but you end up working with a smaller set of assemblies.

When to use a web framework and when to code with native language for android app

It's been a time that I developp on android using the native language on Eclipse ADT and Android Studio.
Mastering most of the "standard" stuff (services, broadcaster, accelerometer, online/offline apps, local and remote databases, ntf scanning, socket.io libraries etc...), I wanted to find new ways to architect my apps, and I ve finally found new ways to code, using Web Frameworks to make compiled applications.
Suddenly I was wondering, when to use which technolgy, for example :
ionic framework (with angular included & cordova)
phonegap & cordova
native language
other frameworks or ways to code
Thanks for advance
All about technology depend on your application, depend on time and your app complexity. If you are going with Cross platform apps, unquestionably cross platform is going to be more robust in the time to come. There is a simple rule for Cross platform apps, “write once use several times”. Same code can be used on multiple platforms but this requires a lot of customization to be able to match each platform’s individual requirements. HTML5 seems to be ruling the market due to its dynamic usage for building apps with different run times, patterns and frameworks. The PhoneGap framework whose name was changed lately by “Apache Cordova” is the best amongst all other tools. In this framework the developers write the mobile app in HTML, CSS and JavaScript....More about PhoneGap

Categories

Resources