[android-developers] Re: Issue with Threads and onCreate()

2009-03-11 Thread Marco Nelissen
That will solve the problem when opening/closing the keyboard, but won't solve it when e.g. starting the app and then immediately hitting the back button to exit it. On Wed, Mar 11, 2009 at 5:37 AM, Stoyan Damov stoyan.da...@gmail.com wrote: keyboardHidden|orientation On Wed, Mar 11, 2009

[android-developers] Re: Issue with Threads and onCreate()

2009-03-11 Thread Marco Nelissen
the back button in onKeyDown On Wed, Mar 11, 2009 at 2:51 PM, Marco Nelissen marc...@android.com wrote: That will solve the problem when opening/closing the keyboard, but won't solve it when e.g. starting the app and then immediately hitting the back button to exit it. On Wed, Mar 11, 2009

[android-developers] Re: The specified child already has a parent. You must call removeView() on the child's parent first.

2009-03-15 Thread Marco Nelissen
It would help if you posted the stack trace for the exception, and the code that triggers it. On Sun, Mar 15, 2009 at 7:18 AM, gsmd gsm...@gmail.com wrote: This is the IllegalStateException thrown from onCreate() that brings the main activity of my app down upon restart (e.g. launch app -

[android-developers] Re: Is it normal to play an audio during phone call?

2009-03-16 Thread Marco Nelissen
++ On Mon, Mar 16, 2009 at 4:08 PM, Marco Nelissen marc...@android.com wrote: The music player will automatically pause when a call comes in, however if you then decide to resume playback while you're in the call, that's your choice, and we won't prevent you from doing so. On Sun, Mar 15

[android-developers] Re: is there an andriod simulator?

2009-03-17 Thread Marco Nelissen
The emulator is included in the SDK. On Tue, Mar 17, 2009 at 3:09 PM, ytbryan ytbr...@gmail.com wrote: hi all, may i know is there an andriod simulator ? like how the iphone simulator works? thank you regards bryan --~--~-~--~~~---~--~~ You

[android-developers] Re: a way to make signal processing

2009-03-17 Thread Marco Nelissen
On Tue, Mar 17, 2009 at 4:09 PM, Maisonobe.A (MaaKs) alexma...@gmail.com wrote: Hello, I'm looking for a way to work on sound . I would need to get the mic input as raw data and to perform some test , is there a way to get raw sound data ? No, not currently.

[android-developers] Re: Simple Cursor Adapter - List View

2009-03-18 Thread Marco Nelissen
You should create your own adapter (probably derived from SimpleCursorAdapter) that does this in its bindView method. On Tue, Mar 17, 2009 at 11:57 PM, Markiv vikramshe...@gmail.com wrote: I have table with 3 columns which is binded to an XML document with three text views. String[] from =

[android-developers] Re: Re-register AlarmManager events on upgrades

2009-03-18 Thread Marco Nelissen
On Wed, Mar 18, 2009 at 3:47 AM, Stoyan Damov stoyan.da...@gmail.com wrote: On Wed, Mar 18, 2009 at 4:36 AM, Dianne Hackborn hack...@android.com wrote: Fwiw, cupcake will add a new field to PACKAGE_ADDED to tell you if this was due to an update, and allow this broadcast to be received by the

[android-developers] Re: Problems with NotificationManager

2009-03-18 Thread Marco Nelissen
Just use a different Intent for each of your notifications. On Wed, Mar 18, 2009 at 4:03 AM, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, In my app I use several different notifications, which require different actions. By default the notification manager loads the main

[android-developers] Re: MediaPlayer and onRetainNonConfigurationInstance()

2009-03-18 Thread Marco Nelissen
You will have to handle the orientation change yourself, since otherwise the surface that the video is displayed on goes away. On Wed, Mar 18, 2009 at 11:30 AM, Andres Calvete andres.calv...@gmail.com wrote: I know this question has been asked previously because I have read the other

[android-developers] Re: Problem launching my own (camera) application on press of Camera-button

2009-03-19 Thread Marco Nelissen
Try calling abortBroadcast() in your receiver. On Thu, Mar 19, 2009 at 7:18 AM, Streets Of Boston flyingdutc...@gmail.com wrote: When i press the phone's camera button, both my application and the system's camera application are launched: - I press camera button - After a few seconds, my

[android-developers] Re: Getting a complete list of android native drawables

2009-03-21 Thread Marco Nelissen
On Fri, Mar 20, 2009 at 7:42 AM, Mark Murphy mmur...@commonsware.com wrote: That list is...  very questionable.  It contains lots and lots of resources that are not in the public SDK, and which you should not be using. Then how about pointing us to a list that isn't questionable?  Or at

[android-developers] Re: How to check if there are registered broadcast listeners?

2009-03-22 Thread Marco Nelissen
On Sun, Mar 22, 2009 at 5:28 AM, Yuriy Olkhovyy y.olkho...@gmail.com wrote: Is there a way to check before sending a broadcast (from a remote service) whether there are registered broadcast listeners? What I'd like to do is to send broadcasts only if there are registered listeners, otherwise

[android-developers] Re: Cupcake coming in April? Where is the SDK?

2009-03-23 Thread Marco Nelissen
I certainly hope there aren't a lot of applications that use reflection and private APIs. On Mon, Mar 23, 2009 at 6:59 AM, zl25drexel zl25dre...@gmail.com wrote: Cupcake is coming, and as you know it will break a lot of apps in the market, those that use reflection private api. So where is

[android-developers] Re: ProgressBar - Emulator not working?

2009-03-23 Thread Marco Nelissen
Try adding this to your xml: style=?android:attr/progressBarStyleHorizontal On Mon, Mar 23, 2009 at 9:50 AM, droozen droozenr...@gmail.com wrote: I just wanted to run a ProgressBar test, as it's my first time using them on the Android. Here's my XML (in a Linear Layout): ProgressBar

[android-developers] Re: How to show my ProgressBar

2009-03-24 Thread Marco Nelissen
The problem is that your 'backgroundWork() method is not actually running in the background, but in the main UI thread. You'll need to do the work in a separate thread. On Tue, Mar 24, 2009 at 8:02 PM, guishenl...@gmail.com guishenl...@gmail.com wrote: I want to show a ProgressBar while doing

[android-developers] Re: MediaPlayer fails with LocalSocket

2009-03-24 Thread Marco Nelissen
The file descriptor used for a MediaPlayer must be seekable, which a socket is not. On Tue, Mar 24, 2009 at 3:22 AM, Pawel Defee pawel.de...@gmail.com wrote: Trying to set a file descriptor originating from a LocalSocket on a MediaPlayer fails in Android, both the SDK emulator and the

[android-developers] Re: All SYMBIAN based end devices accept Java language Applications :: Need Clarification

2009-03-25 Thread Marco Nelissen
On Wed, Mar 25, 2009 at 9:30 AM, Zhubham sahilz...@gmail.com wrote: “All SYMBIAN based end devices accept Java language Applications” (i)     Does this mean that the applications made for Android would run in S60 , without any modifications?? No. (ii)    If not then what exactly we mean

[android-developers] Re: TERRIBLE BUG: aapt crashes on Windows

2009-03-25 Thread Marco Nelissen
On Wed, Mar 25, 2009 at 3:38 PM, Stoyan Damov stoyan.da...@gmail.com wrote: This is a showstopper, and I'm experiencing for the 2nd time. Shouldn't be hard to find, if the apt tool developers have created a .map file for the release build. It seems like the dev has dereferenced a null

[android-developers] Re: Anything on Android that can do smooth scrolling?

2009-03-27 Thread Marco Nelissen
On Fri, Mar 27, 2009 at 2:35 AM, Al Sutton a...@funkyandroid.com wrote: Or an Exclusive app and App that can pause exclusive app pair of permissions. If you really want to make this user friendly the settings page could allow users to select which apps with the App that can pause exclusive

[android-developers] Re: Some stacktraces do not show up in logcat output

2009-03-29 Thread Marco Nelissen
All uncaught exceptions are logged. The library you are using is probably catching them at a different level, preventing them from showing up in the log. On Sun, Mar 29, 2009 at 4:14 PM, Dirk Jaeckel dirk.jaec...@gmail.com wrote: Hi! Usually I can see the exceptions that are thrown in my

[android-developers] Re: can i add a click listener to a drawable?

2009-03-30 Thread Marco Nelissen
Your Drawable itself is not part of the UI, but is drawn onto something that is part of your UI. Therefore, you should attach your listener to the UI object that displays the Drawable. See also http://developer.android.com/reference/android/graphics/drawable/Drawable.html, which says Unlike a

[android-developers] Re: Android game developers desperately need optimised game engine example code ...

2009-03-30 Thread Marco Nelissen
On Mon, Mar 30, 2009 at 2:14 AM, admin.androidsl...@googlemail.com admin.androidsl...@googlemail.com wrote: Thanks for the response. Side scrolling is a very commonly used game engine and I believe that the platform needs better examples of this. Obviously other graphic engines are needed

[android-developers] Re: Android game developers desperately need optimised game engine example code ...

2009-03-30 Thread Marco Nelissen
Unless you're trying to build your side-scroller using multiple nested layouts and dozens of textviews, it's completely irrelevant. On Mon, Mar 30, 2009 at 9:45 AM, Sundog sunns...@gmail.com wrote: I find this more depressing than otherwise. So whoever wrote those views wasn't happy with the

[android-developers] Re: can i add a click listener to a drawable?

2009-04-01 Thread Marco Nelissen
PM, Marco Nelissen marc...@android.comwrote: Your Drawable itself is not part of the UI, but is drawn onto something that is part of your UI. Therefore, you should attach your listener to the UI object that displays the Drawable. See also http://developer.android.com/reference/android/graphics

[android-developers] Re: MediaPlayer sluggish to play sounds

2009-04-01 Thread Marco Nelissen
I'm surprised that calling start() has no effect, and that it takes several seconds for playback to work again. Do you have the same issue when playing a file in the music player, for example? On Tue, Mar 31, 2009 at 5:35 PM, Eric M. Burke burke.e...@gmail.com wrote: I have an Activity that

[android-developers] Re: SQLite functions - how to use them?

2009-04-01 Thread Marco Nelissen
While that works, it will create a Cursor with 'N' rows and then counts the number of rows. If you instead retrieved count(*) as a column, you'd have a Cursor with 1 row, with a field that contains the count. The latter is more efficient. On Wed, Apr 1, 2009 at 5:03 PM, Glen Humphrey

[android-developers] Re: screen sleeps while playing the video

2009-04-02 Thread Marco Nelissen
Use MediaPlayer.setScreenOnWhilePlaying(), or use a VideoView instead of rolling your own. On Wed, Apr 1, 2009 at 10:33 PM, manoj manojkumar.m...@gmail.com wrote: Hi, I have written a video player app. Its working fine, but the problem is the screen is going to in sleep mode after playing

[android-developers] Re: Some of the strange JAVA syntax - android specifics?

2009-04-02 Thread Marco Nelissen
On Thu, Apr 2, 2009 at 10:13 AM, Odessa Silverberg silverberg.ode...@googlemail.com wrote: synchronized: I'd suggest your starting reading about Java Synchronization. 'synchronized' blocks prevent multiple threads from executing the same block of code at the same time. They are used to

[android-developers] Re: OpenGL What Cube Face Is Facing Me

2009-04-02 Thread Marco Nelissen
Since you're rotating and drawing the cube, shouldn't you have that information in your app already? On Thu, Apr 2, 2009 at 7:30 PM, William william.caine...@gmail.com wrote: Hi Folks, I am drawing and rotating a cube.  Is there a programmatic way to tell what side of the cube is facing

[android-developers] Re: OpenGL What Cube Face Is Facing Me

2009-04-03 Thread Marco Nelissen
On Fri, Apr 3, 2009 at 7:24 AM, William william.caine...@gmail.com wrote: //i rotate the cube using the following //xRot,yRot are inc or decremented to change angles gl.glRotatef(xRot, 1.0f, 0.0f, 0.0f); gl.glRotatef(yRot, 0.0f, 1.0f, 0.0f); So yes i have access to yRot and xRot but they

[android-developers] Re: What is the proper handling of action.MEDIA_BUTTON?

2009-04-03 Thread Marco Nelissen
On Fri, Apr 3, 2009 at 1:35 PM, Stefan skyntc...@gmail.com wrote: Does anyone know what is the proper way of subscribing for the action.MEDIA_BUTTON - (this is sent by the button on the headset and currently controls the play/pause of the built in player). It depends. What do you want to do

[android-developers] Re: play video error

2009-04-04 Thread Marco Nelissen
What do you mean by windows flat form? If you want to play a file in the emulator, you will have to create an sd card image, copy the file to it, and then run the emulator with that sd card image. You cannot play a file directly off your C: drive. On Fri, Apr 3, 2009 at 10:49 PM, Nithin

[android-developers] Re: Detecting Noise!

2009-04-05 Thread Marco Nelissen
That's not going to work on Android. On Sun, Apr 5, 2009 at 5:16 PM, MyLinuxSupport mashpl...@gmail.com wrote: You should be able to fork the audio in Linux and write a c program to do the analysis, then write your results to android...  The challenge you will have is getting your c program

[android-developers] Re: MediaPlayer API

2009-04-06 Thread Marco Nelissen
If you want to play a file in the emulator, you will have to create an sd card image, copy the file to it, and then run the emulator with that sd card image. You cannot play a file directly off your D: drive On Mon, Apr 6, 2009 at 9:36 PM, vinny.s...@gmail.com vinny.s...@gmail.com wrote: can

[android-developers] Re: How to completely Destroy application

2009-04-07 Thread Marco Nelissen
You should start by taking a look at the system log to see what the actual problem is. There will probably be a helpful stack trace in there. On Tue, Apr 7, 2009 at 4:01 AM, manohar manohar...@gmail.com wrote: Hi all, I am unable to completely destory my app. My app is thread based app.

[android-developers] Re: Restoring the active Activity while resuming the application

2009-04-07 Thread Marco Nelissen
On Tue, Apr 7, 2009 at 10:04 AM, Omer Saatcioglu osaatcio...@gmail.com wrote: Hello all, I have two activities running: MainActivity and ChildActivity. Whenever the user clicks in the button in MainActivity, the ChildActivity is launched. What I want to do is this: When the active

[android-developers] Re: How do i do a startActivity() in BroadcastReceiver ?

2009-04-07 Thread Marco Nelissen
On Tue, Apr 7, 2009 at 11:55 AM, Prem Thilagar prem...@gmail.com wrote: Hi all  My use case is to launch one of settings app screen when I receive a certain event in idle state. For which, I added my new intent to PhoneAppBroadcastReceiver() in PhoneApp.java (looks like this receiver

[android-developers] Re: ERROR/MediaPlayer(1066): setDataSource called in state 128

2009-04-07 Thread Marco Nelissen
Looks like you're calling MediaPlayer.setDataSource() on a MediaPlayer that was already initialized, without first calling MediaPlayer.reset() On Tue, Apr 7, 2009 at 1:28 PM, ATrubka atru...@gmail.com wrote: Hi, guys. I'm using MediaPlayer and sometimes when first audio is about to end

[android-developers] Re: How to completely Destroy application

2009-04-07 Thread Marco Nelissen
, Marco Nelissen marc...@android.com wrote: You should start by taking a look at the system log to see what the actual problem is. There will probably be a helpful stack trace in there. On Tue, Apr 7, 2009 at 4:01 AM,manoharmanohar...@gmail.com wrote: Hi all, I am unable to completely destory

[android-developers] Re: Playback of dynamic MIDI?

2009-04-09 Thread Marco Nelissen
This is not possible right now. On Wed, Apr 8, 2009 at 8:26 PM, meantime dangerch...@gmail.com wrote: For one of my apps I generate MIDI data on the fly.  Is there any way to play MIDI data from a java.io.InputStream or directly from a byte []?  So far I've only seen ways to do MIDI

[android-developers] Re: How I call startActivity() in BradocastReceiver

2009-04-09 Thread Marco Nelissen
You already asked this exact same question from a different email address. Please don't start multiple threads for the same question. On Tue, Apr 7, 2009 at 11:26 AM, yeons...@gmail.com yeons...@gmail.com wrote: hello, I'd like to launch one of settings app screen when I received a certain

[android-developers] Re: ERROR/MediaPlayer(1066): setDataSource called in state 128

2009-04-09 Thread Marco Nelissen
of the MediaPlayer code is native I'm not sure what should be synchronized. On Apr 7, 9:20 pm, Marco Nelissen marc...@android.com wrote: Looks like you're calling MediaPlayer.setDataSource() on a MediaPlayer that was already initialized, without first calling MediaPlayer.reset() On Tue, Apr 7, 2009

[android-developers] Re: How get MediaRecorder to record in MP3 format

2009-04-10 Thread Marco Nelissen
There is no mp3 encoder included in Android currently, so you can't record to mp3. On Fri, Apr 10, 2009 at 5:13 PM, admin.androidsl...@googlemail.com admin.androidsl...@googlemail.com wrote: Would be more useful than AMR / MP4. Also would be compatible with the very handy source code for

[android-developers] Re: sdcard

2009-04-10 Thread Marco Nelissen
It would help if you said what error you're getting. You can check whether the file is actually there by doing something like adb shell ls -l /sdcard and checking that the file exists. On Fri, Apr 10, 2009 at 9:23 PM, Nithin nithi...@gmail.com wrote: Hi to all           I push the one

[android-developers] Re: sdcard

2009-04-10 Thread Marco Nelissen
not be found in the database of the mediaprovider. who know why? On Sat, Apr 11, 2009 at 1:24 PM, Marco Nelissen marc...@android.com wrote: It would help if you said what error you're getting. You can check whether the file is actually there by doing something like adb shell ls -l /sdcard and checking

[android-developers] Re: sdcard

2009-04-11 Thread Marco Nelissen
What format and resolution is this file? If it's high res H264, then the emulator is probably too slow to play it. On Sat, Apr 11, 2009 at 12:07 AM, Nithin Varamballi nithi...@gmail.com wrote: Thanks for replying I dont have real phone... I am working in Emulator... But i got error like

[android-developers] Re: FTP on android

2009-04-11 Thread Marco Nelissen
Are you accessing the server through wi-fi, or through the carrier network? If the latter, make sure it's actually accessible from your carrier's network. On Sat, Apr 11, 2009 at 2:39 PM, tiwana tiwana.birj...@gmail.com wrote: By th way the problem is with my dev phone not with emulator,

[android-developers] Re: sdcard

2009-04-12 Thread Marco Nelissen
mp4 is a container, which can contain all kinds of video formats. What codec was used to encode the video? On Sat, Apr 11, 2009 at 11:26 PM, Nithin Varamballi nithi...@gmail.com wrote: Hi Its mp4 format... Is it possible to do the videostreming Thank You Nithin N V

[android-developers] Re: finish() not killing Activity

2009-04-12 Thread Marco Nelissen
Are you sure you don't have several instances of activity C, and each press of the back button exits one until you finally get back to activity B? Try printing this in C.onDestroy() to make sure. On Sun, Apr 12, 2009 at 5:07 AM, Todd Sjolander guyfantas...@gmail.com wrote: Hello, I've got

[android-developers] Re: sdcard

2009-04-12 Thread Marco Nelissen
into the sdcard normally and can be seen in the /sdcard  catalog. i see in the mediacanner.java that ttis file is been sannered also. On Sat, Apr 11, 2009 at 1:58 PM, Marco Nelissen marc...@android.com wrote: Are the files in a supported format? How did you put the files in /sdcard? On Fri, Apr 10

[android-developers] Re: Events not catched on real device using Activity.dispatchEventType

2009-04-12 Thread Marco Nelissen
Are you sure that settings[1], settings[2] and settings[3] are true on the device? On Sun, Apr 12, 2009 at 5:20 AM, TjerkW tje...@gmail.com wrote: Hello all! I am creating a game in which the user can control a ship by - Using DPAD - Using touchscreen - Using trackball - And even using

[android-developers] Re: what is the recording format of Intent .RECORD_SOUND_ACTION?

2009-04-12 Thread Marco Nelissen
They don't really decode let alone encode those formats though, hence the 'cheap' moniker. Short of porting a full mp3 encoder to android, there is no way to convert sound to mp3 format on the phone. On Sun, Apr 12, 2009 at 11:40 AM, bw ben.weisb...@gmail.com wrote: Try looking at the source

[android-developers] Re: getContentResolver.query(Images.Media.EXTERNAL_CONTENT_URI ...) returns null on device

2009-04-12 Thread Marco Nelissen
Is there an sd card in the phone? On Sun, Apr 12, 2009 at 5:24 PM, yves...@gmail.com yves...@gmail.com wrote: This code works fine with the emulator, I can get a cursor to all the images, but after I installed the app into the real device (G1), I ran the app, this call returns null. If I

[android-developers] Re: finish() not killing Activity

2009-04-12 Thread Marco Nelissen
On Sun, Apr 12, 2009 at 6:28 PM, Todd Sjolander guyfantas...@gmail.com wrote: Marco, your hunch was right.  I was somehow creating multiple copies of Activity C.  In case anyone can benefit from this, let me explain how it went wrong. I implemented onTouch() in Activity B, which would

[android-developers] Re: Loading New Data with Back Button

2009-04-12 Thread Marco Nelissen
If 'view 2' is another activity, then the onResume() of 'view1' will be called after pressing the back button, so you could simply redisplay your data there. On Fri, Apr 10, 2009 at 7:16 PM, apple.developer27 apple.develope...@yahoo.com wrote: I have a message application so that on view 1 is

[android-developers] Re: onCreateContextMenu

2009-04-12 Thread Marco Nelissen
The return type should be void, not boolean. See: http://developer.android.com/reference/android/app/Activity.html On Sat, Apr 11, 2009 at 8:06 AM, streetdestroy...@gmail.com streetdestroy...@gmail.com wrote:    public boolean onCreateContextMenu(Menu menu, View v,ContextMenuInfo menuInfo)

[android-developers] Re: not able to play file when set data source to the sdcard file

2009-04-13 Thread Marco Nelissen
On Mon, Apr 13, 2009 at 2:52 AM, Honest honestsucc...@gmail.com wrote: Hello, 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

[android-developers] Re: sdcard

2009-04-13 Thread Marco Nelissen
? On Sun, Apr 12, 2009 at 11:46 PM, Marco Nelissen marc...@android.com wrote: If it's been scanned, but doesn't appear in the database (as you said earlier), you'll have to figure out why the file was rejected. Also, if you're having problems on a particular device, you should probably post

[android-developers] Re: Does iTunes/3GPP metadata supported?

2009-04-13 Thread Marco Nelissen
Some of the iTunes metadata is supported, but not all of it. If you bought a song from the iTunes music store, it should at least get artist/album/title/year from the file. On Mon, Apr 13, 2009 at 1:41 AM, Ethan lawrence@gmail.com wrote: Hi All, Please kindly help to answer the

[android-developers] Re: help......i am a Beginners

2009-04-13 Thread Marco Nelissen
You almost no information as to what goes wrong, but my guess is that since you didn't input any values, the call to Double.parseDouble() throws an exception. BTW, since you say you're a beginner, you might want to give the android-beginners mailing list a try. On Mon, Apr 13, 2009 at 7:11 AM,

[android-developers] Re: Gallery Child View Problem

2009-04-13 Thread Marco Nelissen
How did you get rid of the onFling event? It sounds like whatever you did to achieve that also broke scrolling. On Mon, Apr 13, 2009 at 8:22 AM, Alekh alek...@gmail.com wrote: I have created a child class from the Gallery view, named MyGallery. I did this because I wanted to get rid of the

[android-developers] Re: Apps labeled as Tetris Clones removed from Android Market

2009-04-13 Thread Marco Nelissen
On Mon, Apr 13, 2009 at 10:39 AM, Ikon ayanafr...@gmail.com wrote: This is not legal advice. I actually am a lawyer, and these copyright violation claims are very shaky.  Basically, they have a copyright to the exactly worded source code.  So if they wrote int numTetrads = 50 and you wrote

[android-developers] Re: Apps labeled as Tetris Clones removed from Android Market

2009-04-13 Thread Marco Nelissen
You can never patent abstract ideas. Game ideas cannot be patented OK, so we've established you're not a patent lawyer... :) My favorite patent is the one for swinging sideways on a swing, which IMO illustrates you can patent pretty much anything. On Mon, Apr 13, 2009 at 10:44 AM, Ikon

[android-developers] Re: Apps labeled as Tetris Clones removed from Android Market

2009-04-13 Thread Marco Nelissen
On Mon, Apr 13, 2009 at 11:40 AM, Ikon ayanafr...@gmail.com wrote: The variable example was just a small example.  My point was that on the variable rename alone is not a copyright violation, just because it relates to the same idea. However you cannot copy someones functions and rename the

[android-developers] Re: One line causing lots of garbage collection. String.format with float. Help?

2009-04-13 Thread Marco Nelissen
Don't use String.format(). It creates all kinds of temporary objects every time you call it. Instead, create a single StringBuilder and Formatter, and then reuse those every time you need to format a string. On Mon, Apr 13, 2009 at 7:37 PM, DavidG dgu...@gmail.com wrote: In my ListView,

[android-developers] Re: using touch screen to draw a straight line

2009-04-14 Thread Marco Nelissen
On Mon, Apr 13, 2009 at 5:12 PM, gandor gand...@gmail.com wrote: Hi Folks, Want to draw a line when I touch screen at two points. I can see OnTouch been invoked but after than everything breaks looks, the application crashes I am using drawLine in Canvas. Please let me know what I am

[android-developers] Re: One line causing lots of garbage collection. String.format with float. Help?

2009-04-14 Thread Marco Nelissen
(0);                        price = mFormatter.format(%.2f, args).toString();                        ((TextView)view).setText(price);                        return true;                }                return false;        } } END CODE On Apr 13, 10:40 pm, Marco Nelissen marc

