I created an android application in which it creates a folder that stores data, but I want it to be shown right away in windows when the usb is connected. right now, it can only be seen after i restarted the mobile device or mount and unmounted the sdcard. or is there even a way to mount and unmount the device programmatically?
someone recommends me this snippet
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory())));
but i can't seem to understand how to apply this code or if this is even applicable with my concern.