Android :: Can't Change MediaPlayer Data Source / Solution For This?

May 25, 2009

I'm experiencing some sort of problem. Let's say I have a MediaPlayer object wich can play an audio sound and a Resources object Code....

So when I invoke mp1.start() , sound1 plays, everything's normal.

But when I try to change the sound that my MediaPlayer should play, it doesn't work, here is what I do code...

I'm pretty sure someone can see a mistake in my code.

Android :: Can't change MediaPlayer data source / solution for this?


Android :: Set Data Source To An Raw ID In MediaPlayer?

Aug 16, 2009

In MediaPlayer.create method an id to a Raw file can be used but how to use that in setDataSource method?

View 1 Replies View Related

Android :: Sorting My ArrayAdapter Doesn't Change My Data Source

Sep 14, 2010

I am having a weird issue. I have an ArrayAdapter which I am sorting. This displays properly on my screen, however when I check the actual data source, the contents have not been sorted. How can I ensure that sorting my ListAdapter will also sort my data source?

CODE:....

This shows that my data source hasn't been updated, even though my ListAdapter presents my ListView in the correctly sorted order.

For example:
If my data source is [10,9,1,20] after sorting my ListView will show [1,9,10,20] but the data source will still be [10,9,1,20]

View 1 Replies View Related

Android :: Could Not Get Audio Input For Record Source / Solution For This?

Mar 29, 2010

I'm getting the above error message when i run below code. please let me know if you have found any solution for this? code...

View 2 Replies View Related

Android :: Change ImageView After Few Seconds / Solution For That?

Sep 18, 2010

I'm trying to implement a simple activity that will let user to insert a password.
I've a gridview with the 9 images to use and 4 imageviews that will be the selected images (on clicking on item on gridview, the corresponding image will be filled with the selected one).

Now the problem: I want that the 4 imageviews acts similar to password fields: for 1 seconds appears the selected item and then another image...
I tried using asyncthread but I got and error: Only the original thread that created a view hierarchy can touch its views
Here my code...

View 2 Replies View Related

Android :: MediaPlayer - Sound Stops When I Change - Suddenly Randomly In My Game

Jan 6, 2010

Why does my MediaPlayer
MediaPlayer mp = MediaPlayer.create(this, R.raw.somemusic); mp.setLooping(true); mp.start();

stop, wenn I change the layout?
setContentView(R.layout.screenoptions);

and also suddenly in my game, the sound stops. What could be the reason?

And which one is better? MediaPlayer or SoundPool?

View 2 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

Android :: Best Way To Store Application Data / When Data Stored / Data Format Could Change In Future Versions?

Mar 4, 2010

I'm making an Android Java app game (although this question applies to all languages really) and hope to release the first version soon. I'm nervous about how I save data in my game. My problem is that, if in a later update, I decide to store more data or store the same data in a different way, I need to be careful I don't lose or corrupt data for users that upgrade (i.e. I want users to be able to use data created by an old version in the new version, like their high scores from before).For example, say I want to save high scores in version 1.

View 3 Replies View Related

Android :: Background Task / Progress Dialog / Orientation Change / Any 100% Working Solution?

Sep 29, 2010

I download some data from internet in background thread (I use AsyncTask) and display a progress dialog while downlaoding. Orientation changes, Activity is restarted and then my AsyncTask is completed.I want to dismiss the progess dialog and start a new Activity. But calling dismissDialog sometimes throws an exception (probably because the Activity was destroyed and new Activity hasn't been started yet).What is the best way to handle this kind of problem (updating UI from background thread that works even if user changes orientation)? Did someone from Google provide some "official solution"?

View 1 Replies View Related

Motorola Milestone :: High Standby Data Usage Solution

Mar 7, 2010

I've noticed a few people have complained about high standby data usage.. ie when you leave the phone on a desk, with nothing streaming, you still manage to use up 1-2mb per hour (as I was!). This is a big problem for people moving from something like a blackberry where it was hard to use up a lot of data even if you tried.I tried disabling as much as possible to see what was causing the problem (NetSentry was great for tracking usage but of course can't tell you which programs/services are using it up), and after exhausting all ideas I tried deleting the two non-GMail email accounts I had. On was set up as push Exchange, and the other a 15-minute polling POP account. I have to assume it was the Exchange that was the problem, but I can't be sure. In any case, my usage dropped from about 4MB over 3 hours to about 12kB for the last 3 hours since I disabled the accounts.In conclusion, email can be more of a problem than you think! I'm going to forward my other accounts through my GMail to see if that works better.

