Using Android apps with native code on Blackberry - android

When porting my Android app to Blackberry 10/Playbook, I get the error:
native-code: x86
This error has also been reported here and here. The app uses OpenCV for Android as a library project, which contains native code, and I'm aware that Blackberry lists native code as an unsupported feature. Is there any way to get apps with native code to work on Blackberry, even for experimental purposes?

From what I can tell, you'll have to port it over to Blackberry's Native Platform.
http://developer.blackberry.com/develop/platform_choice/ndk.html
It looks like Blackberry put up a rough port on Github.
https://github.com/blackberry/OpenCV
I haven't used it so I can't comment on how well it works.

Related

Can you publish an app made with Android Studio to iOS platforms?

Can you publish an app made with android studio to iOS platforms? Is there a compiler that lets you compile your Android Studio app to and iOS platform working app?
It is not practical to run Android apps on iOS or the other way round.
Each operating system of each platform has different native components. The native Android or iOS app development requires using different programming languages, design interface, navigation, integration process.
The Android system uses the instruction set of the Java virtual machine called ByteCode. iOS, on the other hand, implements the compiled code.
Running Android apps on iOS is not possible because of the following factors:
Different lifecycle of apps in the system.
Different lifecycle of app screens within the app itself.
Different approaches regarding data access.
It is misleading to be told to use some kind of service or program to transfer your app to another platform with just a few clicks. Online tools like an Android to iOS converter do not work.
The only exception is the case if your app has been developed cross-platform from the beginning. There are some web-based libraries and frameworks which can help you develop hybrid apps. You can also have a look at flutter & xamarin but the app must be all done in that framework.
As far as I know, there is no something that can do that. Android is very different from IOS. If you want, there are a lot of tools that you can develop with them apps for both Android and IOS, with one codebase.
Some of these tools:
React Native
Flutter
Xamarin
PhoneGap
Apache Cordova
But if you will use one of these tools, instead of Android Studio for Android and XCode - It will not have the same performance as if it was written with Android Studio and XCode.
The reason for that is because the platform-specific tool (Android Studio / XCode) can talk directly with the Operating System, while the cross-platform tool (React Native / Fultter etc.), cannot talk directly with the Operating System.
Hope I helped you!
You can do this with Flutter.
https://flutter.dev/
They are different from writing standard android apps, and use Dart rather than Kotlin/Java.
It does have a good tight integration with Android Studio however.

Mpg123 builds for IOS and Android

I'm working with Mpg123 and using for implementation in my own cross-platform app. I'm working with C# and using PInvoke for calling native methods. There are no any problems to get dll for windows platform. The official site is providing ready builds for Windows. But there are no any builds for IOS and Android. I'm not familiar with building native C++ libraries for Android and IOS. And I'm interested in to know it.
Can you provide steps, what I have to do for this goals?

Android App Crash: Running demo NaCl app (pexe app) on mobile using Apache Cordova

I'm trying to run a Chrome App on Android Mobile using the instructions from:
developer.chrome.com/apps/chrome_apps_on_mobile
From above URL, I could run the calculator app fine in Android Emulator 5.0.1 fine. No issues.
github.com/GoogleChrome/chrome-app-samples/tree/master/samples/calculator
Chrome App Calculator on Android Screenshot
Then I tried running the "Native Client" App on Desktop from example api directory of nacl_sdk:
developer.chrome.com/native-client/sdk/download
nacl_sdk comes with few examples including demo and core api examples. All examples works fine on Desktop. Out of them I took 'file_io' api example which runs fine after compiling (make). I took that folder and used the following command to create cca cordova app:
cca create FileApp --copy-from=/path/to/file_io/manifest.json
Then cd to FileApp and cca prepare
After that ran Android eumlate command:
cca run android --target=avd5
It processed everything fine, and I see no errors building this cordova app like calculator app. But, after 'LAUNCH SUCCESS' when the app launched the Android emulator crashed. The emulator windows closed.
I started the Android Emulator from AVD Manager, and after booting up Android I tried starting the 'File I/O' app, which in result showed me the message
"Unfortunately, File I/O has stopped." Screenshot
Does that mean the PNaCl/NaCl apps still are not supported on Android OS?
The NaCl app contains the .pexe file.
Is there any step in between I could be missing?
I'd really appreciate any help in this regard to test if I could run Native Client Apps on Android OS just like the Chrome Mobile Apps using Apache Cordova examples work.
Native Client (NaCl) isn't supported in Chrome for Android (and by implication the Chrome/Chromium based WebView).
See: http://developer.chrome.com/multidevice/faq
Q: Does Native Client work on Chrome for Android?
A: It does not, and we have no plans to announce at this time.
But then the OP read at: https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/faq.md#is-nacl--pnacl-supported
Q: Is NaCl/PNaCl supported [in Cordova]?
A: No. However, you can still compile and use native code
by writing a custom Cordova plugin.
And unfortunately the word native is an overloaded word with different meanings depending on context, so the OP started asking about the Android Native Development Kit (NDK).
The Android NDK which uses Java Native Interface (JNI) for C/C++ code to communicate with the Android Java framework. Typically Android apps only use the NDK if there is need to port existing C/C++ libraries or have a computational performance requirement like physics modeling or image processing.
When Cordova is referring to 'native code' its referring to code written in Android Java which would need to be bridged via a Cordova plugin to the JavaScript side.
And of course why to use any of the above frameworks/APIs depends on what the OP wants to do.

Can I build Android apps with react native?

