Cardboard SDK Unity - way to go native and share properties? - android

We are new to unity, and experimenting with a cardboard component. This is a separate project for now, but we would like to move this code over to our existing projects and have it called from non unity activities/controllers. But is there a way for the two technologies to share data? Based on some choices in the non-unity part of the app, it will change what URL the unity part needs to call. Can we use NSUserDefaults/SharedPreferences for Unity to get data from the other native side?

Unity can communicate with native code through the plugin architecture, documented here:
http://docs.unity3d.com/Manual/Plugins.html
This is way too big a subject for me to provide more than this frowned-upon link-only answer.

Related

Is there a way to create iOS and Android libraries (maven and cocoapds) from one source code (eg. via Flutter)?

We are looking for a way to create a simple mobile SDK for both Android as well as iOS.
The SDK is super simple and will only make API calls and open page in WebView.
Is there a tool or language (eg. Flutter/React Native) where we would be able to create the small SDK and then export it for both Android and iOS and add in their respective repositories?
Or are we going to have to create 2 projects in for example Swift and Kotlin?
Looking for advices and best practices. Thank you.

Create custom SDK for React Native

What i want to achieve is something like creating my own SDK like what react-native-fbsdk or rn-onesignal-sdk provides , so that those functionalities can be implemented in the react native project.
Basic questions :
Where to start from? Like what are the pre-requisites?
Native coding is required i believe for this functionality?
Any explanation or any such experience in such would be of great help .
Where to start from? Like what are the pre-requisites?
You can use a template like this one. It includes an example project which is basically an app that you can use to test integration of your native module and to quickly iterate on it.
Native coding is required i believe for this functionality?
Only if you need to use platform-specific functionality, or provide bindings to some pre-existing native library. Both examples you mentioned do exactly that – because they have native SDKs that can be used in non-RN apps, and they provide React Native bindings for them.
If your library is just business logic + some networking, and you don't intend it to be used in non-RN apps, you can do it all in JS. No need for native code. If you choose to go with the template that I have linked above, there are instructions how to use it to create a pure JS React Native library.
I'll be happy to update my answer if you can share some concrete requirements of what you want your SDK to do.

Incorporate vuforia android SDK in a new project

I want to use vuforia sdk's text recognition module in my new app.
I have been successful in building and running their sample apps. However, having done that was apparently not enough for me to figure out how to start using vuforia android sdk in my mew project in a proper way.
The IDE is Android Studio. I have the license key for my vuforia account.
Could someone help me get started? I jist need to start using vuforia as a library in my own personal project. I do not want to start developing directly over their sample apps.
I am sorry if the context of the questions doesn't fit into that of this particular community.
I wanted to do exactly what you said. I didn't want to build on the top of their samples. I struggled to find a tutorial but there is none, at least I was not able to fine one. Turns out it is really easy. Go to the Vuforia folder(wherever you installed it) and then head to vuforia-sdk-android-X-XX-X\build\java\vuforia and copy the .jar file and paste that file to your new project in Android studio inside your libs folder. Then add this line to your Build.Gradle
compile files('libs/Vuforia.jar')
inside your dependencies. That's it. You can access all the Vuforia classes from there. Don't forget to instanciate them just like in the example with your own key from Vuforia developer console.
I don't know if this is still relevant, but... This link shows what you need to do, code-wise, for creating a new Vuforia App: How can I build a basic Vuforia app. This, along with the links you have already seen regarding the setup, should be enough for you to get started from scratch.
Instead of relying on Vuforia's module, I built my own real-time OCR from scratch, using the Camera (1) API and Google's Mobile Vision Library.
My app - Optical Dictionary & Vocabulary Teacher - performs a lot better than Vuforia's module. It does real-time scanning of words, shows them in a more friendly manner, and does way better validation of words. It even lemmatizes the words (e.g fooled -> fool, thieves -> thief etc).
Also, needless to say that this gave me complete control over my module as well.
Here is a Video Demo of my app.
If any one wants to build something similar, they can feel free to contact me for assistance.

Xcode or Xamarin?

I am a ios developer , We have a requirement where we have to develop an app (with Maps,GPS tracking,Charts) in both ios and android, We are planning to use Xamarin cross platform to develop so that we can write common business logic for both the projects,
As per my research its not recommended to use xamarin.forms for the apps which needs more platforms specific functionalities like Maps,GPS tracking,Charts
by my research I found Xamrin.ios and xamarin.android are best approach to implement more platform specific functionalities
My question is , Xamarin.ios and xamarin.android are they 2 seperate projects? could I able to share business logic between those? As per my understanding in xamarin.ios and xamrin.android we will be calling our native ios/android APIs and frameworks hence we cant share the code , am I right?
Can we share code in xamarin (Xamarin.ios/xamarin.android) if we dont use Xamarin.forms?
Wat are the benefits we will get if we use xamarin.ios/xamrin.android instead of Native development with obj c / Java ?
You can have a Xamarin.android and Xamarin.iOS project in a single solution and have code sharing with a common business logic using MVVM design pattern , PCL (Portable Class Libraries) and linked source files. For the case of platform specific code in a shared code , inversion of control can be used
You try to squeeze as much as common code behind as possible , so you will only have to implement the GUI twice (Android and iOS)

ZXing Library in Titanium

Can can tell me how to use the ZXing library in an android app in TITANIUM.I have downloaded the ZXing library from the following path : http://code.google.com/p/zxing/downloads/detail?name=ZXing-2.0.zip
Creating a custom module is the only way to do this. Therefore you have to have knowledge of the native platform.
Modules are not too difficult if you have native platform experience (or just know Java for Android). I would check the moddevguide example module which is chock full of examples of passing data back and forth, which is available in the public Titanium repository on github. Also, the paint module is a great example of subclassing to roll your own titanium component.
So first go here and follow these step-by-step instructions on how to start your own module. Documentation Link
Then check out this code for great examples of passing data throughout your app. Titanium Github
All that aside, if you dont have native platform experience, why not just use either the Titanium Plus modules barcode scanner? Or this open source alternative?
No need to reinvent the wheel at this point.

Categories

Resources