[android-developers] Re: How to use headset button to pick up/hang up a call?

2009-04-14 Thread Marco Nelissen
The headset button already answers an incoming call, but once you're in the call, it mutes/unmutes. If you want it to hang up the call instead, you'll need to modify the Phone application. On Tue, Apr 14, 2009 at 2:44 AM, sein fang.sh...@zte.com.cn wrote: When I'm testing the functionality of

[android-developers] Re: Re-installation failed due to different application signatures

2009-04-14 Thread Marco Nelissen
You can't replace or uninstall the sytem apps, so if you want to create a music player based on the Android one, you'll have to put in in a different package. On Tue, Apr 14, 2009 at 3:07 AM, dycl3 dy...@126.com wrote: hello: out put by eclipse: [2009-04-14 17:55:39 -

[android-developers] Re: One line causing lots of garbage collection. String.format with float. Help?

2009-04-14 Thread Marco Nelissen
).toString();) it doesn't do the GCs anymore, but I of course lose my formatting. On Apr 14, 10:28 am, Marco Nelissen marc...@android.com wrote: When you say that it hasn't improved yourgarbagecollection problem, do you mean that it still GCs 13000 objects every 2 seconds? On Mon, Apr 13, 2009

[android-developers] Re: Re-installation failed due to different application signatures

