How to communicate with USB devices on Android via studio - android

I am making an application on an android tablet that is supposed to act as a file backup application, the tablet is going to be locked down and all applications other than the app I am making are to be disabled, the tablet is then to be shipped to users who will be recording video footage onto a USB flash drive using head-mounted cameras, at the end of each day the users are to plug the flash drives into the tablet, during this time, the application will wake up and allow the users to click the "backup" button, the files are then to be copied from the usb drives and saved on the tablet.
The users are assumed to be technology illiterate so we are not asking them to do anything more than plug the flash drive into the device and click the transfer button.
For testing purposes I have a flash drive, a USB 3.0 to Type-C adapter and a tablet, when I plug it all in the flash drive appears on my Android device, my question is, how do I communicate with the flash drive through code?
I'm using Android Studio, the flash drive is attached to my tablet via USB, my tablet is connected to Android Studio via wireless debugging, Android Studio detects and displays my tablet, however it does not display the USB device inserted into my tablet, which is what I need to communicate with. I would like for the flash drive to appear on Android Studio so I can know the correct file path to put in my code.
(I am aware that communication with external USB devices disallows my app from being published on the app store, this is an internal only app)

Related

How to display content over an HDMI cable from an old Android device to an external screen?

I have a very old Android 2.3.5 device (HTC Evo 4G) which has an HDMI cable connector. I am interested in using the wired HDMI connection to mirror the phone's screen or otherwise display images on an external monitor.
I have developed a simple slideshow application, but I don't know how to get the images to show on the external display.
When the HDMI cable is connected, the monitor 'knows' something is there, but the external monitor screen is blank. There used to be a tool on the play store (FullHDMI by TeamWin) that apparently allowed mirroring, but that tool is gone now. I thought that if that source code were available, I could see if there was device specific code or learn more about what needs to be done to enable external displays.
What needs to be done in the Android code so that the content is displayed on the external monitor when that external monitor is connected via an HDMI cable?

App installation in Sony Smart Glass

I am a budding developer. I want to develop an app for Sony Smart Glass and I have bought the glass already started the process of developing with Android Studio. My question is how can I install the app in Sony Smart Glass? I have tried to read the Sony website but it's not mentioned there.
If it has USB debugging somewhere in the settings, then enable it. Then you would be able to run the app from studio or adb via usb cable. Or just push your .apk into that device and install it even with some file explorer. Even Bluetooth might be an option here if the device supports it.
This SDK is probably necessary.
If it has no port through which you could push your .apk to that device and it relies only on google play or its specific store (something like samsung used to have), then the only option is to use the store - but it shouldn't be that much restricted.

How to emulate mass storage device in Genymotion Emulator

I currently have a cable that allows me to plug in a flash drive into my phone (as seen here). My phone then picks up the flash drive as a "mass storage device" that has been attached.
I started using the Genymotion Emulator and was wondering if it's possible to emulate a mass storage device being attached to the emulator? Thanks in advance.

Is there a solution to sideload app from external device via USB and running it without install?

I'm looking for the solution to develop an external device(Android-powered) for smart phone with Android embedded that can sideload app via USB and auto-run like PC2PC USB transfer cable without installing application. I want everyone could plug and play without further settings, installation, no doubt having no root and USB debugging mode turned on.
Is there a solution for doing such a thing like that?
I mean external device has Android app itself. And When it connect to phone via USB, the application will sideload app, put it to runtime for an auto-run and takes over touchscreen control to instruct the external device but still run no secure risk.

AS3 How to architect a tablet app that only needs to connect to a laptop to update content?

I've built apps that connect to a server. But this time a client has asked for an app with no need to connect to a server to update content (images,videos,text).
It will be Android tablet to a Windows laptop via USB. It will be for end user no dragging and dropping into specific folders using USB debugging.
I was thinking I may need to build an app for the laptop (content manager) and then the app for tablet.
Is a framework out there that could jump start this?
Thanks
You can setup a batch script that runs some adb commands when the tablet is plugged in. Then you could use 'adb push' to push some update files onto the tablet, and the app could check for these files when it runs and take appropriate actions with them.
This would probably be best as a desktop application (not an Android app). The tablet's SDCard is already mountable as a USB mass storage device, so why not just have a desktop application mount that drive, move the files into the correct folder, and eject the drive? Then when the tablet app is opened, the new files are there.

Categories

Resources