I have developed an Android application which uses JNI (java native interface) for Archos 43.
Had no problems and i was able to run the application smoothly.
Later I tried to run the same application on Samsung I9100G Galaxy S II as well as Samsung I9100 Galaxy S II.
I was able to run the application on I9100G but not on I9100.
The reason being that the JNI part of the application was not supported on I9100.
I did try to get to know the reason for this and was able to find that I9100G uses Ti OMAP 4430 chipset and PowerVR SGX540 as GPU whereas I9100 uses Exynos 4210 chipset and Mali-400MP as GPU.
I suspect that the reason might be the change in chipset (since Archos 43 uses Ti OMAP as well). But any further results couldn't be obtained from my search.
update The application makes use of bluetooth. While trying to connect to a custom hardware(CH), am not able to get any response from the CH when am running the application on I9100. The bluetooth communication part is written using jni.
So my question is whether am not able to run my application with JNI on I9100 because of the chipset and if so why ?
Also a more general question is which devices support Android JNI applications and what are the basic features necessary in a device to run an Android JNI application ?
(I spent a considerable amount of my time trying to find the answers for all these questions and any help will be greatly appreciated.)
Thank You.
All Android devices 'support' JNI, that is how a big part of the OS is implemented: Java services and frameworks using native libraries via JNI. There are, however, different architectures, and if you have a native module, you need to make sure you build one for each architecture you want to support. Even if you are targeting ARM devices only, there are ARMv5 and ARMv7 ones out there. ARMv5 should work on all, but is slower.
Galaxy SII devices probably use the same architecture, so you've hit some other problem/bug. What errors did you get? Post logcat if available. Maybe you are trying to access hardware that is not available on one of the devices? Or link against system libraries that are for some reason missing?
Now that you disclosed that the problem might be related to BT on 2.3.3, it all makes sense. The Android Bluetooth interface before 4.0 was not standartized, and it's most likely that your code is TI OMAP - specific. So, if you want to support other chipsets, you need to communicate to other drivers, or target devices with ICS and higher.
Related
Running the example android project on a weak android device such as ASUS ZenPad P01Z gives really buggy and slow results. Same happens when I try running my custom model on the same device.
What are the known hardware requirements or known range of devices that wouldn't be able to run TensorFlow effectively and efficiently?
I think that this is a difficult question to answer as it is too vague. Your definition of efficient and effective aren't clear.
The minimum specs as far as I know are a device running API Level >21 (although >=23 recommended).
I have it running a number of devices at a decent inference time but it depends on your definition. You can enter debug mode by pressing your volume key to see why your model is running slow and what your inference time is. I have it running on Nexus 6P, Pixel C tablet and some mid-tier Samsung phones fine.
As these demos are rather simple computations (and not too graphically intensive) then I would suggest looking at devices with decent CPUs.
Is Way To Run Machine Code Instead Android OS In Android Devices ?
I Want Remove Android Os And Work With Cpu And Other Devices Directly .
What Compiler I Can Use ?
MASM is an x86 assembler, so it would not be suitable for most Android devices as the vast majority use ARM-based processors.
That said, Android phones are computers just like any other and can be programmed in assembly. The first thing you'll need to do is select a device running a well documented CPU and chipset.
Since you'll be removing Android and plan on programming in assembly you'll need to write your own routines for nearly everything. An understanding of the CPU, power management and some form of I/O (you can avoid having to write complex display code if you plan to interface with the phone through serial communication, for example).
Unfortunately, much of the information required for successfully writing your own OS for an Android device is unavailable so you'll need some hardware analysis tools to assist in reverse engineering some of this information. A logic analyzer may be useful in sniffing some of the protocols used between chips, although much of modern phones is done on a single SoC, so you'll need to experiment heavily and compile information from a wide variety of online sources.
Aside from that, it's smooth sailing. Programming an OS in assembly for Android is pretty much the same as programming an OS in assembly for any other computer and you'll find it to be rather familiar territory.
I am interested in building Android for Source for a Galaxy S3 (but just knowing how to do it in general will be quite helpful)
I know how to do it for all the nexus devices in general, but I was wondering how to do it for some of the other phones. I know that it is possible because CyanogenMod and other modders do it. Usually when they announce them they include the source for the kernel.
How do you put the pieces together? Getting the android source code and the custom kernel together in something that can be flashed.
Generally it is not trivial. You need some binary files for hardware support (camera, WiFi, NFC, etc) and you need to figure out which those are and how to pull them from the device. The kernel is GPL licensed, so the the manufacturer will release their version/patches at some point, but you might have to wait. Then you have to create device build files to put all those together in an image for the particular device. Your best bet is to get CyanogenMod source and see how it is done in practice.
Can anyone point me towards a tried and tested development kit (board) for Bluetooth Low Energy?
I am especially interested in the proximity profile, and compatibility with smartphone (especially iPhones and Android devices - but also any other that would have BTLE).
Also, can you tell me which smartphones would support the proximity profile?
If you are looking for API support for BT LE features then there is very little at the moment. For example, Android at API16 does not support. It is all rather disappointing so far. In many instances the HW supports it but the middleware / upper layers do not. There is SOME support on iOS (with Iphone4s) and with certain Moto phones (need the SDK add on) but it is limited.
iOS is probably your best bet (who'd have thought that).
Personally I am looking to use the GAP and GATT interface on Android (ICS/JB), which is mandatory for a BT4.0 listed device (such as the BT ICs in high end smartphones) but GAP does not seem to be exposed.
Oh, and if you need a dev kit (for SW dev then this link might help > http://blog.bluetooth-smart.com/2011/10/05/bluetooth-low-energy-development-kits-2/)
The Bluegiga DKBLE112 Development Board (out of the box) can communicate with the iPhone 4S on IOS 6. The IOS code tutorials by http://olesitune.mine.nu/blelogg/?page_id=78 and http://olesitune.mine.nu/blelogg/?page_id=180 will discover the DKBLE112, the built-in thermometer service, and the associated characteristics. The code displays the BLE information on the iPhone and in the Xcode Console if the iPhone is tethered through USB. The DKBLE112 is expensive (nearly $400) but it does include many capabilities that I have not yet explored.
I note that tod list devices that have BT4.0 functionality. Of course that does not guarantee that APIs will be exposed in the SDK. If you stick with an already implemented profile then you may be ok but as I said, you certainly will not find that in the Android API16. SO, custom implementations.
One of the nice things with BT LE is that profiles are relatively "light" and hence, you can pretty easily make your own...but if the phone side API does not give access to the lower level (only talking GAP and GATT here) then not much use..
The guys who produce the tod seem to have done pretty well with a BLE device that functions as a proximity sensor.
They've managed to get their device working on the following phones:
iPhone 4s, Droid Razr and Razr Maxx, Samsung Galaxy S3, HTC One S, X, V, LG Optimus LTE2, Droid 4, Droid Incredible 4G LTE, HTC EVO 4g LTE, HTC Desire C, Sony Xperia GX, Sony Xperia SX, ASUS PadFone
So it is possible. My recommendation for a dev kit is the Bluegiga BLE112 with a CC Debugger from Texas Instruments. Your options for programming are either the $4,000 IAR compiler, the proprietary Bluegiga API "BGScript" (if you don't have access to IAR), or use an external microcontroller with the compiler of your choice.
I am using a TI ez430-rf256x development kit with "IAR Embedded Workbench for MSP430 v5.51.5". When TI 1st released the ez430, they were using a crappy stack that was buggy and just wasn't capable. They have now switched to a Bluetopia based stack and it is great! It comes with a LOT of samples, supports ALL profiles (including all the new low energy profiles), and is easy to use. I believe the Bluetopia stack also supports I have it talking to my Galaxy Nexus over classic bluetooth, but unfortunately, as of Android 4.2.2, there is still no support for Bluetooth low energy (which the ez430 does support.) It appears that Google may address this issue in Android 4.2.3. In my opinion, there is no reason to use something like Bluegiga, as you will pay more in licensing costs to them, than you will spend on a compiler like IAR. This is a link to an explanation of the new stack that TI is using: http://www.stonestreetone.com/bluetopiaLE.cfm
I realize this is an old question and in disclosure I am a developer on this project: Anaren Atmosphere.
Anaren has produced a Bluetooth Smart Multi-Sensor Development Board with the A27037 module based on the Broadcom BCM27037 that is compatible with the Wiced SDK. It also features an online development environment that is a GUI/IDE that allows you to both program the module and create associated iOS and android applications to communicate with it.
The development kit is available from various distributors and the development tool is free to use.
I am trying to develop a BLE bluetooth (SMART) application for Android.
I managed to download the Broadcom BLE SDK, install through the Android SDK Manager as explained on the web site and download the projects examples.
When I tried to push one of the examples into my tests phones (HTC One S, HTC One X both with Bluetooth BLE feature), I am facing the following issue:
INSTALL_FAILED_MISSING_SHARED_LIBRARY
Is there any possibility to include the broadcom library described in the AndroidManifest.xml file ?
<uses-library android:name="com.broadcom.bt.le" android:required="true"/>
Is someone managed to test the broadcom projects examples? And on which phone?
According to this post, a bug has been discovered on Samsung Galaxy S3, but I didn't find any information about HTC products.
UPDATE : What a great news!!!
Last Android version 4.3 (Jelly Bean) now support low-energy Bluetooth Smart accessories.
http://www.android.com/about/jelly-bean/
https://developer.bluetooth.org/Pages/Bluetooth-Android-Developers.aspx
Not sure that every phones will have an update (even the last HTC One M7 for example) but next phones will certainly embed this major release.
The problem is that if your phone doesn't have the .so file installed, this isn't going to help.
And your device will only (as of this writing) have the .so file if Broadcom has blessed the device.
For example, the latest official build (4.0.4) for the reasonably-new Samsung Galaxy Nexus does not.
For those that don't know, there are two different (incompatible) APIs for LOW-ENERGY Bluetooth (BtLE, now apparently called BT Smart). One is from Broadcom, and the other is from Motorola. Unsurprisingly, each only works on a phone that has that vendor's chips in it.
This is a terrible, terrible situation, and Google REALLY needs to get moving on a solution or Android will become totally irrelevant in a little industry known as HEALTHCARE!!!!!
The HTC One X and One S use a Qualcomm Bluetooth chip, not Broadcom. Therefore the Broadcom SDK would not be expected to work. There is an HTC BLE SDK that works with the HTC One X+, Droid DNA, and HTC One that you can sign up for the HTC BLE SDK here:
http://www.htcdev.com/devcenter/opensense-sdk/partner-apis/bluetooth-low-energy/
Confirming BroadCom BLE stack works on HTC 1X+ and cooperates with standard TI KeyFob Demo.
Seems like I'm making a dumb post, but I thought someone might be encouraged to keep going by an unequivocal statement of at least a tiny success.
BleFindMeClient really does work on the HTC 1X+ in conjunction with the TI CC2540-mini Keyfob aka KeyFobDemo in the TI distro.
I've never written an Andoid app., or code for the TI keyfob, so it took me a frustratingly long while to figure out how all the tools worked and how to configure them, but there was no real magic. For me, some of the other Android demos don't compile out the gate without some code tweaks, but that could just be my inexperience.
http://youtu.be/cqWpjU7gJ2Q
On the other issue regarding getDeviceType(), here is a code fragment that works perfectly every time on the HTC 1x+. Hope this helps too.
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
if ( BleAdapter.getDeviceType(device) == BleAdapter.DEVICE_TYPE_BLE ) {
...
}
Someone find the solution here.
The three steps to do are :
Do not include in manifest file.
In project Properties → Java Build Path → Libraries → Add external jar, add broadcom ble jar.
In project Properties → Java Build Path → Order and Export, check the included jar in step 2.
Finally, the Broadcom samples projects run, but crash after few seconds due to an unknown virtual method not implemented on HTC (.getDeviceType(), ...)!
It seems that something might be missing on the HTC phones as well. This error means that there is probably a layer of software missing (or malfunctioning) between the BLE hardware and the API. As for today I have only seen BLE kind of working on an the Motorola Razr but it seems to be limited to the heart rate profile (and it does not use the Broadcom API).
If any body writing a app depending on this SDK, there is one line I want to tell
in DeviceDiscovery they call a method getDeviceType which is not defined anywhere in the entire Android JB codebase hence it crashes there only. so if are trying hard to remove the crash, just keep in mind you can not do it if it is crashing in device Discovery event.
What a great news!!!
Last Android version 4.3 (Jelly Bean) now support low-energy Bluetooth Smart accessories.
http://www.android.com/about/jelly-bean/
https://developer.bluetooth.org/Pages/Bluetooth-Android-Developers.aspx
Not sure that every phones will have an update (even the last HTC One M7 for example) but next phones will certainly embed this major release.
Just to clarify, only starting with these currently available HTC devices will you find BLE support:
the HTC One X+, the HTC Droid DNA, and of course the HTC One and upcoming flagship devices. Note that as of 4.3, you should migrate to use the standard official Android BLE API, to support devices pre-4.3 you can use the HTC BLE API. See https://www.htcdev.com/devcenter/opensense-sdk/bluetooth-smart for more info and sample code supporting both APIs.