2009-04-14 Thread Marco Nelissen
must adt remount firs, otheriwse i couldn't delete system/app/Music.apk, it's say it read only. thanks. On 4月15日, 上午2时36分, Marco Nelissen marc...@android.com wrote: You can't replace or uninstall the sytem apps, so if you want to create a music player based on the Android one, you'll have

[android-developers] Re: multiple successive queries to a database

2009-04-15 Thread Marco Nelissen
What's the error message in the system log? On Tue, Apr 14, 2009 at 10:38 PM, iki qui.af...@gmail.com wrote: The application has stopped unexpectedly. Please try again. One query always works. Two consecutive queries works about 75% of the time. Three consecutive queries works about a

[android-developers] Re: sendBroadcast() is crashing

2009-04-15 Thread Marco Nelissen
What does it say in the system log? On Wed, Apr 15, 2009 at 11:11 AM, Yogi yogesh.agrawal2...@gmail.com wrote: Hi All, I am try to post message with the help of sendBroadcast() API. But its carshing. Please find the piece of code as below:                  public static final String

[android-developers] Re: How to dump the content of sqlite via adb shell command

2009-04-16 Thread Marco Nelissen
On Thu, Apr 16, 2009 at 6:08 PM, Meryl Silverburgh silverburgh.me...@gmail.com wrote: Hi, I am trying to dump the content of sqlite via adb shell command. Here is what i did: $ adb shell * daemon not running. starting it now * * daemon started successfully * # sqlite3 SQLite version

