Android :: Droid MediaPlayer - Get Correct Duration From Streamed File?

Aug 5, 2010

When I stream music using the MediaPlayer, it gives me the wrong song duration. Has anyone else encountered this?

ADVERTISEMENT

Android :: MediaPlayer Provides Wrong Duration On Audio Streaming

May 27, 2010

I am having the following problem: I am using Android's MediaPlayer to play an mp3 through an HTTP connection. The audio is played correctly, but the MediaPlayer returns an incorrect duration (calling mediaPlayer.getDuration() ). Depending on the mp3 the duration is either shorter or longer. The code that plays the audio is the following:

mediaPlayer = new MediaPlayer(); mediaPlayer.setOnCompletionListener(this); mediaPlayer.setOnErrorListener(this); mediaPlayer.setOnPreparedListener(this); mediaPlayer.setOnBufferingUpdateListener(this); mediaPlayer.setDataSource("a valid URL"); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.prepareAsync();............................

View 2 Replies View Related

Motorola Droid X :: File With Correct Name But Unknown Artist Display In Application

Aug 12, 2010

For some of the albums/songs it says Unknown Artist but when I look at the files they are all in the proper folders with correct names. I added music using DoubleTwist if that helps.

View 4 Replies View Related

Android :: Set Sdp File In MediaPlayer

Jan 22, 2009

I want to play a video file sitting in a server by setting local sdp file in the mediaplayer.

How to set the mediaplayer to read the local sdp file and start playing depending on the sdp connect (if it has unicast/multicast, start corresponding session)? I want to test unicast for now.

View 3 Replies View Related

Android :: 1.5 How Can I Play HE AAC File Type With MediaPlayer?

Apr 28, 2009

Could I somehow trick the player on playing something of this format? I know that there is support for AAC encoded files but just how?

View 2 Replies View Related

Android :: Can I Use MediaPlayer API To Play Flv Media File

Jul 3, 2009

Recent news say that flash porting is finished for android and HTC Hero has support for flash. Can I use MediaPlayer API to play flv media file? Is there such documents?

View 3 Replies View Related

Android :: Error Creating MediaPlayer With Uri Or File In Assets

Jun 22, 2010

I copied song.mp3 to my project's assets directory and wrote this code:

private MediaPlayer mp;

Uri uri = Uri.parse("file:///android_asset/song.mp3");

mp=MediaPlayer.create(this, uri);

After running the create statement, the variable mp is null.

View 1 Replies View Related

Android :: Correct Location For Hierarchical File List

Jul 21, 2010

I have a simple app which needs to display 1 of many text files (DB is no an option currently)

Where is the best place to put this collection of text files? I am guessing "Assets", but am unsure.

View 1 Replies View Related

Samsung Captivate :: Unable To Install USB Drivers - Correct Zip File

Oct 6, 2010

I am unable to install the USB drivers for Windows XP - I have downloaded the correct zip file, but the drivers are marked as being detrimental to Windows XP somehow and they just won't install. Can I copy them out of the zip file and manually put them somewhere? I'm inching ever so slowly towards rooting and am trying to get my ducks in line - but they're not cooperating.

View 8 Replies View Related

Android :: Correct Intent Filter Configuration To Associate File Type?

Nov 10, 2010

This question has been asked [numerous times] before, but I have not seen any definitive answers, or examples of code that actually works. I would like to associate an Activity with a particular file type. For discussion, assume that I want my Activity to be associated with PDFs. Here is what I currently have. I have experimented with many different values and combinations of values in the intent-filter, but I have yet to get my Activity to start when a PDF is selected.

<activity name="com.mycompany.MyActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:mimeType="application/pdf" />
<data android:pathPattern="*.pdf" />
<data android:host="*" />
</intent-filter> </activity>

View 1 Replies View Related

Android :: MediaPlayer.start - Doesnot Work Fine After Calling MediaPlayer.seekTo - 0

Apr 27, 2009

I have a requirement to play several sounds many times in my game so instead of creating the MediaPlayer again and again I have called mp.seekTo(0) in onCompletion(mp) so that it will restart. Sometimes the sound is not audible from the device when I call mp.start () after setting mp.seekTo(0); but the player calls onCompletion() without playing any sound, this is observed randomly on most of the sounds

My sounds are of short duration mostly less than a second.  

I am using a separate MediaPlayer for each sound (as I need this)   -

There are almost 28 sounds in my game so i will be creating 28 MediaPlayers.  

