Android : Incredible Bug Reading A Network Stream

Aug 11, 2009

First, sorry but my English is bad. I'm developing an app for android. I use a function (see below) for transfer a file on the network. removed some code...

Two situation: -S1: in is get from a socket and out is a locale file -S2: in is the local file and out is get from a socket

Well ! S1 and S2 work on the emulator. But, on a real device, S1 make some problem. The file is mixed :/ ! For example i would to transfer this text: "123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789ABCDEF" But i receive this: "123456789ABCDEF 12345678923456789ABCDEF 123456789ABCDEF 123456789ABCDEF 12345678ABCDEF 123456789ABCDEF 123456789ABCDEF 123456789" (not really a real example) The content received have same size as the source. Look at this: "123456789ABCDEF" is send and "12345678ABCDEF" is received.

How does it is possible ? Someone can help me?

Android : Incredible bug reading a network stream


Android :: IO Exception While Reading From Input Stream?

Aug 13, 2009

I'm running into a strange problem while reading from an Input Stream on the Android platform. I'm not sure if this is an Android specific issue, or something I'm doing wrong in general. The only thing that is Android specific is this call:
Input Stream is = getResources().openRawResource(R.raw.myfile);
This returns an Input Stream for a file from the Android assets. Anyways, here's where I run into the issue:
bytes[] buffer = new bytes[2];
is.read(buffer);
When the read() executes it throws an IOException. The weird thing is that if I do two sequential single byte reads (or any number of single byte reads), there is no exception. Ie, this works:
byte buffer;
buffer = (byte)buffer.read();
buffer = (byte)buffer.read();
Any idea why two sequential single byte reads work but one call to read both at once throws an exception? The Input Stream seems fine... is.available() returns over a million bytes (as it should).
Stack trace shows these lines just before the Input Stream.read():
java.io.IOException
at android.content.res.AssetManager.readAsset(Native Method)
at android.content.res.AssetManager.access$800(AssetManager.java:36)
at android.content.res.AssetManager$AssetInputStream.read(AssetManager.java:542)
Changing the buffer size to a single byte still throws the error. It looks like the exception is only raised when reading into a byte array.
If I truncate the file to 100,000 bytes (file is: 1,917,408 bytes originally) it works fine. Is there a problem with files over a certain size?

View 3 Replies View Related

Android :: Reading Binary File From Sdcard Using Stream Classes

Oct 5, 2010

Can anybody have any idea how to read a binary file which resides in sdcard using Streams, like Inputstream, CountingInputStream or SwappedDataInputStream?I am using these three streams to read a file which is currently in the Resouces folder, but now i want to move that file in sdcard but I cannot change these stream because I have done so much work on it and I cannot roll back my work.i am doing it this way but its giving me FileNotFoundException.

View 1 Replies View Related

Android :: Parsing Speed / Reading Vs Converting Input Stream To String?

Jul 23, 2009

I'm downloading text data from a web server, and getting an Input Stream. The data will be relatively large and delimited. I want to split this data by the deliminator and store each piece in the DB. Is it faster to read the Input Stream byte by byte to split the data and store each piece in the DB, or would it be faster to convert the Input Stream to a String and use an existing function such as Split?

View 2 Replies View Related

Android : MediaPlayer With Stream Over Network

Feb 17, 2009

I would like to receive an audio stream from an application running on a PC using the 802.11 connection. I tried the following and received Error (-1, 0) from the MediaPlayer:

mp = new MediaPlayer(); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); mp.setDataSource("http://10.1.201.114:11224");

The MediaPlayer does connect to the application and the application starts sending audio but nothing happens on the G1. Is the setDataSource call above correct? If so, how do I set things like sample rate, etc? If not, any help would be great!

View 2 Replies View Related

Android : Droid Playing Video Data From A Custom Network Stream?

Mar 13, 2010

Does Android MediaPlayer can only work with file sources? I would like play media (video) from a network stream, but the stream comes in a non-standard protocol, so I have to somehow feed Android MediaPlayer with the data only. Is there anyway to do that? I found a few web pages suggesting using a temporary file for the buffered media data etc. but I would like to minimize the I/O usage as much as I can, so I'm looking for a API only solution if there is any? how about JNI? but looks like the permissions going to be an issue with that also.

View 1 Replies View Related

Motorola Droid : Stream NFL Network From My Unrooted D1 To My TV?