[android-developers] Re: reuse IDs?

2009-04-17 Thread Marco Nelissen
yes On Fri, Apr 17, 2009 at 7:22 AM, Derek xianguan...@gmail.com wrote: Because there is no hierarchy in R.id, I presume an ID can be used in many layout.xml files. Am I correct? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[android-developers] Re: Dropping SQLite database

2009-04-17 Thread Marco Nelissen
It looks like you are confusing records, tables and databases. Can you post some more code, like how you create the database, how you create the table in the database, and how you store and retrieve records in the table? On Fri, Apr 17, 2009 at 5:27 AM, Zhubham sahilz...@gmail.com wrote: Hi,

[android-developers] Re: Check if a View contains another View

2009-04-18 Thread Marco Nelissen
View.findViewById() ? On Sat, Apr 18, 2009 at 2:52 PM, xspotlivin dmbrown2...@gmail.com wrote: Is there a way to check if a view contains another certain view? I have an AbsoluteLayout view that I add multiple views to (buttons). I have a certain button, let's call it reportButton, and I

[android-developers] Re: Problems deleting an audio file using a media content uri

2009-04-19 Thread Marco Nelissen
This is a problem with the media provider: it will delete the entry from the database, but won't delete the underlying file. For now, you'll have to do that yourself. On Sat, Apr 18, 2009 at 11:01 AM, estivenrpo estiven...@gmail.com wrote: Hi guys I have a Uri like

