I am trying to add my textFile onto my android emulator in Visual Studio. Can anyone help on how to do so?

Ali, Bilal (Student) 1 Reputation point

Working on an application. I have a text file created filled with data and am trying to get it onto the emulator to access it from the device. Anyone have any tips or know how to do so. Thanks in advance.

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,000 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 47,446 Reputation points Microsoft Vendor


    Welcome to our Microsoft Q&A platform!

    First of all, please just only one android emulator. Then open Android Adb Command Prompt like following screenshot.


    For example, I put a file to Desktop, then I want to copy this text file to sdcard, I used following command to execute it

       adb push C:\Users\xxxxusername\Desktop\Topic.txt  /mnt/sdcard/myfile.txt  

    Here is running screenshot.


    Best Regards,

    Leon Lu

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.