Nov 25, 2010

Anyone know if I could stream NFL network from my unrooted D1 to my TV? I get it free via my phone but not through my cable. (Long story). Anybody, please help.

View 10 Replies View Related

HTC Desire : Astro File Browser - Stream Music From A Network Share

Jun 21, 2010

I have connected my HTC Desire to a samba share where I have my music, movies, etc, but I cannot make Desire play any of the mp3, movies, and I cannot see any photos either? I am using Astro File Manager.

I get no kind of error messages just a black screen with a little icon (which I don't remember right now.) Anyone got an idea of what could be wrong?

View 1 Replies View Related

HTC : Mac Not Reading Incredible As Disk

Apr 30, 2010

I've connected my Incredible to my mac via USB. It charges, but I cannot find it as a disk on my mac anywhere. In the phone I have it set to read as a disk. All I am looking to do is transfer some music. Any suggestions?

View 12 Replies View Related

HTC Incredible : Way For Reading Sends PDF?

Jul 16, 2010

If someone sends me a PDF how do I read it. I have PDF viewer on my phone but it does not seem to know where to see the files.

View 2 Replies View Related

HTC Incredible : What Is A Good Reading App

Nov 7, 2010

As i gracefully age,my reading vision crashes and burns I get tired of always trying to remember to bring my glasses(another age thing). So i am looking for a good app that i could use to help me read. I looked around the market and online some but couldn't find anything. Iphone has something but i have a real phone. Any ideres or recommendations?

View 9 Replies View Related

HTC Incredible :: Music Player Art - Not Reading The Image?

Jun 15, 2010

I really like the simplicity of the HTC widget player. True, not a lot of info is given but I do a lot of driving for work and a simple player I can use while in my home screen is great.

I moved over all my music from my old phone which was categorized in folders by artist. Each artist has a folder and a generic image is used in each folder called "folder.jpg" and "cover.jpg" but the player is not reading the image. Will it not do this? I hope I don't have to embed the image into each MP3 because that would be a major PITA. I have around 3000 songs and don't want to have to edit each one. Is there another widget that is better?

View 2 Replies View Related

HTC Incredible : Recommended Reading On Task Killers

Sep 29, 2010

Just ran across this. Very good information. Even makes a reference to Android Forums.Android Task Killers Explained: What They Do and Why You Shouldn't Use Them

View 5 Replies View Related

HTC Incredible :: How To Stream Music / Pandora From Incredible To Altima Via Bluetooth?

Sep 10, 2010

I have been researching for some time now, but have yet to come up with an actual fix. I have my Incredible paired with my Altima and can make calls via Bluetooth with no problem. My question is, how can I wirelessly stream music or Pandora from my phone to my car (Altima does not have an aux jack). I know my car is capable because I was able to do this with my old Blackberry (exactly how I don't remember, it was an intricate process of pressing random buttons).

View 1 Replies View Related

HTC Incredible :: New SD Card Transfer File / Data Reading Off

Jul 23, 2010

I searched the Incredible forums and sub forums and could not find an answer to this question, though I am sure it has been asked: If I want to go from my stock 2 GB card to a new card, and I want to preserve data AND have all apps still be able to read whatever data they were reading off the card, do I just transfer the files from one card to the other? I bet the only thing I need to make sure of is that new card is formatted with the same file system as the original card, right? I know copying data from one card to the other will preserve data, but I want to make sure I have no problems with apps, either, after inserting the newer card.

View 7 Replies View Related

HTC Incredible :: Signal Bar Reading Wrong / Make It Correct?

May 7, 2010

Ok I just hook my phone up to my BMW overblue tooth my car shows 5 bars while the phone shows 1 its a software glitch.

View 6 Replies View Related

Android :: Broken Pipe Exception When Tried To Stream Mp3 Stream From Local Server To Android Mediaplayer

Oct 27, 2010

I am trying to stream mp3 stream from my local http server indeed hosted on my phone to android media player.When local server gets the new socket , it starts writing some http headers followed by mp3 stream. but mediaplayer socket is throwing "Broken pipe" exception.Wat may be the issue causing this.

View 1 Replies View Related

HTC Incredible :: Stream Video Using D Inc

Jul 2, 2010

Anyone know any websites of tv shows or movies that I can stream to my d inc?

Also using what browser? Dolphin or skyfire?

Sent from my ADR6300 using Tapatalk

View 4 Replies View Related

HTC Incredible :: Will Inc. Be Able To Stream Am Radio?

Mar 19, 2010

I am most interested in changing to a phone w/data pkg - so I can stream am radio when at the gym. (LG Chocolate, two years old - feels like caveman phone now) Would the Inc. be able to do this? - And, would I need to download an app with a player? - or is there one standard with Android?

View 16 Replies View Related

HTC Incredible :: Stream Music To Xbox 360?

Jun 4, 2010

Is there a way to stream music to my xbox 360?

View 5 Replies View Related

HTC Incredible :: Audio Stream Routing?

Sep 13, 2010

I've been messing around with Tasker for the last several days, and it's raised a concern I've had with android itself. Is there a definitive answer to how audio is routed? I see that there are at least 6 audio stream types: call, system, ringer, media, alarm, notification. I also see (using Smart Volume or Quick Settings, etc.) that there are corresponding audio volume controls for each of the above.

My question is, which speaker do each of the audio streams get routed to? Obviously, there are different setups for when the headphones are plugged in and not. Here's what I see empirically so far: When the physical headphones are unplugged, the system, ringer, media, alarm and notification streams get routed to the external speaker. The call stream is routed to the earpiece.

When the headphones are plugged in, the alarm and notification streams seem to be routed to the external speaker (speakerphone, I guess). The call, system and media streams get routed to the headphones. The ringer stream has been behaving oddly. Sometimes it comes through the headphones, and sometimes through the ext. speaker.

View 2 Replies View Related

HTC Incredible :: Friend Stream Not Working

May 5, 2010

I've looked and seen people have what seems to be the same issues, my FS was working fine last night then today it wasn't, it stopped last night at about 10:37, even after talking to VZW they had no idea and said that I was the first person to have this issue (shrugs shoulder) I don't believe that but after trying everything I can think of, and then having to do a master reset again it fixed it for a sec but then it's doing it again?

View 6 Replies View Related

HTC Incredible :: Any Way To Uninstall Friend Stream?

May 1, 2010

Is there a way to uninstall HTC "friend stream?" I may have set it up originally, but I have no use for it. All I use is facebook (and I prefer the fb app). Uninstaller doesn't work, and it gets around task killers by auto-rebooting.

View 2 Replies View Related

HTC Incredible :: Tried To Stream Netflix Movies

May 4, 2010

Has anyone tried to stream Netflix movies to their Incredible? I saw hulu gave weird, if not suspicious error messages when trying to play videos from there, but I have not yet heard the word about Netflix.

View 11 Replies View Related

HTC Incredible : Websites That Stream Live TV Over 3g?

Aug 29, 2010

Now that we've got (or are about to get) Flash 10.1 on our phones, does anybody have suggestions for websites that let you stream TV over 3g? I've heard channelsurfing.net can work, but I find it usually crashes the stock browser.

View 7 Replies View Related

HTC Incredible :: Need A Way To Stream Tv To Phone Without Slingbox

Sep 3, 2010

I would like to watch some football tomorrow but I have a mid day wedding to attend. Is there a slick way to watch espn on my incredible without using a slingbox?

View 2 Replies View Related

HTC Incredible :: Friend Stream Stopped Working?

Sep 1, 2010

Well this has been a bad day for Android social networking for me. First Peep stops working this morning (known issue) now, friend stream has stopped working. The widget won't update, and when I open the app it fc. I've tried doing a battery pull as well as removing then re-adding Face book (twitter is obviously been removed). Still no success. Any ideas?

View 7 Replies View Related

HTC Incredible :: Friends Stream Force Close

May 24, 2010

Any advice?

View 13 Replies View Related

HTC Incredible :: Record Video And Stream On Tv Simultaneously

Oct 4, 2010

Record Video and Stream on Tv Simultaneously?

View 1 Replies View Related

HTC Incredible : Stream On A Good 3g Connection For Wifi

Jul 27, 2010

I did a search and cant seem to find if someone else has this problem. I use either radio time or iheartradio to stream radio stations and I have drop outs all the time. If I am on 3g it does this as well as Wifi. I would think wifi would be solid but I have tried a couple different interent connections just to make sure it wasnt the connection. This drives me crazy because there is no reason I should be able to stream a 48k stream on a good 3g connection for a wifi connection.

Is there any tweaks I need to do? Am I doing something wrong?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved