I am using android 2.2 version. I want to use the USB related API's in android application. but in android 2.2 version is not having the API's in the applicaition framework layer.It is available in 3.1 and newer version of android.
but in android source code i have seen libraries for USB (API 's in the format of .c and .h file).whether i can able to access the api in the application layer of the android. I want to use the USB device for example, Test CDC class.
For example : if i want to initalize the USB then i can able to call the USB_init() function which is in the USB.c.. Is this possible???? any one please help me.......
Regards
Ram
Related
We have a well established iOS (iPad only) app written on top of Appcelerator's Titanium platform. We're looking to integrate a third-party piece of hardware with our app that interfaces with the headphone jack on the iPad. The third-party company provides an official iOS SDK to be used in XCode projects.
How can we get the provided SDK to work in our Titanium app?
You'll have to create a module. Check the guide here.
You can also search the internet. There might be existing modules already for your third-party SDK.
Does Apache Cordova have the abilty to use the mobile device's bluetooth. I'm currently making an app on Android and it uses bluetooth but I would also like to make the same app on Apache Cordova and I can't find any type of documentation regarding using Apache Cordova and bluetooth.
Apache Cordova can make all platform APIs from iOS or Android available within a so called WebView. A WebView is basically rendering HTML, CSS and executing JavaScript. Platform APIs can be made available through plugins in Apache Cordova and inside the WebView can be used via JavaScript. You can either write your own plugin or use an existing one.
Android allows for Bluetooth classic and Bluetooth low energy. To my best knowledge iOS only has support for Bluetooth low energy. There are several plugins available for bluetooth support inside an Apache Cordova app, just use the plugin search on the Apache Cordova Website: https://cordova.apache.org/plugins/
Ranked by github stars you might use the following plugin for bluetooth le:
https://github.com/randdusing/cordova-plugin-bluetoothle
Or the following for bluetooth classic:
https://github.com/don/BluetoothSerial
#AdamV,
You'll have to use a plugin. Most anything you want to do on Phonegap requires a plugin.
My list (duplicate of Phonegap offical, list on page)
http://codesnippets.altervista.org/documentation/phonegap/plugins/list_of_plugins.html
The Cordova version:
http://plugins.cordova.io/#/search?search=bluetooth
i'm trying to get the preferred language set on the device as following:
navigator.globalization.getPreferredLanguage(
function (language) {
alert('language: ' + language.value + '\n');
},
function () {
alert('nope');
}
);
And when I click on emulator i'm getting this pop-up:
I installed the cordova plug-in to use globalization:
cordova plugin add org.apache.cordova.globalization
And I also added this line on the config.xml:
<plugin name="Globalization" value="org.apache.cordova.Globalization" />
I tested on the device and it's working.
Btw, I'm using cordova 3.5 version but when i launch the intel xdk emulator it shows 2.9 version. Maybe that's causing this problem? I'm also using Storage plugin for sql queries and it's working fine!
Cordova plugins generally consist of two parts: 1) JavaScript API and 2) underlying native code that is specific to the target platform (e.g., Java code for Android, Objective C code for iOS, etc.) The Intel XDK emulator is a simulator that simulates that native part, but only in a very generic way and only for a select number of Cordova APIs. For any APIs that it does not have an underlying "native simulation" it provides this message so you can at least exercise code. It doesn't actually simulate the underlying functionality, but it does allow you to trace through those parts of your code.
Ultimately, you need to run it on a real device with a real build, as you discovered.
Also, the APIs that the XDK emulator knows about, at this time, are the 2.9.0 APIs. It is being modified to support 3.x APIs in a future release. BTW, the emulator in the XDK is a customized implementation of the Ripple emulator.
I want to make an iphone app in corona which uses camera and audio recorder functionality but as far as i searched out, camera app is not supported on windows OS.
So am I not able to create such app on windows environment using corona SDK and need to switch to MAC OS??
Not being supported on windows means you cannot test on windows. If you test on the iPhone your app will work fine (if you made it correctly of course).
But you should not be developing for iOS on Windows, it is harder to debug, and you cannot upload it to apple store anyway,
You have to be on a Mac to build for iOS devices (or use a service like MacInTheCloud). Windows can only build for Android. You can develop on Windows but when you need to put it on a device, you will have to have access to a Mac.
I'd like to use monodroid to build an app that reads fingerprints from a USB device. Is there an SDK out there that I can use to do this?
If I used an existing fingerprint java SDK like http://www.neurotechnology.com/ , can it be mixed into a monodroid project? If I use the usb api in monodroid, will I be able to somehow use an existing driver to an external usb fingerprint device?
I doubt that there is an SDK written for Mono for Android for fingerprint biometrics. However you can mix Java with C#, so you are not out of luck.
So what you essentially can do is write a bunch of classes using the Fingerprint SDK you link to and compile and package it in a jar. If you are smart you also write a couple of helper classes in Java which does the heavy lifting, and the only thing you have to do is to bind it so that it can be invoked from Mono for Android.
More information on how to bind jars can be found in the Mono for Android documentation.