GTU Android Program 16 Create an application to read file from asset folder and copy it in memory card (external device)

GTU Android Program 16 Create an application to read file from asset folder and copy it in memory card (external device)

GTU Android Program 16

Android developer stores some useful files into assets folder of android project directory if they want to expert this file to sdcard then they can refer the following code which shows how to read file from assets folder and write into memory card (external device)

Step 1 : Create android project.

Step 2 : create readme.txt file save it to desktop, then copy paste this file into assets folder (alternatively you can paste into project/assets folder of workspace where you have stored your project)

Step 3 : Add following permission into AndriodManifest.xml file.

 Step 4 : write down code as explain below

Step 5 : Run application for testing in Android Virtual Device (AVD) Make sure to add sdcard size to some MB(eg. 10), otherwise sdcard option will not be attached to your Android Virtual Device (AVD)

If you are testing using your attached mobile then SD card is required in mobile to test this application.

Step 6 : to check whether file has been copied into sdcard or not, open DDMS, Select working AVD, goto File Explorer, goto mnt > sdcard (your file will be here…)

Location : res\layout

FileName: activity_main.xml

Location : src\package\

FileName : MainActivity.java

 

Output

GTU Android Program 16

Download Few Popular Android Apps

  1. Bank IFSC Code : Now easily get bank ifsc code which you need while online transfer.
  2. All India PIN Code : Get all india PIN Code Numbers on 1 Android App.
  3. RTO Code : Get all India RTO Code on 1 Android App.
  4. Google 2 Step Code Speak : Now app will speak your google 2 step code, so no need to check mobile, code will reach you.
  5. All Gujarat ST Bus Stand Helpline Numbers (GSRTC Helpline Numbers)
  6. Mumbai City Bus Numbers (MSRTC Helpline Numbers)

  7. Andhra Pradesh City Bus Helpline Numbers (APSRTC Helpline Numbers)

  8. Bhavnagar Diary (Bhavnagar Business Directory)

  9. Baroda Diary (Baroda Business Directory)
  10. Surat Diary (Surat Business Directory)
  11. Ahmedabad Diary (Ahmedabad Business Directory)
  12. Rajkot Diary (Rajkot Business Directory)

Adarsh Patel

My Self Adarsh Suryakant Patel. Currently I am working as Assistant Professor at Parul Instiute of Engineering and Technology, MCA Department, Limda, Vadodara. Major Responsibility : * Lectures * Organizing Training and Expert Sessions for * Placement and Recruitment * Faculty Representative