The recently launched react native features just iOS app example and docs.
Yes.
React Native for Android was released September 14th, 2015.
Docs: http://facebook.github.io/react-native/
No. You can't build Android apps with this release.
Facebook has indicated that they are working on an Android version, and famously said "give us 6 months", which some people have taken as a promise. I wouldn't base any important business decisions on the illusion that it will be unveiled when the 6 months is over, but you can at least take some hope in the fact that they're serious about making it production-ready before they give us access to it, and that it's not just a pie-in-the-sky hope.
Also, as others have pointed out, Facebook has already release apps that they've built with the Android version of React Native. So at least parts of it are ready for prime time.
UPDATE
Early support for React Native for Android has been pushed to GitHub!
As noted, there are several things that are currently not working if trying to port an application from iOS. But it's worth checking out.
https://github.com/facebook/react-native/commit/42eb5464fd8a65ed84b799de5d4dc225349449be
It is not aiming to be a cross platform, write-once run-anywhere, tool. It is aiming to be learn-once write-anywhere. -Colin Eberhardt, from Raywenderlich
Good news is that React Native for Android is finally here. (https://code.facebook.com/posts/1189117404435352)
while you can't do it right now, it shouldn't take that long.
The first React Native Android App has been published about two weeks ago in the play store as tweeted by the reactjs twitter account:
https://twitter.com/reactjs/status/615638361328349185
Great news! Now its possible!
"And so it happens, the commit we're waiting since about 6 months!" - usereact.com
Please read more on: http://www.reactnative.com/react-native-for-android/
Watch this video: https://www.youtube.com/watch?v=MNNR01NF290
I've tried out Facebook react native on Android and it really worked.
Simple Ubuntu install guide can be found here
Simple js files: link
Yes , We can now developed android apps too in react-native.
and some of the apps are already developed in react-native for android
suchs as:
1)F8
2)Facebook ads manager
3)Squad
4)Discovery VR
5)Ziliun etc..
and many more still counting.
Developers from around the world now opting react-native for mobile app development because of easy of use of JSX syntax.
and also it is commonly noted as simply the V in MVC.
Since React makes no assumptions about the rest of your technology stack, it's easily embeddable within an existing non-React Native app.
TLDR; Yes,
Detailed answer (As of November 2017)
React Native android application development is very stable and a good number of Android applications have been already built and used in production using React-Native.
You can find a showcase of applications here. Most of them have both IOS and Android versions.
You can also easily integrate your native Android java code to react-native. Refer here
As a developer who is building Android app using react-native with a lot of native java code dependencies, react-native runs stable and I found the documentation and community support is adequate.
Yes, it works for both the platforms ios and android, be sure to mention code entry points in app.js if it uses different code for different platforms. However native functions like native events or location manager need to be coded in native languages and then exported using RCT_EXPORT, you can find more about it in the docs
Sure,
Using React Native you can build real mobile app. real app means close to platform or simply can say 99% native app.react native provide easy way for building native android app using javascript for lucrative design.You have basic knowledge of android studio and error fixing in android studio related native module integration and good understanding of react.js then you can build android app using react native.
Basic Requirement for android app
1. Configure android studio please follow below link and avoid installation of python.
https://facebook.github.io/react-native/docs/getting-started .
2. for UI you will learn flex-box from official documentation.
I thing that is enough
Yes, not just with android but also with iOS using XCode
Yes, you can make real-world mob application with React-Native. React-Native is used to create a hybrid mobile application. In this, we write code in javascript which gets converted to swift for ios and java for android.
Yes, You can build the Android app using React Native. For this, you have to install Android Studio with all the required SDKs. You can run your React Native app in Android simulator by using Android Studio and command line both.
For command line, run the following command:
react-native run-android
Otherwise you can open the android project in Android Studio which is created by React Native in android folder and run the project from there.
Happy Coding.. :)
Yes, you can definitely build android apps using react-native.This is one of the great benefits of React Native. Before Facebook created it, you had to build your app twice and with different code : one for iOS using Swift or Objective-C and one for Android using Java or Kotlin.

Port .NET dll to different platforms

I have a dll based on .NET 2.0 with full source code access.
So I can build it in VS2010.
I need to port this to Android/iOS/MacOS.
As a result I expect some equivalent of dll for each platform.
So another programmer can link (doesn't matter how) this equivalent to his own project at one of that targeted platform.
For example I ran MonoDevelop on Mac and don't see how I can build my .NET project and to receive such equivalent of dll.
So I need help to find solution and understand what to do to receive requierd result.
There are CLI implementations, primarily Mono, that work on both iOS and droid. The simplest tools here are MonoTouch and Mono for Android, both available from Xamarin. With these tools, you can build and test your dll targetting the relevant frameworks. Another programmer, again using the MonoTouch or Mono for Android tools, can reference those dlls, and build their application, with all the tools necessary to package and deploy (side-loading or via, say, the device's store) an application using that library. This deployment will typically also include all the runtime/framework pieces needed by the application.
MonoTouch makes use of the MonoDevelop IDE, so will be familiar to you as a MonoDevelop user. Mono for Android can do that (i.e. be hosted inside MonoDevelop), but can also be used inside Visual Studio.
Running .NET code requires a .NET runtime to be installed. Neither Android nor iOS devices come with such a runtime preinstalled.
In theory, you could install the Mono Runtime (a open-source .NET alternative) on an Android device or a jailbroken iPhone/iPad. However, as I understand it, you're looking for a way to create a library to give developers, so this isn't a good solution.
However, what could work is creating a library with MonoTouch. MonoTouch compiles your .NET code to a binary that iOS devices can use - regardless if they're jailbroken or not, without needing a runtime installed.
If you follow best practices, you might port your library successfully, such as
http://sharpsnmplib.codeplex.com/discussions/390251
However, it purely depends on the characteristics of your library, which you does not mention yet.

Categories

Resources