[android-developers] Re: Problems deleting an audio file using a media content uri

2009-04-19 Thread Marco Nelissen
/media/ 149 and i don't know how to create a file object with that. I have tried: File fileToDelete = new File(new URI(content://media/external/audio/ media/149)); fileToDelete.delete(); but it doesn't work. Thanks in advance, On 19 abr, 10:19, Marco Nelissen marc...@android.com wrote

[android-developers] Re: How can i import com.android.internal.phone?

2009-04-20 Thread Marco Nelissen
You shouldn't be sending AT commands, as they would very likely interfere with AT commands sent by the system itself, possibly leaving the radio in an inconsistent state. Also, this list is about developing using the SDK, which by definition excludes all the internal APIs. On Mon, Apr 20, 2009

[android-developers] Re: ReStarting An Activity From A Service

2009-04-20 Thread Marco Nelissen
On Mon, Apr 20, 2009 at 12:15 PM, Mohamed Amir mohamed.a...@gmail.comwrote: OK Mark. I am trying to make an application that show the caller-ID when there is an incoming call. And where there is another call, I wanna update the caller-ID shown. I have tried OnNewIntent but this callback

[android-developers] Re: Grayscaling

2009-04-20 Thread Marco Nelissen
You can do this more efficiently by using a Paint and a ColorFilter. On Mon, Apr 20, 2009 at 3:59 PM, sm12 mata...@gmail.com wrote: Solved. The problem was in the parameters of Color.rgb. --~--~-~--~~~---~--~~ You received this message because you are

