Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Android Tutorial & Lessons 27: Tomato-Tomahto, Bit-Byte, whatev our app reads and writes data!!!!

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
12,149
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 1, 2011

Android Tutorial & Lessons 27: Tomato-Tomahto, Bit-Byte, whatev our app reads and writes data!!!!

****MAKE SURE YOU ADD*** uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" TO THE MANIFEST********
(I forgot to mention that, Sorry :/ )

This tutorial was from this example on the android developer page:
http://developer.android.com/reference/android/os/Environment.html#getExterna...)

Check out the discussion @ my forum for this lesson:
http://www.cornboyz.com/

Whats up CornFanz, thanks for watching my videos, I would love it if you subscribe and give me some feedback.

In this lesson you will:
-Create the InputStream
-Create the OutputStream
-create a data array that gets the available data from the resource
-read and write InputStream
-Write the data to the phone
-Bam!
-Some other sweet stuff
-subscribe
-Thumbs up this video ;)

This video is the 27th in a web series that I am creating to help you learn Android programming so you can create apps and eventually how to learn to write games for android phones. I want to explain things in a way that everyone can understand, even if you have no experience with Java, XML, C++, OpenGL, or as a matter of fact, any other programming language.




If you do have a lot of experience with programming, these first videos will be really slow for you, but my goal is to get everyone sprinting, but for now we have learn to crawl.

follow me on twitter: @cornboyz

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (CornboyzAndroid)

  • Travis, your tutorials are like bacon wrapped scallops. I can't have just one. Great work, brother!

  • @techture haha this is probably the best comment yet!

  • Im having a problem, the makeText is not working. It says it cannot work because of the OnLongClickListener. This is what it sas in more detail.any help would be wonderful please!

    "- The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (new View.OnLongClickListener(){}, String, int)"

  • @DANJUMA9 what up Danjuma, You're getting this problem, because you have implemented the onClickListener to your class, so most likely what is happening, is you have set your makeText (this, blah, blah) the "this" in this instance will look for what you have implemented, (onClickListener) and that is not the context we want, so change it to whatever you class name is ".this" (Ex change "this" to "tutorialX.this". Let me know if that makes sense/ helps

see all

All Comments (22)

Sign In or Sign Up now to post a comment!
  • Maybe some one saves some time: =)

    If u have HTC (i have wildfire) you can use either DOWLOADS or DCIM folder. Both works, but you need to turn off HTC sync before trying to save anything. Also turn of USB debugging.

    After saving files, change connection type to "disk drive" and check downloads or dcim folder from your pc. Songs should be there.

  • @HomeBaseProductions I had the problem, until i have looked at the files directories of the emulator's SD card. It turns out that it doesn't have a "downloads" folder to look on. So what I did was, I changed the (Environment.DIRECTORY_DOWNLOA­DS) into (Environment_DIRECTORY_DCIM). Because I have a DCIM folder on my emulator's SD card.

  • i dont know what to do now .. i followed all your lessons everything works but this one not..Butt No error is eclipse..

  • it says fail ?????? Can You Help Me???

  • Hey CornboyzAndroid, thanks for the tutorial!

    I'm working on some project where it already does that, but I need to be able to set up a new path by using a button (for example) and asking the user for the path (so he can select it). And seriously, I don't have any idea. Do you have any, please?

    Thank you very much again,

    Respect!

  • I still learned a lot, thanks for the lesson man

  • Hi, CornboyzAndroid

    You can watch the files on your SD card through eclipse, simply change your prespective to DDMS (can be found through Window>Open Perspective>Other...)

    Then you can watch the entire HD of your mobile emulator including the SD card

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more