• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

USB comms between Tablet and Ubuntu PC Exception

I'm still learning about this myself, but to use USB you need to make a permission popup happen and the user has to grant permission. Everything I've read so far says there's no way to skip that. Since you're seeing a SecurityException, my guess is that's what you're running into.

To make this happen, you need to set up the app configuration right, and in your code you have to create an Intent that asks for "com.android.example.USB_PERMISSION", call UsbManager.requestPermission() with it, and have a BroadcastReceiver ready to receive the permission response and use it to set up the USB connection.

See these links:
https://stackoverflow.com/questions/12388914/usb-device-access-pop-up-suppression
https://developer.android.com/guide/topics/connectivity/usb/accessory.html

If you've managed to figure this out since you posted this question, I'd appreciate some advice.

Android-x86 Installation

I install it on a Laptop, but on a VM.

They have instructions to run Android-x86 inside VirtualBox:
https://www.android-x86.org/documentation/virtualbox.html


If you're using VMware I found this:
Issues
VMware
You have to change your virtual disk type to be IDE because the default type in VMware is SCSI, and Android-x86 kernel is not configured to support SCSI. You can follow these steps:

  1. Create a virtual machine.
  2. Edit virtual machine settings after the virtual machine created.
  3. Choose the hard disk and remove it.
  4. Add a hard disk to create a new virtual disk, then you can choose IDE as your virtual disk type.
  5. When finished, you can install android-x86 normally.

Nagging issue with Multiple tablets

I've written an Android app for data logging temp and humidity from sensors in the house, via wifi and and Arduino. I'm currently running the app on three tablets;

LG LGLK430
Samsung SM-T110
ACER B3-A40

The app itself runs fine on all three devices, that is, until the screen savers kick in, or if I rotate the screen.

Once I rotate the screen, or awaken the device from the screensaver, the app acts as if it is restarting and the plotted data returns to its init values.

Does anyone know how to get around this issue?

Regarding the screensaver, I've done everything that I can to prevent the screen savers from activating.

I've tried using the following recommended code in the manifest file;

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.a_steve_app3">
mlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions"/>


and the following in the main activity file;

android.provider.Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT,21600*1000);


Also, I've gone to file-settings-editor-inspections-'Using system app permissions' and unchecked the box.


When I do all of this, the code compiles fine but I still get the following error when running the app;

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.a_steve_app3/com.example.a_steve_app3.MainActivity}: java.lang.SecurityException: com.example.a_steve_app3 was not granted this permission: android.permission.WRITE_SETTINGS.

thoughts anyone?

Steve

Does this point to a permission setting on the devices? I've gone through the settings on all three devices looking for permissions options.

Corrupted SD Card backhanded Android Firmware

I've seen something similar happen before, although not on my s9, where a failing SD card caused the phone to misbehave and removing it made the phone work normally again. 5 years is an eternity for an SD card in a phone and you're lucky it lasted that long without a total data-robbing failure. I recently replaced the card in my S9, which was maybe a couple of years old, because it was getting cranky about saving new files which is a sure sign of impending failure.

Interesting, yeah I know the SD card is pushing it's lifespan hard, but it seems to have all the data there. I haven't noticed any issues since that message and the system failure, but nonetheless. The data kept on it was just pictures from devices generations ago, simply a convenient way to externally store and transfer data. Glad it's fixed, just never heard of it.

shortcut for clearing the bluetooth cache

Install Nova Launcher and make it your launcher (other launchers might be able to do this as well):
https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher

1. Tap and hold the home screen.
2. Tap Widgets.
3. Under Nova Launcher tap and hold Activities, then move it to your home screen.
4. In the list tap Bluetooth, it will show more options to choose.
5. Tap one of the Bluetooth options.

Now on your home screen you have a Bluetooth shortcut. Tap and hold it, a menu will pop up. Tap App Info and it will take you to the 5th step in your list.

Help I would like to ask is it possible to share my usb tethered android phone internet to my modem.

Then again..the PDA NET has wifi capabilities..it works all around the house just like a simple wifi..can connect as many devices as you please..the only thing is you must have unlimited data access though your carrier..the range is pretty good too..just as a regular wifi.

So with this you don't need not bs router, not other machinery, not annoying cables..none of that..just your phone with the app installed on it..plus the devises you want to access its internet through it.

How it works it requires a version of the Windows app on the pc but that's if you are going to do instead of wifi..then bluetooth..but this isn't your case..you want to do plain wifi.
Ah, yes, that would work in case of simple wifi, what i need is a stable high end connection through ethernet between my main pc, streaming/rendering pc(obs NDI) and a 5ghz atleast 733mbs wifi for my oculus quest( Virtual Desktop, no possibility for tethered connection), and also preferrably a way to manage the traffic, so that when im straming vr for example, my vr view is the last link to suffer incase of internet dips. Considering my needs, i'd say a wireles router is the best bet, i just need to get my phone's internet into it again.

Filter

Back
Top Bottom