[android-developers] Re: Doesn't Android-1.0 support Recording Video well?

2009-04-21 Thread Marco Nelissen
1.0 doesn't support video recording at all. On Tue, Apr 21, 2009 at 2:56 AM, david 1 david...@gmail.com wrote: hi all, I just experienced the video recording on G1 based on the system.img of android1.0. The process just lasts about 3 seconds, then blocks. And the generated file is empty.

[android-developers] Re: Encrypting application data file that is bundled with apk !

2009-04-21 Thread Marco Nelissen
On Tue, Apr 21, 2009 at 12:04 PM, Slater easwar.satras...@gmail.com wrote: Hi, I plan to bundle an xml data file that has all the metadata required by the application. When my app loads for the first time, the xml data file is read and local database is created and populated. This

[android-developers] Re: Elan sues Apple for multitouch patent infringment... and guess what....

2009-04-21 Thread Marco Nelissen
On Tue, Apr 21, 2009 at 12:19 PM, Stoyan Damov stoyan.da...@gmail.comwrote: On Wed, Apr 15, 2009 at 5:11 PM, Jean-Baptiste Queru j...@android.com wrote: Second, more importantly, many people who read and participate in this group and other official Android discussion groups work for

[android-developers] Re: Elan sues Apple for multitouch patent infringment... and guess what....