Below is the attached code for player

Also If I try to play many sounds one after the other in a short period of time i get an error saying "no more track names available". can u tell Why this is happening...?

check the below code:

CODE:........

View 9 Replies View Related

Media :: Optimal App For Getting Streamed Video To A Smartphone Running 2.2 Phone?

Sep 24, 2010

What is the optimal app for getting streamed video to a Smartphone running android 2.2?
On my PC I use VLC but it seems they don't have any Android app (having donated I'm a tad miffed) so is there anything else out there for generic streaming? I have an app for specific broadcasters but I'd like one that I can pick up streams on my own.

View 11 Replies View Related

Motorola CLIQ :: How To Listen To Music Or Watch Videos Streamed From My Computer?

Nov 20, 2009

I recently switched from the HTC Wing to the Motorola Cliq (love the phone!) but I can't figure out how to listen to music or watch videos streamed from my computer (photos work ok).I was using ORB on my Wing and it worked great.I'm trying to use it on the Cliq but with little to no success (I've also tried using androrb with no luck).

View 1 Replies View Related

Motorola Droid X :: Duration Of Battery

Jul 17, 2010

After hearing about the EVO's battery not lasting more than half a day, I was nervous to order the Droid X. I'm seeing some articles online stating that the battery life is pretty decent on the X. How have your experiences been so far? I have mine coming in the mail on Monday, and I'm hoping I don't need an extended battery that will turn my phone into something the size of a cinder block.

View 49 Replies View Related

HTC Droid Eris :: Easiest Way To View Call Duration?

Nov 16, 2009

easiest way to view a call's details, to see call duration? The only way I can find is to go to a contact's info, view call history, then get the details of the call there.

View 6 Replies View Related

Android :: Dialog Display Duration

Apr 19, 2010

I need to display an alert message for no more than a half a second. As I understand it, Toast only has 2 available durations, with no way to alter them. Correct me if I'm wrong. Which leads me to sing the AlertDialog. What would be the best way of displaying a dialog for 500ms and then dismissing it?

View 4 Replies View Related

HTC Desire :: App For Call Duration Summary?

May 15, 2010

is there an app available that shows call duration on screen once you disconnect, or is it a setting somewhere within the phone that I have just missed...?

View 4 Replies View Related

Android : How To Get Outgoing Call Duration During?

Oct 18, 2010

I would get outgoing call duration a call, I thought to get when the persone to the other side answer my call, but with PhoneStateListener we can get the state of a call, but PhoneStateListener changes state to CALL_STATE_OFFHOOK immediately when the outgoing call starts and not when the person to other side answers, so i can't get the effective time of call during a conversation.

View 1 Replies View Related

Android :: Get Duration From Maps.google.com Directions

Jun 1, 2010

At the moment I am using this code to inquire google maps for directions from an address to another one, then I simply draw it on a mapview from its GeometryCollection. But yet this isn't enough I need also to extract the total expected duration from the kml. give a little sample code?

code:........................

View 2 Replies View Related

Android :: Want To Drop Call After Some Time Duration

Sep 11, 2009

I want to drop a call after some time duration let me know how to send the event to it or how to throw event on ACTION_DIAL intent

View 2 Replies View Related

Android :: Duration Code Not Working Properly

Apr 24, 2010

I'm writing an app for Android OS, and I need to store some time values in the SQLite DB. I have been using android.text.format.Time to store the time values in the app, and then inserting the values as millis into the DB as REAL values. On the SDK emulator, everything works perfectly. On the sole phone I've had the opportunity to test my app (so far), my duration code doesn't work as expected. Some relevant code:

private static final String DATABASE_CREATE =
"create table " + DATABASE_TABLE + " ("
+ KEY_ROWID + " integer primary key autoincrement, "
+ KEY_START + " REAL, "
+ KEY_STOP + " REAL, "
+ KEY_DUR + " REAL );";
private SQLiteDatabase mDb;
ContentValues timerValues = new ContentValues();
timerValues.put(KEY_START, stime.toMillis(false));
timerValues.put(KEY_STOP, etime.toMillis(false));
timerValues.put(KEY_DURATION, stime.toMillis(false)-etime.toMillis(false));
int result = mDb.insert(DATABASE_TABLE, null, timerValues);

I pull this data from two separate functions with slightly different bits of code, both using Time.set(long millis), both giving incorrect results: The start and stop values come back correct, but the duration comes out 17 hours too large. Am I missing something about calculating durations or does this just seem like there's something "special" about this particular droid? I'll have another droid to test on Monday, but any ideas are appreciated.

View 3 Replies View Related

HTC Desire :: Call Log For Duration Of Received Calls

May 30, 2010

i know there's a call log of who you've phoned but is there a call log of how long you have been on the phone i.e how many hours and minutes

View 1 Replies View Related

Android :: Incoming Ring Control For Duration Of Time Period

Aug 2, 2010

I am working on a application ,where I want to assign a silent ringtone to a particular contact for a duration of time period. Please provide me some suggestion I do not have any idea to implement it.

View 4 Replies View Related

Android :: Date Picker Application Show Time Duration

Mar 7, 2010

I need someone to test my First app I did. It is reworked and extended version of Android DatePicker app here: Date Picker | Android Developers. I don't have Android creature, because I am out of the Google test area. My app shows Time Duration using the DatePicker Dialog twice
The result can be seen on the image.

Please email me and I'll attach the tDurator.apk for you. I need feedback about the working state of the app when rotating the Nexus 1 device, but anyone having at least Android system 1.5 (level 3 on the SDK) can run the app. The app is signed for release and in not harm to the phone.

View 4 Replies View Related

Android :: When Video Duration Or Date_modified Attribute Available Through Content Provider

Aug 8, 2010

I'm having some trouble accessing attributes like DURATION and DATE_MODIFIED of video and image. My app access these attributes for both type of data but if I take a picture or shoot a video the related attributes are not immediately available through content provider e.g. for DURATION for that specific video it returns 0.

If I restart the phone the attribute for the newly shoot video or picture taken becomes available.

The other way to make the attributes available is to plug in and out your phone to a computer through usb cable. Once that is done the attributes are available.

View 3 Replies View Related

Android : App To Record Calls Duration - Messages And Data Used Through Phone?

Mar 23, 2010

I have been having problem with the carrier, they use to say I have called many numbers and have sent many SMSs I didn't really call or send.

So I was wondering if there is an app which will record all the calls' duration, SMSs sent and 3G/Edge usage.

So I could have a report later and compare it to my phone bill.

View 2 Replies View Related

Android :: Get Gapless Playback In Droid Mediaplayer

Apr 13, 2010

I am trying to play continuous stream using android mediaplayer.but am not able to avoid gap in playback while updating the datasource file of mediaplayer.How can i overcome this problem?

View 1 Replies View Related

Motorola Droid X :: Sms Time Stamps Are Not Correct

Sep 23, 2010

i am getting so annoyed with every answer i am getting

View 2 Replies View Related

HTC Droid Eris :: How Do I Turn Off Auto Correct?

Sep 29, 2010

I hate the auto correct feature while e-mailing on my Eris. How do I disable it?

View 1 Replies View Related

Motorola Droid :: Correct Metamorph Procedure For 2.1

Mar 21, 2010

I have read around a bit but I am kinda confused between different phones/versions using metamorph.

Last time I tried it and restarted I got stuck in a bootloop =P. I made a COMPLETE backup so going to give it a try shortly.

As I understand, I download metamorph from the market, move my themes into my sdcard metamorph folder, then basically run metamorph. I think BB.9 has busybox already taken care of.

I don't need to clear/wipe anything or whatnot for this to work correct, right?

View 7 Replies View Related

Motorola Droid X :: GPS Location Is 2 States Off / Get Correct?

Oct 24, 2010

So my gps location puts me close to 500 miles away from my actual location. Ive pulled battery, turned gps off n on, turned location settings off n on and I still cant get it to locate me correctly....any tips?

View 2 Replies View Related

Sony Ericsson Xperia X10 :: Snooze Duration Option For Alarm Clock?

Sep 8, 2010

Would anybody please help me out if there is any Snooze duration option for Alarm Clock?

View 3 Replies View Related

Android :: Mp3 Files <=0.34 Secs Not Playing On Droid X Using MediaPlayer

Jul 16, 2010

Getting reports that mp3 files <= 0.34 secs in length, are not played (or, at least, inaudible) on the Droid X.  Works fine on other devices I've tried (e.g. Nexus One, Hero, G1)

All files longer than 0.34 secs are working fine. I've tested this with about 100 files (mixture of short and long) and the correlation is 100%.

View 4 Replies View Related

Android :: Use Basic HTTP Authentication With Droid MediaPlayer?

Aug 13, 2009

I cant find a way to use an url that requires basic auth when im using code...

Anyone that got any ideas?

View 3 Replies View Related

Motorola Droid X :: Automatically Correct Misspelled Words

Jul 21, 2010

I want my DX to automatically correct misspelled words. Like when it sees "teh" I want it to go ahead and change it to "the." Is there a way to do this?

View 1 Replies View Related

Motorola Droid :: Voice Input Never Gets Correct Address

Jan 5, 2010

I gave away my GPS device to my wife took her crappy one for my own use it was so bad that I gave the sum b itch away, no wonder she would always get lost with this piece of crap MIO. So now I only have my droid there in lies the problem what is the easiest way to get a house address inputted, the voice input never gets the correct address unless you are doing one liners. If I try to spell it out before I finish it times out, and I can't seem to consistently input it through the search bar on the home screen if I do it will only show a map of the place and does not offer the navigation to the place what am i doing wrong. It was so bad today i pulled out a paper map. Please let me know the exact steps my address today was 3910 Antioch church rd 23150 could not say it could not spell it and could not input it could not get it very frustrating help is needed or I am gonna have to buy another GPS

View 7 Replies View Related

Motorola Droid :: Auto-Correct / Custom Dictionary

Jan 4, 2010

With my BlackBerry Storm there was a (I think it was called) a custom dictionary. I was able to type something like "OMW=On My Way" in a text message and it would substitute the words "On My Way" for the letters "OMW". Is there such a feature for the Droid with your application?

View 4 Replies View Related

Motorola Droid :: Hard Keyboard Auto Correct

Jan 14, 2010

Hard Keyboard auto correct. Does it exist?

View 29 Replies View Related

Motorola Droid :: Does Maps Correct Routing For Traffic?

Nov 2, 2009

I know that Lexus navigation systems will take a look at live traffic conditions and reroute you according to congestion and accidents. Since the Droid has the ability to do live traffic in the map layer...does anyone know if it takes this information into account when calculating the directions.

View 13 Replies View Related

Motorola Droid X :: Battery App With Correct Percentage Indicator?

Sep 7, 2010

all these apps have battery life in increments of 10%. do any go by 1% ? for example, phone shows 82% battery life and not 80%...

View 16 Replies View Related

Android :: Droid ImageView Not Going To Bottom / Correct Methodology To Do It?

Nov 7, 2010

I'm trying to get an ImageView to sit at the bottom of the screen and I have tried every combination I can think of but no matter what I try, it positions itself in the vertical middle, rather than at the bottom.

In my code below, the Text view does sit at the bottom, but the image does not.

What is the correct methodology for adding an element that would align to the bottom of the screen? code...

View 1 Replies View Related

Android : Correct Xmlns Url For AdMob In Droid Layout XML?

Jan 7, 2010

I am testing the AdMob for Android SDK. I can't set the admob:testing="true" because the admob attribute is unknown.code...
My Eclipse is complaining that admob:testing="true" would have an unknown prefix. Anyone got an idea on how to fix this?

Sub question: Anyone got an idea how to change the height of the ad? It seems to be fixed to 48px, which is not looking good on any DROID phone...

View 1 Replies View Related

Android :: Possible Duration Of Idle Time Of Phone Based On Current Battery Level

Aug 18, 2010

I am new to the android programming environment. I am currently working on a project which deals with the user's phone battery level.I am showing the current battery level left on the phone.now i want to display the amount of duration of "idle time, talk time, video playback, audio playback and web surfing" that can be done based on the current battery level. What kind of approach shall i follow.(or) What available API shall i use to get those.

View 2 Replies View Related

Motorola Droid X :: Most Up To Date Correct Download Link Android

Aug 10, 2010

To make sure I get the most up to date one, can someone provide the link to download ADB. Is this the correct download link Android SDK | Android Developers ? Then just choose whatever platform I am running? Or is the SDK not the same thing....

View 16 Replies View Related

Motorola Droid X :: Sms Time Stamps Are Not Correct - Since The Official 2.2 Froyo

Sep 23, 2010

im using handscent sms and my timestamps are off by 3 hours they r 3 hours ahead then wut it really is.this is only for the received text the send texts are the correct time is anyone else experiencing this? know with the leaked 2.2, people had the same problem and was fixed with an update from hand scent. has anyone figured a solution to this? this has only happened since yesterday when the official 2.2 froyo was released.

View 14 Replies View Related

ADVERTISEMENT