Android Marshmallow and above version can't trigger USB_DETACHED - android

I'm confused on why UsbManager.ACTION_USB_ACCESSORY_DETACHED from USB Accessory doesn't triggered in Marshmallow and Nougat versions but when using pre marshmallow versions I can trigger the broadcast.
My codes are based on the documentation in USB Accessory link above so no need to paste my code, the only thing is it doesn't trigger when using Marshmallow and up versions of android.
Thanks in advance

As i search the issues in reports bugs in Google i was able to find this issue on android firmware so basically it's more like on android OS problem that UsbManager.ACTION_USB_ACCESSORY_DETACHED was not triggered.Kindly visit on this issue.

Related

Android 4.4 Locked Task Mode

I'm creating a flutter app that will be installed on a Samsung Galaxy 7-inch Tablet with Android KitKat (v4.4). It will be the only app on the tablet, and will be implemented such that it loads when the device is powered up, and the user will be unable to exit the application.
I've found this on the Android Developer docs, but it only applies for versions 5.0 and over.
https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode#java
I have not been able to find any documentation/tutorials that could possibly assist with this, without using a 3rd party application such as Surelock and Kioware.
Is there a way to implement the above for older Android version (in my case for version 4.4)? Thank you.
As you are targeting an older Android version you will need to implement some workarounds, but luckily there is a very extensive tutorial on how to do just that for Android 4 which you can find here:
http://web.archive.org/web/20201101145703/https://www.andreasschrade.com/2015/02/16/android-tutorial-how-to-create-a-kiosk-mode-in-android/
As this is very platform specific you will need to develop directly for Android and then connect it to your Dart code with this tutorial.
If you control the devices your software will be installed on, you can also opt for the 'root' way of doing things which is described here:
Enabling KioskMode in Android 4.4.2 with Root

wear OS - http post from smartwatch

I want to create android application for smartwatch with a cellular internet connection that send HTTP post to a server.
What android version support should i have?
I saw that android 5.1 support cellular network but in Wikipedia it written that only android 7.1.1 support cellular data.
Watches and Phones have thier own OS. Perhaps you found something built to look like a watch that is actually using the phone OS. i wouldnt doubt it as the wear playform is not given the same attention...
But at least in part the actual watch versioning is confusing.
it started out as Android Wear 1.x 2.x then reset to Wear OS 1.x which is now up to version 2.6, all while the latest version for Pie was again renamed to letter version, which is version H... Go figure.
Also if starting now at i wouldnt worry about the older Android Wear hardware, and not even sure if you could buy a new 'Android Wear' watch at this point, so any watch that advertises 'Wear OS by Google' will support Wear OS.
Also I might concider getting a watch with the physical USB connector so you can debugging on the device itself... otherwise you have to manage debugging over bluetooth which at least for me is not always stable on one pc, and have never gotten to work on another...
But such advise is rather particular to me...
Update: it strikes me that you might have been speaking about the target version of Android, which yes admitingly is yet another version to get familiar with developing with wearable android...
Usually it is seen as the target or compile versoin, and from what Im aware the SDK is compatible from version 7.x to the latest 9.0... but perhaps there are eirlier versions that work with the older Android Wear down to what you mention 5.x Im unsure.
Currently i target 8.0 but moving to 8.1 to get at updated libraries im interested in.
And then there are the API Levels to get familiar with...
Ya honestly it's really confusing...

Can I develop an app with the Lollipop SDK for a 4.3 or 4.4 phone?

I recently received an invite to use Inbox and it is using the new material design feature from 5.0. So this got me wondering if I can develop an app with the new SDK to enable BLE peripheral, but for a Jellybean or KitKat device. Does anyone know if this is possible?
Here is the list of updates: http://android-developers.blogspot.ca/2014/10/whats-new-in-android-50-lollipop.html
No.
There are support libraries released to help backport apps running on older versions of Android. Here's a list of all of the support libraries and what they allow you to do.
Perihiperal profile has only just been introduced, but hasn't made it's way in to the support libraries. My guess would be because it's rooted much further down in the OS and isn't something that an app can bring in. This suggests that it won't ever be possible (unless perhaps the user is running a custom ROM).
4.3+ already supports lots of Bluetooth LE features, it just doesn't support peripheral profiles. I have personally been waiting for this for a project of mine, so very excited that it's now available in Lollipop.
Hope that helps.

Can we turn our Android device into a beacon?

Hi recently I started working on beacons. I am using estimote beacons for my purpose. But I got a doubt whether we can turn our device into beacons. If not why.
Thank you.
EDIT: This is now possible in Android 5.0 and to a limited extent in Android 4.4.3+. See here: https://stackoverflow.com/a/25035954/1461050
Unfortunately, this is not possible as of the latest Android 4.4.2, because Android does not support BLE peripheral mode needed to advertise as an iBeacon. See here for details.
The good news is that peripheral mode support has been added to the Android open source project, so this may be possible in a future release, perhaps Android 5.0. While Google has made no announcements, look for a release in June 2014 during the Google I/O conference.

can we have wifi direct api working in 2.3 version

hi i am developing a app which will use proximity to pair other persons.
I can either use Bluetooth or Wifi Direct.
After some research i found out that Android ICS has API's for Wifi direct but if my application needs to work on older phones i need some API which can help me, please guide me.
Does Google provide any API to be included to the sdk to be used for older android versions or I am wondering if it is possible ??
I am reluctant to use Bluetooth because of it's slow connectivity.
thanks
I think that API was added on Ice Cream Sandwich (14). So you have no chance to use this API in older Android versions.

Categories

Resources