2009-04-21 Thread Marco Nelissen
On Tue, Apr 21, 2009 at 12:43 PM, Stoyan Damov stoyan.da...@gmail.comwrote: On Tue, Apr 21, 2009 at 10:27 PM, Marco Nelissen marc...@android.com wrote: On Tue, Apr 21, 2009 at 12:19 PM, Stoyan Damov stoyan.da...@gmail.com wrote: On Wed, Apr 15, 2009 at 5:11 PM, Jean-Baptiste Queru j

[android-developers] Re: Getting the ID of a ListView row item from a button click

2009-04-21 Thread Marco Nelissen
Why are you wrapping each checkbox in its own linearlayout? On Tue, Apr 7, 2009 at 10:35 AM, e-satis info.ksam...@googlemail.comwrote: Hello, Each row of my view look like that : LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/row_layout

[android-developers] Re: uninstall vs. upgrade

2009-04-21 Thread Marco Nelissen
Which is really a bug in the application. If an application updates its database schema, it should include code to migrate old versions of the database to the new schema. On Tue, Apr 21, 2009 at 5:26 PM, Dan Pou daniel@gmail.com wrote: As a side note, the SQLite db seems to be a frequent

[android-developers] Re: Why corsor need to call setNotificationUri when query from content provider?

2009-04-22 Thread Marco Nelissen
On Wed, Apr 22, 2009 at 2:48 AM, aby orz0...@gmail.com wrote: In the sample code of android developer http://developer.android.com/reference/android/content/ContentProvider.html When query the content provider, the cursor in query () call

