My app retrieves a log text file from a device. I then click a “Save Log” button to save the log to the phone storage.
I am attempting to send the saved log in csv format to Google Dive using the “Sharing” routine, but when I click the “Send Log” button, the Bluetooth instantly disconnects every time.
Also, even when Bluetooth is disconnected, the sharing options don’t appear.
That’s right, but I do need Bluetooth to remain connected to the sensor.
However, even when the phone disconnects from the sensor, nothing seems to happen with the sharing to Google Drive (or text message or email or any of the other apps that support sharing).
I suspect that the sharing procedure does not find the log file. Android no longer lets be see the file using file manager, so who knows?
The default filescope for the File component is App, which means your log file will be saved to the ASD of your app (application specific directory)
You can then work with it from there, but if sharing, some apps, like Google Drive or Gmail, may not be able to find the file in your ASD, so you may need to copy the file to shared directories.
I show a copy of the file from your ASD to the Download directory.
Yes! That works!
Thank you so much.
Now to modify it so that it works in an installed apk app. I need to tweak some things because I believe that the code will not work in an installed app in exactly that form, but how to do that will take some trial and error.