View 43 Replies View Related

HTC Desire :: Occasionally Mobile Data Fails To Re-engage / Solution For This?

Jul 23, 2010

I have an un-branded Desire with the latest HTC OTA firmware update and it's running on T-Mobile here in the UK. I have Web n'Walk so I get the full-speed HSDPA data service when it's in range.

I also use Google Maps Navigation a lot. The problem I notice is that sometimes after setting a new route the mobile data connection to download the route data fails to fire up. I can see the mobile signal strength bars, but no 3G or HSDPA signal indicators. And of course without the data connection the new route details don't get downloaded. I usually have to power off the phone and then re-power to get around this.

It doesn't happen consistently - sometimes no problems at all. And the problem seems unrelated to signal strength.

Does anyone else experience this and has anyone found a solution?

View 3 Replies View Related

Android :: Way To Change Source For String

Aug 26, 2010

is there way to change source for string from res/values/string.xml

View 2 Replies View Related

Android : Change Launcher In The Source Co

Jul 9, 2009

When i was changing Launcher in the source codes, i was unable to find the desktop default picture.

View 2 Replies View Related

Android :: Retreivng Data From Internet Source

Mar 21, 2009

I am having difficulty retrieving data from the internet to be displayed in a TextView. When I run the application it says the application has stopped unexpectedly.

I am using the code:

CODE:.................

View 21 Replies View Related

Android : How To Update A Database Used As A Source Of Data By App

Aug 4, 2010

I have an app which uses a large amount of data which has been compiled outside the app (on my main PC). The app is for my personal use so there are no complications with having to distribute data updates to other users. However, I am currently following a very convoluted and time-consuming procedure each time I want to update the data, and I wonder if anyone can suggest any ways to streamline it.

The procedure I follow whenever I want to add new data is as follows:

I enter the new data into a csv file which I maintain as the source of the relevant table in the database. I use SQLite Database Browser to import the data into an existing SQLite database. (This program does not seem to have the ability to append imported data into an existing table, so whenever a table needs updating I have to delete the existing table, then import data from the csv file into a new table, then manually edit the data types for all the fields in the table.)

I drag the icon for the database file onto the 'assets' folder of my project in Eclipse. I export the project from Eclipse as an apk file. I copy the apk file to my phone (using Astro File Manager) I uninstall the old version of the app and install the new apk.
when the app is run, code based on the example set out here copies the data from the 'assets' folder into the app's data folder; this means that each byte of data takes up two bytes in the phone's internal memory; at present this is not a problem, but could be as the volume of data grows; I wonder if there is a more memory-efficient method?

View 2 Replies View Related

Android :: Conversion Of Input Source To Meaningful Data

Aug 16, 2010

i want to ask about that can we convert the input source type data in android. my prob is here that i get the data from the url not in tags form. i fetch output in the inputsource type. after that i want to parse the data in meaningful form is this possible or not? if this possible then how can i implement?

View 1 Replies View Related

Android :: ImageView Clicked Change Image Source

Aug 16, 2010

I am working on changing the image being shown when I have my ImageView Clicked. I am trying to use a similar code that I used for accomplishing this with a TextView but I can't seem to find the right terms to get it to work. Here is my current code:

electronconfiguration.setOnClickListener(new View.OnClickListener() {
public void onClick(View drawable) { if (drawable.equals(R.drawable.element_el))
electronconfiguration.setImageDrawable(R.drawable.aluminum_el);
else if (drawable.equals(R.drawable.aluminum_el))
electronconfiguration.setImageDrawable(R.drawable.element_el);
} } );

View 2 Replies View Related

Android :: Adding Items To Data Source Doesn't Appear In ListView

Aug 29, 2010

I am adding items to my data source and would like it to appear in my ListView.

For some reason nothing is appearing:

Adapter:

CODE:.........

Adding items in onCreate:

CODE:...............

Here is my layout:

CODE:..................

View 2 Replies View Related

Android :: Media Player Not Working On HTTPS As Data Source / Resolve It

Feb 15, 2010