[android-developers] Re: MediaPlayer sound problem

2009-04-23 Thread Marco Nelissen
Does it work with longer sounds? Have you tried using MediaPlayer.setLooping(true) instead of restarting it yourself from the OnCompletionListener callback? On Thu, Apr 23, 2009 at 12:00 AM, BlackLight blacklight1...@gmail.comwrote: Hello. I have this task: Need to play short (0.3-0.4 sec)

[android-developers] Re: android 1.5: How do we use the AudioTrack class?

2009-04-23 Thread Marco Nelissen
AudioTrack plays PCM data. The reason it sounds like noise is because that's what mpeg sounds like when interpreted as PCM. On Thu, Apr 23, 2009 at 3:44 PM, Moto medicalsou...@gmail.com wrote: Ok at this point I only get white noise? do I need to set the decoder? it's an MPEG stream

[android-developers] Re: android 1.5: How do we use the AudioTrack class?

2009-04-23 Thread Marco Nelissen
Use the MediaPlayer class. On Thu, Apr 23, 2009 at 6:35 PM, Moto medicalsou...@gmail.com wrote: lol yeah definitely true! But for some reason I thought it would be decoded into a playable format... How do we play AAC+ formats and MPEG formats?

[android-developers] Re: exit button - or not?

2009-01-27 Thread Marco Nelissen
Having a UI element for the user to select that then causes Activity.finish() to be called is no different from the user pressing the back button. In fact, this is what Activity.onKeyDown() does when you let the back key fall through. Also note that calling Activity.finish() doesn't actually quit

[android-developers] Re: Can you play a local video not on the sdcard?

2009-01-27 Thread Marco Nelissen
Playback/decoding actually happens in a different process (the media server), so that process needs to have permission to read your file. On Tue, Jan 27, 2009 at 4:01 PM, devileper devile...@gmail.com wrote: I can only get the VideoView to play videos on the sdcard, NOT local to my

[android-developers] Re: How to mute the player when I got an incoming call?

2009-01-28 Thread Marco Nelissen
You need to monitor the phone's state to see whether it is ringing, in-call or idle. See TelephonyManager and PhoneStateListener. On Tue, Jan 27, 2009 at 10:33 PM, manoj manojkumar.m...@gmail.com wrote: Hi friends, I have written a small player application. I want to handle incoming

[android-developers] Re: Can you play a local video not on the sdcard?

2009-01-28 Thread Marco Nelissen
of the URI. On Jan 27, 4:16 pm, Marco Nelissen marc...@android.com wrote: Playback/decoding actually happens in a different process (the media server), so that process needs to have permission to read your file. On Tue, Jan 27, 2009 at 4:01 PM, devileper devile...@gmail.com wrote: I can

[android-developers] Re: Reg playing youtube video in android

2009-01-29 Thread Marco Nelissen
On Thu, Jan 29, 2009 at 4:47 AM, Harishkumar V harishpres...@gmail.comwrote: Dave, I tried to play via mediaplayer example given in the sdk with the YouTube video url (http://in.youtube.com/watch?v=l43Bbn2Xpwk), That's not the URL of a video, it's the URL of a webpage which has a flash

[android-developers] Re: Android 1.5 Cupcake

2009-01-29 Thread Marco Nelissen
Did you try asking whoever it was that created the image that is not working? On Thu, Jan 29, 2009 at 12:23 AM, Koffi kakib...@gmail.com wrote: I got Cupcake images from http://nullwire.com/try_out_cupcake_yourself followed the instructions, it worked fined in the beginning, I realized

[android-developers] Re: Audio chat

2009-01-29 Thread Marco Nelissen
You can't do that using the SDK at the moment. You might be able to hack something together using native code, but you'd either have to use AMR or provide your own encoder, and you'd also have to write your own rtsp or http server or other communications protocol. That's probably beyond the scope

  1   2   3   4   5   6   7   >