Does codenameone has something equivalent to Android's bound services? - android

I am looking to replace the Android bound services (Binder/IBinder) used in my existing code to make it work with codenameone then create an iOS app. Is it possible?
Thanks.

You can use IBinder/Binder in the Android native code that you integrate with your application. But it has no equivalent in other OSs so we can't create a portable abstraction for it.

Related

Can we use an android library (aar) in a GeneXus android app?

We have an android library for mobile data gathering (location, mobile device, etc.) that I would like to share with a partner. This aar component was developed using java and android studio, vanilla stuff.
Problem is, this partner is using GeneXus platform. I have performed a research and what I have found is that you can create an android component using GeneXus, but nothing related to consuming one (an external aar file).
Does anyone know if that is possible?
I also have verified that you can have access to "some" device data, like geo localisation, but that is it. Point is, I could create something in GeneXus, however with far less data richness than native android.
Yes, you can extend Genexus Android native app by using any native library you need to use.
Genexus provide Extensions Library for extensibility in native application.
You can create an External Object in Genexus and then use it in your application.
You can find a full sample in Github with step by step documentation:
https://github.com/genexuslabs/SDExtensionsSample
Best,

Using Native Android Bluetooth Support for Codename

Need help with a working example of native android bluetooth support for codenameone apps. I have one working in android but having a problem integrating with codenameone.Thanks in advance.
If you have working code in Android already, you just need to create a Native Interface to handle the API calls and callbacks you need. You'll be able to use most of your Android code, a few modifications will be needed to strip out the parts that control the UI. Check the developer guide, it discusses this. I believe that there's also a tutorial video.
There is also a CN1Lib or extension for Bluetooth Low Energy, if that's what you're developing.

in Android written application in the Codenameone environment?

Is it possible to adapt and integrate a in Android complete written application in the Codenameone environment? how far would that be possible? If yes, can we perform the same package structure? What about the Adabtation Android's packages (including the Android functions) in Code Name One? Will it also retained the responsive design and the original resolution?
You need to adapt the code to use Codename One API's and not Android API's. The resulting app will run on Android, iOS etc. See http://www.codenameone.com/android.html

MVVMCross (WP8, Android, iPhone) + Azure Mobile Service

I need to create an app for WP8, Android and iPhone that uses the Azure Mobile Service. I am really impressed by the MvvmCross project so I really want to use it.
Before starting I have some questions:
Can I add the AMS SDK to the .Core project and will it work for all platforms?
Is the a easy way to handle the login views for the authentication providers on the different platforms?
I am a little bit confused by the profiles, which one should I use?
I would really appreciate if anyone can answer my questions,
Michi
Can I add the AMS SDK to the .Core project and will it work for all platforms?
The Core project is a Portable Class Library.
If you want to use Azure Mobile Service SDK in it, it means you need to add it as a reference to the Core PCL, which means the AMS SDK needs to be a PCL also.
Further more, if you need it for all platforms (Windows Store, Phone, iOS, Android) this means the AMS PCL needs to have an implementation which works on all these platforms.
Looking to https://github.com/WindowsAzure/azure-mobile-services, it looks like the PCL is ony for Windows 8 and Windows Phone 8.
There is however a Xamarin component for Azure Mobile Services, but it's not a PCL (if you download it and check it, there's a separate DLL for Android and iOS):
http://components.xamarin.com/view/azure-mobile-services/
http://www.windowsazure.com/en-us/documentation/articles/partner-xamarin-mobile-services-ios-get-started/
If you want to have a portable functionality in the Core to be used by the view-models, what you can do is define an service interface like IMyAMSClientService in the Core and have it implemented on each platform (you implement MyAMSClientService on each platform, in the app project). You will need to think about a mechanism to handle the AMS functionality in an unified way.
Is the a easy way to handle the login views for the authentication
providers on the different platforms?
Like I said above, you can have something like an IMyAMSClientService in the Core. The actual implementation of it will be on each platform and it will do the calls to the AMS SDK.
I am a little bit confused by the profiles, which one should I use?
I assume you refer to PCL profiles?
You don't need to use anymore any hacks to get the Xamarin profiles available when you create a PCL. Did you try to create a PCL? The Xamarin profiles should be there. You need to have Xamarin installed though.

Does the use of Flurry or Localytics with Mono necessarily imply that two separate implementations will be needed for iOS and Android?

I intend to use either Flurry or Localytics for performing analytics on my mobile app. I am developing in Mono. The point of Mono is that your source code doesn't need to change and you can develop applications for both iOS and Android with the same source code. But, I found that Flurry and Localytics code is platform dependent. So this seems to destroy my purpose of using the same source code for both Android and iPhone. Is this correct? Is there a workaround that I can use? And no, I am not intending to use Google Analytics.
I'm a developer on the Localytics team working on the client libraries. The answer is that yes, it does ultimately require different implementations, as there are some differences in the Android and iOS library. As Robert's suggested, you may want to build your own platform abstraction class.
You may need a bridge class to switch between the two implementations, but the remainder of your code should stay cross-platform compatible. You may also need to make your API calls dynamically, since you may not be able to bind the "foreign" library statically.

Categories

Resources