I am able to play mp3 files from a HTTP server.I have given the link as Datasource and it is working fine.When I

replaced the link with HTTPS then media player is not working.Please help to resolve this issue.

View 2 Replies View Related

Android :: Import Data From Excel (or Other Source Text, World Etc) To SQLlite?

Jun 17, 2009

I have a database in Excel and I want to import it into SQLlite so I can use its contents in spinners and other features of my application. I have done the tutorials and surfed online but no indications at all for my specific problem.

View 2 Replies View Related

Android :: Fill In Scroll View From File , Database / Any Data Source?

Nov 15, 2010

I want to bind data from an xml file? how can I do that where i'm using a layout xml file to define a scrollview ??

View 1 Replies View Related

How To Change Open Source

Mar 26, 2013

Basically im looking to make a type of "search and opens a custom page" type app, such as when you type in a word (maybe adding in suggestions to what you are typing) , and when you click the word you desire, it opens a page made by myself with data on it.

I found an opensource of a dictionary, sounds lame, but it's a generally close idea to what i would like to create.

My question: What part of this code would i edit? and what exactly would i put at that location? also, how do I create a custom page for it to go to when it click the said word ?

[URL]

View 8 Replies View Related

Android :: Change Intent Bundle Data Before Activity Recreated After Orientation Change

Jul 30, 2009

I have a notification that starts my activity and passes a messages using the intent's putExtra() function. The message is then displayed to the user in the activity's onCreate function. When the application is restarted due to a orientation change, the message is shown again as it is still in the intent's bundled data.
How can I remove the extra data?

I tried the following:

Bundle bundle = getIntent().getExtras();
if (bundle.getBoolean("showMessage")) {
// ... show message that is in bundle.getString("message")
// remove message
bundle.remove("showMessage");
}

But the message will still be shown after the orientation changed, seems like the intent used is not the one I changed, but the original one. The only workaround I found is to save the showMessage additionally in onSaveInstanceState(). Is there another way? Or is this the way to go?

View 2 Replies View Related

HTC Magic :: Change Contact Source On Existing Contacts?

Sep 19, 2009

Is is possible to change contact source on existing contacts?

I would like to modify some existing contacts so their contact source is changed from Phone to Google.

View 4 Replies View Related

Android :: How To Push Code Change To Android Open Source Project?

Nov 21, 2010

How to push the code change to Android open source project? Anyone could provide a push command for me?

View 3 Replies View Related

Android :: Unable To Play File When Set Data Source To Sd Card File

Apr 13, 2009

I am trying to play file which is stored in SDCARD in emulator. I have Linux O/S. So i need to provide command in run configuration. I am providing following parameter.

-sdcard /usr/android/sdcard/mysdcard.iso -audio oss [i]

The following is my code to play file.

try { mMediaPlayer.setDataSource("/sdcard/test_cbr.mp3"); mMediaPlayer.prepare(); // Giving error. mMediaPlayer.start(); }

View 4 Replies View Related

Android :: Change Source Image For Image View When Pressed

Nov 16, 2010

I have a scroll view with lots of image buttons. I want to change the image for an image button when it's pressed. The thing is that I want the image to remain until another image button is pressed. That's why I couldn't use a selector. What is the best practice to achieve his?

View 3 Replies View Related

General :: Add New Device Tree / Kernel Source Code To CM Source And Compile?

Apr 15, 2012

i have: CMW recovery, Kernel source code on local computer, full repo cm source + toolchains.

How to add my device tree, kernel source code to CM source and compile CM7 ROm?

View 3 Replies View Related

Android :: Want To Change Working Directory To Data / How To Do

Feb 1, 2009

I just got the Dev Phone G1 so I install my apk, named myapp.apk on it.

But my application's working directory is /system/myapp which is mounted

as read-only.

So I want to change my working directory to /data.

How can I change this?

View 4 Replies View Related

Android :: Way To Change Map Data For Droid Google Map API

Mar 30, 2010

I need to use a different datasource inside a map in Android than the google provided data. Is there a way to change the datasource to a tile based service (openstreetmap.org for example)?

Or are there other Android map APIs which are OpenSource and can be adapted (except Ericcson Mobile Maps - this doesn't work for me because of the licence)?
It doesn't have to have a server side part - a rich function library would be enough.

View 3 Replies View Related







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