I've created a webview app which hosts a website within the app in the assets-directory. I want to update the website via an USBstick inserted in my tablets usbslot. I tried it first with the .MEDIA_MOUNTED broadcast which doesn't work for my android 4.4. Tablet. I've searched for an alternative and found the "MediaScannerConnection". There are several examples here, which didn't help me much, to solve my issue.
I'm looking for an easy and clean solution and a little explanation would be nice too, to detect if an USB-Storage is connected and the chance to execute some code afterwards. And how make this USB-check run all the time is a question in addition. I assume i have to put it in the OnResume method, but i'm not quite shure.
Environment.getExternalStorageDirectory()
) – Bonatti