Access Android Tablet from C#
-
I'm trying to write an app that allowed me to copy data from an Android app to a C# app via USB. I will probably write the data to a json file and copy the file to my C# app, either by sending it from Android or copying it from C#. [I found this api](https://forum.xda-developers.com/t/dev-androidlib-net-android-device-communication-and-management-library-01-20-13.1512685/) but it looks old and I can't find any documentation. Does anyone know how I can send or copy a file from Android app to a C# app via USB?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
I'm trying to write an app that allowed me to copy data from an Android app to a C# app via USB. I will probably write the data to a json file and copy the file to my C# app, either by sending it from Android or copying it from C#. [I found this api](https://forum.xda-developers.com/t/dev-androidlib-net-android-device-communication-and-management-library-01-20-13.1512685/) but it looks old and I can't find any documentation. Does anyone know how I can send or copy a file from Android app to a C# app via USB?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
I'm trying to write an app that allowed me to copy data from an Android app to a C# app via USB. I will probably write the data to a json file and copy the file to my C# app, either by sending it from Android or copying it from C#. [I found this api](https://forum.xda-developers.com/t/dev-androidlib-net-android-device-communication-and-management-library-01-20-13.1512685/) but it looks old and I can't find any documentation. Does anyone know how I can send or copy a file from Android app to a C# app via USB?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
Richard is right, but ... it may depend on how the Android device is configured . There are two ways Android can connect to a PC - MTP for media transfer (pictures and videos), or UMS (for files): Android USB Connections Explained: MTP, PTP, and USB Mass Storage[^] If the device is selected to "Charge only" or MTP, you won't see the device as a file source.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
If you connect the Android device to a PC via USB then it should appear as a new disk drive. A quick test with your device should confirm that and you can then see whether you can access the files.
I thought so too, but it doesn't show up. And I have Developer Mode and USB Debugging turned on
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
Richard is right, but ... it may depend on how the Android device is configured . There are two ways Android can connect to a PC - MTP for media transfer (pictures and videos), or UMS (for files): Android USB Connections Explained: MTP, PTP, and USB Mass Storage[^] If the device is selected to "Charge only" or MTP, you won't see the device as a file source.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Thanks. I'll look into it
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
I thought so too, but it doesn't show up. And I have Developer Mode and USB Debugging turned on
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
That has always worked for me, but see also @OriginalGriff's comments below.
-
Richard is right, but ... it may depend on how the Android device is configured . There are two ways Android can connect to a PC - MTP for media transfer (pictures and videos), or UMS (for files): Android USB Connections Explained: MTP, PTP, and USB Mass Storage[^] If the device is selected to "Charge only" or MTP, you won't see the device as a file source.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
I got it now. I went into Settings => USB Preferences and selected "File Transfer". Now I can see the tablet and all the folders under it. Thanks for pointing me in the right direction.
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
I got it now. I went into Settings => USB Preferences and selected "File Transfer". Now I can see the tablet and all the folders under it. Thanks for pointing me in the right direction.
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
You're welcome!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!