[android-developers] Re: how to use a content provider from other applications
You don't do anything special to use it from another app, just use ContentResolver to perform a query or whatever operation you want on the appropriate URI. This will use the URI's authority to find the other app's content provider, launch it, perform the operation on it, and return the result. On Tue, Jan 20, 2009 at 11:02 PM, sunitna...@gmail.com sunitna...@gmail.com wrote: Just went through a thread http://groups.google.com/group/android-developers/browse_thread/thread/9804e683c7cebfc3/fe94e57e8f6f5847?lnk=gstq=inserting+to+database+using+SQLite#fe94e57e8f6f5847 where in some details about what a content provider does is given Could some one help with the following 1. How do i use the content provider defined to interact with an application. I mean the database defined is for use in the program only, then how can i use this content provider from another program. 2. Is there an example depicting using of content providers. How are the content providers accessed else where so tht he databases defined in it be created at run time. Need urgent help regarding how to use a content provider from other applications. Cheers, Sunit -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can not access to the system properties store?
On Tue, Jan 20, 2009 at 8:22 PM, Disconnect dc.disconn...@gmail.com wrote: ...so, um.. Any app on the mobile device can be replaced or extended -- even core components such as the dialer or home. It does say 'on the mobile device', even. (from http://code.google.com/android/) Well this is the way it is. As I said, settings at this point is much more a part of the system code than a separate component. (I think it might even be running as the system uid.) At least for now, there are just lots of things the settings app needs to do that there was no way to put together in a public API that could be maintained across releases. On top of that, there are lots of things the settings app does that I think would be better off to not make available to applications in general. And I expect that going forward the exact contents of the settings app is going to vary more and more across devices to match an increasing variation in features/capabilities, so there wouldn't really any way for a third party app to correctly replace it. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Emit a signal
Hi, I need to emit a signal clicked to a button. How can I do it ? Thx. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can not access to the system properties store?
On Tue, Jan 20, 2009 at 9:06 PM, Brian 1143 brian1...@gmail.com wrote: Do you mean the Settings application is considered to be part of the system? If so, it should be able to change the system properties, right? I am not writing my own application; just modified the original Settings application. I need a system-wide place to store the configured properties and it should be able to be accessed by programs without activity or service context (like method in the Environment class). Could you tell me how to do that? Ah sorry, I thought you were talking about writing a third party app, which is what this group is for. If you are changing the platform, you should post in one of the appropriate groups, such as android-platform. Fwiw, there are a number of system properties that are read-only. Also they are generally not intended to be the place to through a mish-mash of higher-level configuration information. For example, we have the settings provided to store a lot of that. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Emit a signal
Hey Nico, Can you clarify the question, you want an action to be performed after a button is clicked? As in with a button listener? Or is your request more complex than this? Cheers, Gav On Wed, Jan 21, 2009 at 8:31 AM, Nico nicolas.d...@gmail.com wrote: Hi, I need to emit a signal clicked to a button. How can I do it ? Thx. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to use a content provider from other applications
Can i get Any particular example depicting this procedure. On Wed, Jan 21, 2009 at 1:54 PM, Dianne Hackborn hack...@android.comwrote: You don't do anything special to use it from another app, just use ContentResolver to perform a query or whatever operation you want on the appropriate URI. This will use the URI's authority to find the other app's content provider, launch it, perform the operation on it, and return the result. On Tue, Jan 20, 2009 at 11:02 PM, sunitna...@gmail.com sunitna...@gmail.com wrote: Just went through a thread http://groups.google.com/group/android-developers/browse_thread/thread/9804e683c7cebfc3/fe94e57e8f6f5847?lnk=gstq=inserting+to+database+using+SQLite#fe94e57e8f6f5847 where in some details about what a content provider does is given Could some one help with the following 1. How do i use the content provider defined to interact with an application. I mean the database defined is for use in the program only, then how can i use this content provider from another program. 2. Is there an example depicting using of content providers. How are the content providers accessed else where so tht he databases defined in it be created at run time. Need urgent help regarding how to use a content provider from other applications. Cheers, Sunit -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Cheers, P Sunit Nair Senior Engineer Bharti Telesoft Ltd., 4, 12th KM, Bellary Road, Jakkur, Bangalore - 560064 Mobile :- +91-9886624994 When you reach for the stars, you may not quite get them, but you won't come up with a handful of mud, either. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Emit a signal
Actually, I have a onClickedListener on a button. I need to simulate a click on this button from another object. On 21 jan, 09:35, Gavin Aiken gavin.ai...@imperial.ac.uk wrote: Hey Nico, Can you clarify the question, you want an action to be performed after a button is clicked? As in with a button listener? Or is your request more complex than this? Cheers, Gav On Wed, Jan 21, 2009 at 8:31 AM, Nico nicolas.d...@gmail.com wrote: Hi, I need to emit a signal clicked to a button. How can I do it ? Thx. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Cupcake branch
Hi, I am using a windows system. Can anyone send me steps on how to checkout the cupcake branch? Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] with android's email client can we send data between two android devices
with android's email client can we send data between two android devices, What I mean can I send some data(e.g. text file, or image), to another android mobile. Or is it the case that email client is working for android phone and email account, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ALSA lib
Hi, What is the ALSA lib and what can it be used for. Where is doc for it? Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to navigate from HOME back to a paued Task?
Hi, I'm having trouble to figure out how to bring the paused Task back to foreground. As far as I understood, when I click HOME button while a task is running, the task will be paused (onPaused() of the current top-level activity will be called,right?). I think there might be a way to bring this paused task back to foreground since the task is still ALIVE, but I don't know how. Do I have to put some more codes in the activity (I mean the one that is paused)? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ListActivity help
Hi Folks, In my program, I am deriving my class from listActivity.. I am setting a BaseAdapter to the activity.. Each listitem, is having 2 TextViews and 1 Button. But i dont want my list item to get selected, Other than the button in the listItem. Please help to achieve the same. Regards, Don --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to get the list of notification
Hi In my project I need to have a list of all notification (replacing / duplicating the status bar). From what I have found so far (from the android source) the notification icon is directly pushed on the status bar by the notification manager service (status bar is part of the system). Is there any chance that my application can be notified about new notification (or can query the system for all notification) without modifying the android source code ? regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Camera Focus Facility
Could you list the proper sequence as I'm having hard time working it out! Thanks On Jan 21, 3:21 am, Dave Sparks davidspa...@android.com wrote: Sounds like you might have some sequencing issues. Did you call startPreview first? On Jan 20, 2:51 pm, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, thanks for the hint! I've tried that but I got this: java.io.IOException: autoFocus failed I registered the callback in CameraActivity.surfaceCreated() method. Could you advice on how to get that working? Thank you! On Jan 20, 5:09 pm, Dave Sparks davidspa...@android.com wrote: Camera.autoFocus(cb); where cb is a callback function you supply that tells you focus is successful or not. On Jan 20, 5:27 am, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, My app is struggling to take focused shots. Is there a built in facility that sets an auto-focus property on the camera, so it automatically takes clear and focused images. I've noticed that feature in numerous well-known apps such as ShopSavvy, CompareEverywhere, etc. Could you advise on how to achieve that? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cupcake branch
Hi, I used the steps here: http://ralf.alfray.com/.izumi/AndroidTips.blog It is a bit fiddly though and you wont be able to complile it. I'm think doing a dual boot of ubuntu is the way to go. Cheers Si On Jan 21, 8:57 am, Tez earlencefe...@gmail.com wrote: Hi, I am using a windows system. Can anyone send me steps on how to checkout the cupcake branch? Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] unknown exception for create object of FileTransferManager() of smack library
Hello I am trying to create object of FileTransferManager manager = new FileTransferManager(this.connection); it is giving error, the same error gives for , OutgoingFileTransfer otransfer = manager.createOutgoingFileTransfer(ni...@pc3/Smack); I am testing demo app for android, smack library and openfire server (FileTransfer settings are enabled in open fire). What is solution for this. But when I put try{ FileTransferManager manager = new FileTransferManager (this.connection); }catch(Exception e){} it dont happen, which exception is thrown here, as in smack doc there in no any exception for FileTransferManager object. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Make a photo with Android Emulator
I want to use the camera to make a photo snapshot with Android . At the beginning in my code : Camera mCamera = Camera.open(); PictureCallback callback = null; mCamera.takePicture(null, null, callback); but nothing doesn't happen And if I Use the program Camera of the phone Emulator says that I have to insert the SD Card. Please Help me..Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to navigate from HOME back to a paued Task?
How can I write a code for that behavior? I want to bring back the activity without clicking HOME button. On 1월21일, 오후7시56분, deepdr...@googlemail.com deepdr...@googlemail.com wrote: a long click on the home button brings a popup that lets you choose to switch to a different one of the running applications. On 21 Jan., 10:20, mongd mongdl...@gmail.com wrote: Hi, I'm having trouble to figure out how to bring the paused Task back to foreground. As far as I understood, when I click HOME button while a task is running, the task will be paused (onPaused() of the current top-level activity will be called,right?). I think there might be a way to bring this paused task back to foreground since the task is still ALIVE, but I don't know how. Do I have to put some more codes in the activity (I mean the one that is paused)? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SurfaceHolder.lockCanvas(dirtyRectangle) bug?
I see no one has answered this post, so I'll ask a different question - if I write the code to reproduce this (buggy) behavior, will any engineer at Google who's on this list take a look at it and tell me whether locking a portion of a canvas works or not, so I can at least stop trying to do this (otherwise quite important) optimization? Cheers, Stoyan On Wed, Jan 21, 2009 at 1:06 AM, Stoyan Damov stoyan.da...@gmail.com wrote: Has anyone ever tried to invalidate a portion of the screen successfully without seeing flickering? I have a portion of the screen (on a SurfaceView) which changes rarely and I don't want to draw this portion if possible because it saves ~16% of all drawing code. So I keep a flag whether I should lock the entire canvas (if this part of the screen is dirty) or a part of it (if it's not). Well, *something* surely happens, but not what I'd expect: 1. The non-dirty part of the screen starts flickering as I stop drawing it. 2. Visually (i.e. I can't prove it by taking a screenshot via Eclipse's DDMS plugin - everything looks fine), it appears that 2 frames are drawn continuously one on top of the other - the current one, and the previous. I appreciate *any* hints, even don't do it, it doesn't work, so I can concentrate on something more meaningful. Cheers, Stoyan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] onSaveInstanceState(Bundle) onRestoreInstanceState(Bundle)
Hi, This one is easy, but I seem to have a problem using this technique to save some state. Basically, the problem I'm having is that neither onRestoreInstanceState(Bundle) nor onCreate(Bundle) have the bundle I've previosly saved from onSaveInstanceState(Bundle). In fact, onRestoreInstanceState(Bundle) never gets called. Here's my implementation: @Override protected void onSaveInstanceState(Bundle savedInstanceState){ Log.i(MyActivity.class, onSaveInstanceState()); savedInstanceState.putString(MyString, This is a test message.); super.onSaveInstanceState(savedInstanceState); } Then I fire up another activity, which has a link to the original one, where I try to recover the state as follows: @Override protected void onCreate(Bundle savedInstanceState) { Log.i(MyActivity.class, onCreate()); if (savedInstanceState != null){ String myString = savedInstanceState.getString(MyString); Log.i(AddActivity.class, myString); } } @Override protected void onRestoreInstanceState(Bundle savedInstanceState){ Log.i(AddActivity.class, onRestoreInstanceState()); super.onSaveInstanceState(savedInstanceState); String myString = savedInstanceState.getString(MyString); Log.i(AddActivity.class, myString); } Like I said the onRestoreInstanceState(Bundle) method doesn't even get called. Has anyone faced the same problem? How did you resolve it? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to navigate from HOME back to a paued Task?
a long click on the home button brings a popup that lets you choose to switch to a different one of the running applications. On 21 Jan., 10:20, mongd mongdl...@gmail.com wrote: Hi, I'm having trouble to figure out how to bring the paused Task back to foreground. As far as I understood, when I click HOME button while a task is running, the task will be paused (onPaused() of the current top-level activity will be called,right?). I think there might be a way to bring this paused task back to foreground since the task is still ALIVE, but I don't know how. Do I have to put some more codes in the activity (I mean the one that is paused)? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to use a content provider from other applications
Can i get Any particular example depicting this procedure. On Jan 21, 1:24 pm, Dianne Hackborn hack...@android.com wrote: You don't do anything special to use it from another app, just use ContentResolver to perform a query or whatever operation you want on the appropriate URI. This will use the URI's authority to find the other app's content provider, launch it, perform the operation on it, and return the result. On Tue, Jan 20, 2009 at 11:02 PM, sunitna...@gmail.com sunitna...@gmail.com wrote: Just went through a thread http://groups.google.com/group/android-developers/browse_thread/threa... where in some details about what a content provider does is given Could some one help with the following 1. How do i use the content provider defined to interact with an application. I mean the database defined is for use in the program only, then how can i use this content provider from another program. 2. Is there an example depicting using of content providers. How are the content providers accessed else where so tht he databases defined in it be created at run time. Need urgent help regarding how to use a content provider from other applications. Cheers, Sunit -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ALSA lib
The ALSA lib is used on Linux operating systems to provide sound capabilities and some generic drivers (see http://www.alsa-project.org/main/index.php/Main_Page), but I don't know what role does it play in Android nor if there is an API to access it, so I would also be curious as to what is the answer to your question. Cheers, Mihai On Jan 21, 11:08 am, Tez earlencefe...@gmail.com wrote: Hi, What is the ALSA lib and what can it be used for. Where is doc for it? Cheers, Earlence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Port Forward in Cupcake
Hi, Untill now, i were forwarding my PC ports using telnet, but with Cupcake, it's possible to use directly with emulator, using -qemu - redir option. But i'm not getting success doing this. I'm doing emulator -vm myconfig -qemu -redir udp:1234::1234 or emulator -vm myconfig -qemu -redir udp:1234:my ip here:1234 and both starts the emulator with the warning qemu: could not set up redirection 'udp:1234::1234' or qemu: could not set up redirection 'udp:1234:my ip here:1234' Please, what i'm doing wrong? any successfull case? thanks a lot P.S - i already compiled SDK 1.5 and it's working perfectly Breno --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Changing package names fubars the map overlays?
Dianne Hackborn wrote: This is the cause as shown in the stack crawl: E/AndroidRuntime( 583): Caused by: java.lang.NullPointerException E/AndroidRuntime( 583): at org.apache.harmony.luni.util. FloatingPointParser.parseDouble(FloatingPointParser.java:254) E/AndroidRuntime( 583): at java.lang.Double.parseDouble(Double.java:332) E/AndroidRuntime( 583): at com.faberfedor.tagyourworld.MainMap$SitesOverlay.init(MainMap.java:275) E/AndroidRuntime( 583): at com.faberfedor.tagyourworld.MainMap.onCreate(MainMap.java:141) E/AndroidRuntime( 583): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122) E/AndroidRuntime( 583): at android.app.ActivityThread.performLaunchActivity( What's the line at MainMap.java:275? -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to play youtube videos in an Android application?
The emulator doesn't provide you with the YouTube application (I don't know about the developer phone), so the above only works on the actual device. Michael On Jan 20, 11:40 pm, RTM r.thirumurth...@gmail.com wrote: Thanks Michael for the reply. Can I also run the YouTube video with the SDK?. Regards On Jan 20, 11:06 pm, kolby kolbys...@gmail.com wrote: You can send a VIEW intent with the video uri. TheYouTubeappon the G1 should pick it up. Michael On Jan 20, 11:31 am, RTM r.thirumurth...@gmail.com wrote: Hi, Are you able to run theYouTubevideo with an Android Application?. I guess due to lack of Flash support in Android browser, we are not able to playYouTubevideos. Is there any way we can overcome this? Regards On Dec 3 2008, 9:37 pm, Dipin dipinpoovat...@gmail.com wrote: Is there any way to play ayoutubevideo in an Android application? Using MediaPlayer or VideoView can we play ayoutubevideo? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Changing package names fubars the map overlays?
Faber Fedor wrote: Assume I'm a idio^H^H^H^Hn00b and explain it to me, please. I don't see what you do. Sorry, I forgot to elaborate this point in my earlier post. In Android, in effect, a stack trace contains two separate traces, and you want the second one. The second one is flagged as Caused by: and the exception: E/AndroidRuntime( 583): Caused by: java.lang.NullPointerException followed by the stack trace corresponding to that exception: E/AndroidRuntime( 583): Caused by: java.lang.NullPointerException E/AndroidRuntime( 583): at org.apache.harmony.luni.util. FloatingPointParser.parseDouble(FloatingPointParser.java:254) E/AndroidRuntime( 583): at java.lang.Double.parseDouble(Double.java:332) E/AndroidRuntime( 583): at com.faberfedor.tagyourworld.MainMap$SitesOverlay.init(MainMap.java:275) E/AndroidRuntime( 583): at com.faberfedor.tagyourworld.MainMap.onCreate(MainMap.java:141) E/AndroidRuntime( 583): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122) E/AndroidRuntime( 583): at android.app.ActivityThread.performLaunchActivity( The upper stack trace is internal to Android itself and, at least for me, offers no meaningful information. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cupcake branch
Let's move this discussion into another list (e.g. android-platform), since this is unrelated to developing applications with the SDK. Thanks, JBQ On Wed, Jan 21, 2009 at 2:16 AM, longhairedsi longhaire...@googlemail.com wrote: Hi, I used the steps here: http://ralf.alfray.com/.izumi/AndroidTips.blog It is a bit fiddly though and you wont be able to complile it. I'm think doing a dual boot of ubuntu is the way to go. Cheers Si On Jan 21, 8:57 am, Tez earlencefe...@gmail.com wrote: Hi, I am using a windows system. Can anyone send me steps on how to checkout the cupcake branch? Cheers, Earlence -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with simpleCursorAdapter, ListView backed by a managed cursor
Nmix wrote: In a TabActivity I have a tab with a ListView. I manage the visibility of a View for when the list is empty, done after filling the list, whenever I know the backing data changes. When the list is empty (empty View is visible) and the activity is paused, and while paused the backing SQLlite table gets filled, when my activity resumes the ListView gets filled with the new database rows (managed cursor requery?) but I haven't had the chance to set the visibility of the empty View, so it's still there. I can figure out how to do this with some persistent data from pause to resume, but I'm wondering if there's a 'cleaner' and automatic way of achieving this in Android. Thanks. If the trigger for making your View be visible is the existence of data, perhaps notify-on-change support is what you want. I haven't played with this much myself. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ALSA lib
That's an underlying audio library whose presence or absence has no impact on the SDK APIs. Don't worry about it. JBQ On Wed, Jan 21, 2009 at 1:08 AM, Tez earlencefe...@gmail.com wrote: Hi, What is the ALSA lib and what can it be used for. Where is doc for it? Cheers, Earlence -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Port Forward in Cupcake
Can we take this discussion to android-framework, so that this list continues to be about developing on top of officially released SDKs? Thanks, JBQ On Wed, Jan 21, 2009 at 4:34 AM, Breno breno.min...@gmail.com wrote: Hi, Untill now, i were forwarding my PC ports using telnet, but with Cupcake, it's possible to use directly with emulator, using -qemu - redir option. But i'm not getting success doing this. I'm doing emulator -vm myconfig -qemu -redir udp:1234::1234 or emulator -vm myconfig -qemu -redir udp:1234:my ip here:1234 and both starts the emulator with the warning qemu: could not set up redirection 'udp:1234::1234' or qemu: could not set up redirection 'udp:1234:my ip here:1234' Please, what i'm doing wrong? any successfull case? thanks a lot P.S - i already compiled SDK 1.5 and it's working perfectly Breno -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Regarding using Spinner(Combo box) for displaying file names
Hi, This is Naina. I am trying to write an application where I need to list down all file names and using Spinner, i want to select the required file. Could you please let me know about this. Thanks, Naina --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] MonolithAndroid 1.0.4 beta release
MonolithAndroid is a game developed for android based devices. It uses OpenGL/ES for graphics and is a derivative of a well known 6 letter puzzle / arcade game starting with T. Need I say more? I started the project one year ago. The latest release 1.0.4 is available for download from http://code.google.com/p/monolithandroid/downloads/list You can view a demo video on YouTube from http://www.youtube.com/watch?v=neJOwlsmKmU In this video you can get an idea for the mechanics and the gameplay. It should run on T-Mobile G1, but I cannot be sure, because I do not currently own an actual hardware device. So your feedback is greatly appreciated in order to correct bugs and make the game run smoothly and provide a good player experience. The game is open sourced under the Apache 2.0 license and you can find the code on http://code.google.com/p/monolithandroid If you have any comments, remarks or bug reports you can post them either here, or on my blog. More technically minded folks can also use the issue tracker on http://code.google.com/p/monolithandroid (found on the issues tab). If you are a developer you can freely modify the code and adapt it to your needs. I would be very happy to receive your feedback Tasos Kleisas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Replace the current view by an other view
Hi, I need to replace the current View (set by the activity.setContentView method) by an other. When I call activity.setContentView two times, I get this exception : 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot $CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.checkThread(ViewRoot.java:1849) 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.requestLayout(ViewRoot.java:455) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.ViewGroup.removeAllViews(ViewGroup.java:2033) What is problem ? Thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: unknown exception for create object of FileTransferManager() of smack library
Hi, Even I am encountering the same problem. When I debug using the smack debug extension, I get a NullPointerException in the FileTransferNegotiator class in the setServiceEnabled method call. If you find a solution, please let me know!!!1 Cheers, Earlence On Jan 21, 3:35 pm, jalandar jagtap...@gmail.com wrote: Hello I am trying to create object of FileTransferManager manager = new FileTransferManager(this.connection); it is giving error, the same error gives for , OutgoingFileTransfer otransfer = manager.createOutgoingFileTransfer(ni...@pc3/Smack); I am testing demo app for android, smack library and openfire server (FileTransfer settings are enabled in open fire). What is solution for this. But when I put try{ FileTransferManager manager = new FileTransferManager (this.connection); }catch(Exception e){} it dont happen, which exception is thrown here, as in smack doc there in no any exception for FileTransferManager object. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Replace the current view by an other view
you are probably calling from a seperate thread..after thread has done its wrk...use the handler and change the view.. On Wed, Jan 21, 2009 at 7:49 PM, Nico nicolas.d...@gmail.com wrote: Hi, I need to replace the current View (set by the activity.setContentView method) by an other. When I call activity.setContentView two times, I get this exception : 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot $CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.checkThread(ViewRoot.java:1849) 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.requestLayout(ViewRoot.java:455) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.ViewGroup.removeAllViews(ViewGroup.java:2033) What is problem ? Thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Replace the current view by an other view
i have one question around the runOnUiThread...Basically when i used this method in the onCreate/onStart of the Activity,i found that it works quite differently than i expect.. For example in the onCreate/onStart..say I have long running operation before which i want to render the UI with a progress bar.and after the long runnin operation is complete remove the progress bar and show the view..In this case I found that the UI is rendered only after the long running operation...so i end up not seeing the progress bar..I ended up using the handler...Am i going wrong in my understanding of this method? protected void onStart(){ super.onStart(); Progress Bar Visible runOnUiThread( new Thread() { // go get our feed! public void run() { //longrunning operation //Progress Bar Gone //show the required view } }); } On Wed, Jan 21, 2009 at 7:55 PM, Mark Murphy mmur...@commonsware.comwrote: Nico wrote: Hi, I need to replace the current View (set by the activity.setContentView method) by an other. When I call activity.setContentView two times, I get this exception : 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot $CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.checkThread(ViewRoot.java:1849) 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.requestLayout(ViewRoot.java:455) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.ViewGroup.removeAllViews(ViewGroup.java:2033) What is problem ? As the exception says: Only the original thread that created a view hierarchy can touch its views. Are you attempting to call setContentView() from a background thread? If so, arrange to call it on the UI thread, via post(), runOnUiThread(), or a Handler. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Replace the current view by an other view
I did it : // Create a thread to change the view final Grid f_grid = grid; Runnable mainThreadRunnable = new Runnable() { public void run() { m_activity.setContentView(f_grid); } }; // Run the thread m_activity.runOnUiThread(mainThreadRunnable); It works great, is it a correct way ? On 21 jan, 15:23, for android forandr...@gmail.com wrote: you are probably calling from a seperate thread..after thread has done its wrk...use the handler and change the view.. On Wed, Jan 21, 2009 at 7:49 PM, Nico nicolas.d...@gmail.com wrote: Hi, I need to replace the current View (set by the activity.setContentView method) by an other. When I call activity.setContentView two times, I get this exception : 01-21 14:13:54.747: WARN/System.err(1156): android.view.ViewRoot $CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.checkThread(ViewRoot.java:1849) 01-21 14:13:54.757: WARN/System.err(1156): at android.view.ViewRoot.requestLayout(ViewRoot.java:455) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.767: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.View.requestLayout(View.java:6575) 01-21 14:13:54.777: WARN/System.err(1156): at android.view.ViewGroup.removeAllViews(ViewGroup.java:2033) What is problem ? Thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Please help
I am using AlaramManager to invoke my application after particular time intarval. For that i need to create the object of PendingIntent. I want to ask some question for that. 1) I want that after particular time interval the same class start in execution so can i put current class name to Intent's setClass() paramiter ? 2)getActivity(Context context, int requestCode, Intent intent, int flags) -Can any one tell me how we can pass context or its value ? I do not know any thing about context. ? - What is the purpose of requestCOde and flags ? To use AlramRegister will i have to do any change in manifiest file ? Sorry if i am asking basic question but i am just newbie so please do not mind. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Replace the current view by an other view
Thx a lot for help. On 21 jan, 16:02, Mark Murphy mmur...@commonsware.com wrote: Nico wrote: I did it : // Create a thread to change the view final Grid f_grid = grid; Runnable mainThreadRunnable = new Runnable() { public void run() { m_activity.setContentView(f_grid); } }; // Run the thread m_activity.runOnUiThread(mainThreadRunnable); That should work fine, AFAIK. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training in Sweden --http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Manage the home screen
I am looking for pointers on Androids capability to manage its home screen. for example I need to put my own application links programatically in a particular design/UI and manage it . Something similar to the Nokia E71 home screen interface capabilities Would appreciate any help on this. Thanks - jaz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] size of Bitmap
HI I would like to set the size of a Bitmap, there are no setWidth() or setHeight() so I don't know how to do this Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to navigate from HOME back to a paued Task?
I'm not sure I completely understand what you're trying to do. If the user pauses an activity by pressing the home button, you shouldn't bring the application to the foreground again. The user can just press the application icon in the launcher and the app will be brought to the foreground again (going through the usual lifecycle callbacks so you get a chance to restore state, depending on how your app is configured). If you have an application that does something in the background, reacts to an event, and then wants to be in the foreground again, you should consider splitting your application into two parts, the background task as a service, and the UI as an application. Based on an event in the service launch the UI app as an intent. Michael On Jan 21, 6:30 am, mongd mongdl...@gmail.com wrote: How can I write a code for that behavior? I want to bring back the activity without clicking HOME button. On 1월21일, 오후7시56분, deepdr...@googlemail.com deepdr...@googlemail.com wrote: a long click on the home button brings a popup that lets you choose to switch to a different one of the running applications. On 21 Jan., 10:20, mongd mongdl...@gmail.com wrote: Hi, I'm having trouble to figure out how to bring the paused Task back to foreground. As far as I understood, when I click HOME button while a task is running, the task will be paused (onPaused() of the current top-level activity will be called,right?). I think there might be a way to bring this paused task back to foreground since the task is still ALIVE, but I don't know how. Do I have to put some more codes in the activity (I mean the one that is paused)? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Manage the home screen
You need the permission com.android.launcher.permission.INSTALL_SHORTCUT then follows what Browser does here: http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a=blob;f=src/com/android/browser/BrowserBookmarksPage.java;h=5c509a8a15d367529f108c907d2dea39b4e6d57e;hb=master (see the createShortcutIntent() method and how INSTALL_SHORTCUT is used.) On Wed, Jan 21, 2009 at 7:41 AM, Jaz jazmeetwad...@gmail.com wrote: I am looking for pointers on Androids capability to manage its home screen. for example I need to put my own application links programatically in a particular design/UI and manage it . Something similar to the Nokia E71 home screen interface capabilities Would appreciate any help on this. Thanks - jaz -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Share data between tabbed intents
I need to share an id key (int) between three ListActivities hosted in a TabActivity. I have a TabActivity with three tabs that each start ListActivities via intents like this: ... tabHost.addTab(tabHost.newTabSpec(tab1) .setIndicator(Recipes) .setContent(new Intent(this, RecipeList.class))); tabHost.addTab(tabHost.newTabSpec(tab2) .setIndicator(Ingredients) .setContent(new Intent(this, IngredientList.class))); tabHost.addTab(tabHost.newTabSpec(tab3) .setIndicator(Method) .setContent(new Intent(this, MethodList.class))); ... These three activities use a content provider with three normalised tables: RecipeList uses the Recipes table: | _ID | RecipeName | IngredientList uses the Ingredients table: | _ID | RecipeID | IngredientText | MethodList uses the Methods table: | _ID | RecipeID | MethodText | The RecipeID column in the Ingredients and Methods tables refers to the _ID column of the Recipes Table, thus linking ingredients and methods to the relevant recipe. So what I plan to do is when a row is selected in the RecipeList tab, store the _ID somewhere accesible by IngredientList and MethodList activities. Then when IngredientList or MethodList tabs are selected a cursor query is made using the stored id in a where statement, thus only displaying ingredients/methods that have a RecipeID value matching the _ID of the selected recipe on RecipeList. The only real solution I have come up with so far is using a static int in the tabhost activity that the other activities can all read, but this seems very messy and would require that only one instance of any of the activities is created. I'm sure there must be a neat way to do this with intents or something, does anyone have any advice or examples? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Development Phone Setup - Vodafone India
You can skip the initial setup by connecting the phone to PC via USB and then type : # adb shell echo app.setupwizard.disable=1 /data/local.prop # adb shell reboot Register later when you are connect to a WiFi network. Cheers! V On Wed, Jan 21, 2009 at 7:20 AM, marj...@gmail.com marj...@gmail.comwrote: Hello All, I am trying to setup the phone using vodafone connection but its unable to sign up google services. It says there is a problem in connecting to the Google services. Please help me in setting up the android development phone. Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] PM Issues
Hi All, I am working on android kernel on OMAP 2430 board. After initial display ,successfully transits from sleep to active mode first time. But second time fails. Transition from sleep to normal mode was done by pressing the key on the hardware keypad.LCD switches off and console hangs. Here is the trace from my console: android sleep state 0-2 at 118050479923 android_power_suspend: enter suspend PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.03 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done. Suspending console(s) Restarting tasks ... android_power_wakeup 2-0 at 118294365922 done. android_power_suspend: exit suspend, ret = 0 android_power_suspend: done Please give any input on this issue. Thanks and Regards Mallesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Exception: WakeLock finalized while still held
Hi all, I'm seeing the following error intermittently when testing my app: 01-20 23:56:52.794: DEBUG/dalvikvm(25525): GC freed 1616 objects / 94232 bytes in 87ms 01-20 23:56:52.874: ERROR/AndroidRuntime(25525): java.lang.Exception: WakeLock finalized while still held: App Name 01-20 23:56:52.874: ERROR/AndroidRuntime(25525): at android.os.PowerManager$WakeLock.finalize(PowerManager.java:295) 01-20 23:56:52.874: ERROR/AndroidRuntime(25525): at dalvik.system.NativeStart.run(Native Method) It looks like GC is cleaning my context while it is holding the WakeLock, I'm using a static class to manage the wakelocks, how can I ensure the context that holds the wakelock does not get GC'd? Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to check a activity have exit?
Hi, Does anyone know how to check if a activity have exit, I know the activity's package name, I use the 'ps' to check the process list. but android did not free the process after activity quit. Pan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] An activity, a service and receivers - an architectural question
Hello, I'm not sure if I correctly understand the application life cycle and would like to consult the architecture of my application with the group. My application is intended to perform some time consuming (about 30 seconds) operation from time to time. The operation can be either invoked by the end-user (from app UI) or by some system event (through receiver). The operation should be performed in background but its current status should be visible on the application window. One operation can be performed at one time. They should not overlap. If new events which invoke the operation occur when the operation is already running, the new operation should start after the running one ends. My current package consists of following elements: The Service - the whole operation is performed in onStart() 2 receivers which just launch the service by calling startService() The Activity which is about to display a status and from which the end- user can start the service (via startService()) My questions are following: Should the service run in separate process (via remote attribute)? Will it be able to still share the preferences? Or maybe the service can run in the same process? But will UI work during the operation? The operation does not need any parameters. Do I need to define IDL's etc? Or calling startService() is enough? What if startService() is called but the service is busy in onStart()? Will the request be queued? Or should I run the operation in the separate thread and create my own queue? How to share the operation status (text only) between the service and the UI? Is SharedPreferences suitable for this purpose? Thanks Kuba --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Export to SIM feature
Ok I wrote an application based off the SIM import tool located on the latest source for Android, its crude but it should work, i need help polishing it off and I would hope that it would make it into the main tree in time for release. THIS IS CODE EMBEDDED IN THE SOURCE NOT THE SDK. I was wondering if there was a way to attach the files needed on here so others can take a look and touch up/finish up the code? The part I am having most trouble at is the actual writing to SIM portion as the emulator doesn't have a fake SIM I can't actually see if the code works, but I think it does, although it is lacking so data check features (ie. check to see if the entry already exists on the SIM card and copy or don't copy). The export all feature seems to work fine with no force close, the import one seems to force close for some reason... Either way if someone is willing to help finish this thing off id be happy to provide the code, and id love to see this in the next build. Thanks, Greg. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Andreas Constantinou on Mobile OS's and App Stores
OK I'm tipping my hand as a newbie here, but when I read this transcript I thought it implied that vendors aren't making geolocation features available to developers. Am I reading this right? Is this true for Android? What about the iPhone? It seems really hard to believe...but I just started exploring Android and know even less about what Apple is doing, so ? On Jan 19, 6:38 pm, Lee S Dryburgh drybur...@gmail.com wrote: Material just published of interest to Android Developers: http://ecommconf.com/blog/2009/01/mobile-operating-systems.html Android got a bit more of a knocking than what I'd expect. Regards Lee PS Don't forget the early bird for the conf. closes TODAYhttp://eCommConf.com -- Gmail: lee.dryburgh Twitter: leedryburgh Skype: leedryburgh LinkedIn:www.linkedin.com/in/leedryburgh Facebook:www.facebook.com/profile.php?id=531428361 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone willing to share...
Great, exactly what I was looking for! However, at first blush, I see a potential race condition if the thread finishes and sends its message after onDestroy() but before onCreate() -- then the managed dialog will never be dismissed. Am I wrong? Spiros On Dec 16 2008, 12:21 pm, Dianne Hackborn hack...@android.com wrote: You can't call .dismiss() after onDestroy() of an activity. In the case of an orientation switch, the previous activity will be destroyed and a new instance created; after the previous instance is destroyed, its window and all windows it created are removed from the window manager, and the next instance will need to take care of re-adding them. If you are using managed dialogs, most of the work to deal with this should be done for you, you just need to make sure that you don't do anything with an old dialog after the onDestroy() call. The easiest way to do this is probably to have the main thread handle all of the dialogs, create a Handler on that thread that is NOT an inner class of the Activity, but just has a pointer to the current Activity, and clear that pointer in onDestroy() and set in in onCreate(). Now when another thread wants to dismiss the dialog, it can send a message requesting this from the handler, and the handler simply grabs the Activity pointer and if non-null, gets the Dialog pointer from it and dismisses it if there is one. On Mon, Dec 15, 2008 at 8:44 AM, Al Sutton a...@funkyandroid.com wrote: A code snippet which prevents an java.lang.IllegalArgumentException: View not attached to window manager being thrown when .dismiss() is called on a progress dialogue box which is on screen when the device changes orientation. Thanks, Al. -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Help with AnimationDrawable
I've tried everything I can think of and can't get this AnimationDrawable (from code, not XML) to work. Please let me know what I doing wrong. First, we have the regular simple app: public class Example extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new ExampleView(this)); } } And the view class this uses: class ExampleView extends View { private Bitmap image1; private Bitmap image2; private BitmapDrawable frame1; private BitmapDrawable frame2; private AnimationDrawable anim; public ExampleView(Context context) { super(context); Resources res = context.getResources(); anim = new AnimationDrawable(); image1 = BitmapFactory.decodeResource(res, R.drawable.image1); image2 = BitmapFactory.decodeResource(res, R.drawable.image2); frame1 = new BitmapDrawable(image1); frame2 = new BitmapDrawable(image2); anim.addFrame(frame1, 50); anim.addFrame(frame2, 50); anim.setOneShot(Boolean.FALSE); // make it loop } @Override protected void onDraw(Canvas canvas) { // draw a bunch of other stuff anim.setBounds(0, 0, 50, 50); anim.draw(canvas); } // fix for bug where .start() doesn't work within context of activity starting @Override public void onWindowFocusChanged(boolean has_focus) { if (has_focus) { anim.start(); } else { anim.stop(); } } } I have verified that the animation is indeed running, that it is looping, and that there are multiple frames, but for some reason I can still only see the first frame (i.e. it never actually animates). I've tried attaching the AnimationDrawable to an ImageView as the background drawable and drawing the ImageView to the canvas, but that didn't seem to help at all. I've also messed around with where .start () is called a lot to no avail. Any insight into why I am only seeing the first frame and can't get this to animate would be greatly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] RunningTaskInfo.thumbnail is always null and onCreateThumbnail never called
I'd like to get some thumbnail images of the running applications. The combination of RunningTaskInfo.thumbnail and Activity.onCreateThumbnail seems like just the thing but I don't see it working. I've overridden onCreateThumbnail in my main Activity. According to the documentation, this method is called by the framework when the activity is paused. I've set a breakpoint in the method and it never seems to be hit. The base implementation of onCreateThumbnail would work just fine if it would fire. @Override public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) { return super.onCreateThumbnail(outBitmap, canvas); } Also, I've written some simple code to getRunningTasks from the ActivityManager. The RunningTaskInfo.thumbnail property is always null. Is there something I need to set within an application so that it will generate it's thumbnail before onPause? Is something needed in the manifest. The documentation on this feature is sparse. Here's some [simplified] code I use in an extension of BaseAdapter to fetch the running tasks: ActivityManager manager = (ActivityManager)context.getSystemService (Context.ACTIVITY_SERVICE); ListRunningTaskInfo tasks = manager.getRunningTasks(10); RunningTaskInfo info = tasks.get(arg0); LayoutInflater inflater = (LayoutInflater)context.getSystemService (Context.LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(R.layout.taskitem, null); ImageView image = (ImageView)view.findViewById(R.id.image); TextView label = (TextView)view.findViewById(R.id.label); label.setText(info.baseActivity.getPackageName()); Bitmap bmp = info.thumbnail; image.setImageBitmap(bmp); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] access rows in ListActivity
Hello guys! I really need your help here.. I want to include one button inside each row in a ListActivity. When pressing one of these buttons it will be disabled and will perform a heavy task in the background (in a different thread to avoid screen blocking). After the action is completed the button will be enabled again and the row updated with some results obtained from that heavy operation. Im filling my List with a custom SimpleCursorAdapter, its getView method calls super.getView and in the view (row) returned I access its button through findViewById and set my clicklistener (to disable it, and launch the heavy task in the background). Once this heavy task is finished I need a reference to this row view to find the button and re- enable it. SimpleCursorAdapter´s super.getView() reuses row views shown on screen to avoid creating many different rows instances, so when my heavy task is finished the row view reference i need to reenable its button may have been reused in a different row, so in the end I am modifying a button in a different row! I have tried different solutions, for example giving different ID to each row view (useless because it gets overwritten when the row view is reused...) Obviously creating a different row instance for each row whether its shown on screen or not isnt the best solution. I really have no clue on how to solve this .. thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to create .apk file from the resurces that are given fro Android market
Can I see source code from .apk? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: G1 activation problem
Hi Guys, Got my G1 unlocked developer phone. Here is what I did to get it to work with ATT network 1. Deleted all the existing APNs 2. Added a new APN: wap.cingular ( just one entry ) Give it a try and it should work. Good luck ! On Jan 12, 11:24 am, subclubharri subclubha...@googlemail.com wrote: Hey, that link isn't working for me?! I have an o2 paygo sim. Should these settings still work? Please could you try posting the link again, thanks! On Jan 8, 4:10 am, Joel Knighton joel.knigh...@gmail.com wrote: @subclubharri:http://mail.google.com/mail/?shva=1#search/at%26t/11e218cf339f5196 The settings that Jackson Miller posted there worked for me with an ATT sim card with unlimited PDA data plan. Have you tried them exactly as they are there? On Wed, Jan 7, 2009 at 12:58 PM, subclubharri subclubha...@googlemail.comwrote: Hey, I have aG1phone unlocked and I have this problem There is a problem communicating with the Google servers... etc. I did as said above and deleted all APN's then added 'wap.cingular'. This still will not work for me, I would be very grateful for any solutions or suggestions as I now have a brand new phone which will not function! Thanks, please get back to me a.s.a.p On 25 Nov 2008, 01:58, Mark K mark.ka...@gmail.com wrote: I was able to get an unlockedG1phone ontoATTwithout an ATT data plan. I had to add 'wap.cingular' as an apn, only had to provide 'wap.cingular' no other fields. I was then able to log on with my google account and boot the phone, which currently uses only wifi for data . I guess the crux is you need to access an apn to do the initial google account login, then once the phone is set up, you can use only wifi. M On Nov 24, 4:26 pm, Alex B alexba...@gmail.com wrote: Has anyone been able to surf the web from theirG1*strictly* via Wi- Fi? ... how about, the wifi network created by their Mac laptop's Airport Internet Sharing? Has anyone in Canada been able to successfully connect via Fido (or any other carrier)? I am a developer in Canada -- and we don't have T-Mobile here -- so I purchased an unlockedG1on eBay (CAN$820 or US$665 for the device, unlocking, shipping, and taxes). The phone arrived and worked as expected according to a few minutes of superficial use without networking being involved. The phone was unlocked by the eBay seller, and the notification bar had a message saying that there was a problem syncing (to the eBay seller's gmail account). Naturally there was a problem syncing, because no networking was turned on. I decided to try to figure out how to input my own Google account username and password, and get theG1synced accordingly. However, there was no apparent way to do this. My next thought was to at least try to establishing network connectivity, after all, theG1is has wifi support (i.e. I should not need a carrier's data plan -- just a wifi connection). My plan was to connect to my own wifi network (using Mac OS X's Airport Internet Sharing). This is where the problems started. First of all, the name of my network (in the list of wifi networks) was appearing and disappearing, yet I was right in front of the laptop serving wifi. Moving away, to other parts of the apartment, did not alter this flaky behaviour. Just from that experience, I was starting to feel uneasy, as I've never had a problem with other devices sharing my wifi signal. The connection would get established periodically, with a private IP address obtained! I then clicked home, opened the browser, and couldn't load the google home page. Two hours of efforts were futile -- theG1simply would not load google.com (or any website for that matter). Note that my other laptop had no problem connecting to the same wifi network. At last I was frustrated enough that I thought that perhaps there was some setting that I was not aware of that was causing this issue. So I found the reset option somewhere in theG1'ssettings. A dialog warned that all the data would be erased, but I didn't mind because I hadn't loaded any data. Following a power cycle, the device showed an animation of a box and aG1being removed from within (presumably to indicate that this is an out of the box state). I only ever got to see this out-of-the-box animation that one time. From that point on, I have been stuck in the following activation loop: (1) A screen with the Android logo, Welcome to T-MobileG1 and Touch the android to begin. Touching the android shows a screen titled Setting up your T-MobileG1, and then the on-screen buttons are Emergency dial and Next. The physical menu button brings up one item: APN settings. (2) Touching Next brings up a screen with two buttons
[android-developers] Re: access rows in ListActivity
FENIX wrote: Hello guys! I really need your help here.. I want to include one button inside each row in a ListActivity. When pressing one of these buttons it will be disabled and will perform a heavy task in the background (in a different thread to avoid screen blocking). After the action is completed the button will be enabled again and the row updated with some results obtained from that heavy operation. Im filling my List with a custom SimpleCursorAdapter, its getView method calls super.getView and in the view (row) returned I access its button through findViewById and set my clicklistener (to disable it, and launch the heavy task in the background). Once this heavy task is finished I need a reference to this row view to find the button and re- enable it. Since you already know the Button at the time you start the heavy task, pass the Button along to the task, or otherwise arrange to know it at the time you want to disable the button. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: access rows in ListActivity
Do it in the bindView method and redraw the list view when the heavy task is done. To make sure you're disabling and enabling the correct row, just make sure the data that is bound through the adapter has a unique id associated with it (or some other way of identifying any particular row uniquely) so you can check for that id when the view is bound. On Wed, Jan 21, 2009 at 3:36 AM, FENIX jesus...@gmail.com wrote: Hello guys! I really need your help here.. I want to include one button inside each row in a ListActivity. When pressing one of these buttons it will be disabled and will perform a heavy task in the background (in a different thread to avoid screen blocking). After the action is completed the button will be enabled again and the row updated with some results obtained from that heavy operation. Im filling my List with a custom SimpleCursorAdapter, its getView method calls super.getView and in the view (row) returned I access its button through findViewById and set my clicklistener (to disable it, and launch the heavy task in the background). Once this heavy task is finished I need a reference to this row view to find the button and re- enable it. SimpleCursorAdapter´s super.getView() reuses row views shown on screen to avoid creating many different rows instances, so when my heavy task is finished the row view reference i need to reenable its button may have been reused in a different row, so in the end I am modifying a button in a different row! I have tried different solutions, for example giving different ID to each row view (useless because it gets overwritten when the row view is reused...) Obviously creating a different row instance for each row whether its shown on screen or not isnt the best solution. I really have no clue on how to solve this .. thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: An activity, a service and receivers - an architectural question
Kuba Lipiński wrote: Hello, I'm not sure if I correctly understand the application life cycle and would like to consult the architecture of my application with the group. My application is intended to perform some time consuming (about 30 seconds) operation from time to time. The operation can be either invoked by the end-user (from app UI) or by some system event (through receiver). The operation should be performed in background but its current status should be visible on the application window. One operation can be performed at one time. They should not overlap. If new events which invoke the operation occur when the operation is already running, the new operation should start after the running one ends. My current package consists of following elements: The Service - the whole operation is performed in onStart() 2 receivers which just launch the service by calling startService() The Activity which is about to display a status and from which the end- user can start the service (via startService()) My questions are following: Should the service run in separate process (via remote attribute)? No. Will it be able to still share the preferences? Yes. Or maybe the service can run in the same process? But will UI work during the operation? So long as your background operation is working on its own thread, then yes. The operation does not need any parameters. Do I need to define IDL's etc? Or calling startService() is enough? If you are going to request the background task several times from the activity, I would not use startService() several times. Either use AIDL or some other in-process communications (e.g., shared LinkedBlockingQueue that the Activity posts requests on and the background thread pulls requests off of). Will the request be queued? Or should I run the operation in the separate thread and create my own queue? I usually create my own queues. How to share the operation status (text only) between the service and the UI? Is SharedPreferences suitable for this purpose? Since the operation status is not persistent between runs of your application, I would not use SharedPreferences. Use some other in-process indicator (e.g., a static AtomicConcurrentBoolean in the event object pushed onto the queue by the activity). -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Radio button items's text not visible in Dialog
There was a similar post to this but used an activity and I am using a dialog. This is real simple code and it works int he APIDemo (which is where I pulled the code from to begin with). The dialog display just fine with the correct number of radio buttons, but the text for the buttons does not display UNLESS I press/select an item. Then once I let up on the selection it disapperas again... what in the world am I not getting??? return new AlertDialog.Builder(this) .setTitle(R.string.choose_location_in_list) .setSingleChoiceItems(R.array.select_add_location, 1, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .setPositiveButton(R.string.add_to_favs, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .create(); my array looks like this, ?xml version=1.0 encoding=utf-8? resources string-array name=select_add_location itemAdd to Top/item itemAdd to Bottom/item itemAdd and Define/item /string-array /resources --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] detect calling status in a test application
Hi, I am trying to create two applications (calling and receiving) to do stress test of calling between two phones. The idea is to let calling app to make lots of calls on one phone and let receiving app to receive and answer those calls. We have the following questions - 1) How does the receiving app answer the incoming call? 2) How does the calling app know when the other side rings and answers the call? 3) How does the calling app end the call? Thanks, Jin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: PM Issues
Wrong list. Please see android-porting, which covers topics such as this. http://source.android.com/discuss for more information. On Wed, Jan 21, 2009 at 12:45 AM, Mallesh annya20i...@gmail.com wrote: Hi All, I am working on android kernel on OMAP 2430 board. After initial display ,successfully transits from sleep to active mode first time. But second time fails. Transition from sleep to normal mode was done by pressing the key on the hardware keypad.LCD switches off and console hangs. Here is the trace from my console: android sleep state 0-2 at 118050479923 android_power_suspend: enter suspend PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.03 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done. Suspending console(s) Restarting tasks ... android_power_wakeup 2-0 at 118294365922 done. android_power_suspend: exit suspend, ret = 0 android_power_suspend: done Please give any input on this issue. Thanks and Regards Mallesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to re-install sign android built-in applications
Wrong list. Please see android-platform, which covers topics such as this. http://source.android.com/discuss for more information. On Tue, Jan 20, 2009 at 12:24 AM, Gerald myq...@gmail.com wrote: Hi, I want to customize some built-in applications on android, for example Launcher or Contacts, etc. I've downloaded the source code and compile it by eclipse successfully. But when I tried to run it, a signing error comes: [2009-01-20 16:17:27 - Launcher] Installing Launcher.apk... [2009-01-20 16:17:35 - Launcher] Application already exists. Attempting to re-install instead... [2009-01-20 16:17:43 - Launcher] Re-installation failed due to different application signatures. [2009-01-20 16:17:43 - Launcher] You must perform a full uninstall of the application. WARNING: This will remove the application data! [2009-01-20 16:17:43 - Launcher] Please execute 'adb uninstall com.android.launcher' in a shell. I followed above instruction: adb uninstall com.android.launcher, but it failed (Can't remove the application). The official document only provides How to sign a new application, but it's not usable in my case. Does anyone know how to do it? Thank you very much Gerald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Not able to add account on email client of emulator(sdk r2)
Jalandar- If you're having trouble operating one of the built-in applications, I think android-discuss would probably be a better board for asking about discussing it. See http://source.android.com/discuss for more information. Good luck, Andy On Tue, Jan 20, 2009 at 4:16 AM, jalandar jagtap...@gmail.com wrote: Hello everybody, I am trying to add account(gmail) on EMail client of emulator(sdk r2), It is not getting connected I activated pop3 and Imap setting options from my gmail account. and did the following settings in emulator Incoming settings IMAP server: imap.gmail.com Port: 993 Security type: SSL (always) the out going setting window screen is not coming . I tried for pop3 also POP sever : pop.gmail.com port: 995 Security type: SSL (always) Whats the matter here, will anybody guide me. Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to pause n resume the activity???
Wesley- There are lots of ways to pause and resume activities. Why don't you repost with a more comprehensive description of what you're trying to do (what user experience you are trying to create), and we can go from there. --Andy On Mon, Jan 19, 2009 at 11:46 PM, Wesley Sagittarius sit06...@gmail.com wrote: hi all, anyone know how to pause and resume the activity??? wesley. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: size of Bitmap
The config (size, format, etc.) of a bitmap is immutable. It can only be specified when the bitmap is first created. On Wed, Jan 21, 2009 at 11:05 AM, elo esyo...@gmail.com wrote: HI I would like to set the size of a Bitmap, there are no setWidth() or setHeight() so I don't know how to do this Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android.hardware.Camera - JPEG image of correct size but always black
Please also try to address my last question Can this be done from within a service (no activity)?. Since a service does not have a UI I don't see how I can start a preview from there. I want to take the picture from the service running in the background. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to re-install sign android built-in applications
..android-platform covers building apps with the sdk? Thats new. I think he's looking for info on changing package names so that he can replace the default apps. (I don't have that info handy, sorry..) On Wed, Jan 21, 2009 at 12:14 PM, Andrew Stadler stad...@gmail.com wrote: Wrong list. Please see android-platform, which covers topics such as this. http://source.android.com/discuss for more information. On Tue, Jan 20, 2009 at 12:24 AM, Gerald myq...@gmail.com wrote: Hi, I want to customize some built-in applications on android, for example Launcher or Contacts, etc. I've downloaded the source code and compile it by eclipse successfully. But when I tried to run it, a signing error comes: [2009-01-20 16:17:27 - Launcher] Installing Launcher.apk... [2009-01-20 16:17:35 - Launcher] Application already exists. Attempting to re-install instead... [2009-01-20 16:17:43 - Launcher] Re-installation failed due to different application signatures. [2009-01-20 16:17:43 - Launcher] You must perform a full uninstall of the application. WARNING: This will remove the application data! [2009-01-20 16:17:43 - Launcher] Please execute 'adb uninstall com.android.launcher' in a shell. I followed above instruction: adb uninstall com.android.launcher, but it failed (Can't remove the application). The official document only provides How to sign a new application, but it's not usable in my case. Does anyone know how to do it? Thank you very much Gerald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with simpleCursorAdapter, ListView backed by a managed cursor
On Jan 21, 7:45 am, Mark Murphy mmur...@commonsware.com wrote: Nmix wrote: In a TabActivity I have a tab with a ListView. I manage the visibility of a View for when the list is empty, done after filling the list, whenever I know the backing data changes. When the list is empty (empty View is visible) and the activity is paused, and while paused the backing SQLlite table gets filled, when my activity resumes the ListView gets filled with the new database rows (managed cursor requery?) but I haven't had the chance to set the visibility of the empty View, so it's still there. I can figure out how to do this with some persistent data from pause to resume, but I'm wondering if there's a 'cleaner' and automatic way of achieving this in Android. Thanks. If the trigger for making your View be visible is the existence of data, perhaps notify-on-change support is what you want. I haven't played with this much myself. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training in Sweden --http://www.sotrium.com/training.php I kept it simple for now and refilled the ListView at onResume, so I avoid having to expose the cursor or other data more globally than I already do. It's somewhat redundant but it works since the visibility logic is inside the method that does the filling. An example that's very similar is Android's Call Log. If it's empty and you make a call, then go back to the log and switch tabs from the dialer to the log, it displays as expected (suppressing the 'empty' View). Maybe they refill whenever the tab is selected. I avoid this since it would be redundant if the data is the same. The difference between my app and the Call Log is that no change of tab is involved. Your suggestion may be better but in the interest of time I will move on with what works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AlertDialog lose on change rotation
Yes now work. I am calling the Dialog using Show Method, instead is necessary call create() method into OnCreateDialog override method. On 18 Gen, 19:02, Romain Guy romain...@google.com wrote: Hi, Please look at showDialog(int), dismissDialog(int), removeDialog(int), onPrepareDialog() and onCreateDialog() in the Activity class. On Sun, Jan 18, 2009 at 7:13 AM, fala70 fal...@gmail.com wrote: I've an application with a MapActivity used how main activity. I inserted an AlertDialog to show and edit a few infos. When I change from portrait to landscape for open the keyboard, my AlertDialog is detroied without replaced, then I must recall the command menu for show again my AlertDialog. Any suggest to mantain open the AlertDialog from portrait to landscape and viceversa ? thanks -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Manage the home screen
Thanks Romain - Is there any capability by which I could arrange these in custom layouts over the default home screen ? Thanks jaz On Jan 21, 11:19 am, Romain Guy romain...@google.com wrote: You need the permission com.android.launcher.permission.INSTALL_SHORTCUT then follows what Browser does here:http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a... (see the createShortcutIntent() method and how INSTALL_SHORTCUT is used.) On Wed, Jan 21, 2009 at 7:41 AM, Jaz jazmeetwad...@gmail.com wrote: I am looking for pointers on Androids capability to manage its home screen. for example I need to put my own application links programatically in a particular design/UI and manage it . Something similar to the Nokia E71 home screen interface capabilities Would appreciate any help on this. Thanks - jaz -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Manage the home screen
No :) On Wed, Jan 21, 2009 at 10:56 AM, Jaz jazmeetwad...@gmail.com wrote: Thanks Romain - Is there any capability by which I could arrange these in custom layouts over the default home screen ? Thanks jaz On Jan 21, 11:19 am, Romain Guy romain...@google.com wrote: You need the permission com.android.launcher.permission.INSTALL_SHORTCUT then follows what Browser does here:http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a... (see the createShortcutIntent() method and how INSTALL_SHORTCUT is used.) On Wed, Jan 21, 2009 at 7:41 AM, Jaz jazmeetwad...@gmail.com wrote: I am looking for pointers on Androids capability to manage its home screen. for example I need to put my own application links programatically in a particular design/UI and manage it . Something similar to the Nokia E71 home screen interface capabilities Would appreciate any help on this. Thanks - jaz -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Emulator crashs when accessing sd card settings
What OS/Java are you running? I am running OSX 10.5.6 and Java: java version 1.6.0_07 Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) On Tue, Jan 20, 2009 at 10:54 PM, fnirt robert.cr...@gmail.com wrote: I am having this issue, as well. Nice fresh install following all of the instructions online, nothing strange about my system. I thought it was something I did, but I get the exact same issue. I even went so far as to download an sd img someone else had built, in case I was doing that wrong. It's so easy I'm not sure how I could, but still. Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] memory profiling needed
Are there any tools out there yet to help us profile memory usage? Has anyone come up with a program to convert the Android memory dumps to standard hprof format? Would someone from Google let us know if and when we can expect help from you on this? -- Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to retrive device log
thank you. On Dec 21 2008, 5:50 pm, Bill Napier nap...@google.com wrote: http://code.google.com/android/reference/adb.html#forwardports You can use adb to do some amount of port forwarding, but I'm not sure if it works in the direction you're looking for. You can also use 'adb logcat' to retrieve the system log on the phone. And if you keep it running you can get your logging messages there. b On Sun, Dec 21, 2008 at 2:39 PM, Mark Nuetzmann mark.nuetzm...@gmail.com wrote: bump On Dec 19, 9:12 am, Mark mark.nuetzm...@gmail.com wrote: I am also interested in this. I would like to know if there is a way to have my application send UPD messages to my laptop/desktop when connected through the USB cable. I have done this with great success in my Windows Mobile applications. I have a UDP server running on my laptop that receives the messages and writes the data out to a file. I then have a log file previewer application that has filtering and display logic that allows me to view, filter, copy messages (works great for debugging my apps). thanks, Mark On Dec 19, 8:28 am, Raj raj123man...@gmail.com wrote: Hello All, I am developint a small application in which I have to show the device log into the screen. If any one has the solution or any helpful link then please reply.. Your Friend Raj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to re-install sign android built-in applications
Yes in this case probably what is desired is changing the package name, though that wasn't explicitly requested. But in Android that is how you install an alternative version of an app -- by installing a -different- app with the same public capabilities (handling the same intents etc) as the built-in app. Then the user is free to decide when and where they want to use that new app, if at all. For the desire to just install a custom version of a built-in app that has the same name, and is thus treated as a new version, of the built-in app, the basic answer is: - In the current platform, it is not possible to install an UPDATE (key word) to a built-in application in to the data partition; updates can only be done by replacing the app in /system. - In Cupcake we will have this facility, HOWEVER: 1. You still must be able to sign the app with the same certificate as the version in the system partition. If you can't, you can't update it. Only the original author of an application can create new versions of their own applications. You won't be able to do this with any of the built-in apps, because HTC and Google own the various certificates. 2. It simply is not correct to install a your own update to one of the system apps (contacts, calendar, etc) because those are part of the open source platform and the company who made the phone you are installing it on could have customized that app in significant ways. Your update could actually be a regression, or completely incompatible with how the built-in app stores its data. On Wed, Jan 21, 2009 at 9:42 AM, Disconnect dc.disconn...@gmail.com wrote: ..android-platform covers building apps with the sdk? Thats new. I think he's looking for info on changing package names so that he can replace the default apps. (I don't have that info handy, sorry..) On Wed, Jan 21, 2009 at 12:14 PM, Andrew Stadler stad...@gmail.comwrote: Wrong list. Please see android-platform, which covers topics such as this. http://source.android.com/discuss for more information. On Tue, Jan 20, 2009 at 12:24 AM, Gerald myq...@gmail.com wrote: Hi, I want to customize some built-in applications on android, for example Launcher or Contacts, etc. I've downloaded the source code and compile it by eclipse successfully. But when I tried to run it, a signing error comes: [2009-01-20 16:17:27 - Launcher] Installing Launcher.apk... [2009-01-20 16:17:35 - Launcher] Application already exists. Attempting to re-install instead... [2009-01-20 16:17:43 - Launcher] Re-installation failed due to different application signatures. [2009-01-20 16:17:43 - Launcher] You must perform a full uninstall of the application. WARNING: This will remove the application data! [2009-01-20 16:17:43 - Launcher] Please execute 'adb uninstall com.android.launcher' in a shell. I followed above instruction: adb uninstall com.android.launcher, but it failed (Can't remove the application). The official document only provides How to sign a new application, but it's not usable in my case. Does anyone know how to do it? Thank you very much Gerald -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: RunningTaskInfo.thumbnail is always null and onCreateThumbnail never called
This is not currently supported. We weren't using it anywhere in the UI on the G1, so we turned it off to avoid wasting time/space. On Wed, Jan 21, 2009 at 6:46 AM, drasticp drast...@gmail.com wrote: I'd like to get some thumbnail images of the running applications. The combination of RunningTaskInfo.thumbnail and Activity.onCreateThumbnail seems like just the thing but I don't see it working. I've overridden onCreateThumbnail in my main Activity. According to the documentation, this method is called by the framework when the activity is paused. I've set a breakpoint in the method and it never seems to be hit. The base implementation of onCreateThumbnail would work just fine if it would fire. @Override public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) { return super.onCreateThumbnail(outBitmap, canvas); } Also, I've written some simple code to getRunningTasks from the ActivityManager. The RunningTaskInfo.thumbnail property is always null. Is there something I need to set within an application so that it will generate it's thumbnail before onPause? Is something needed in the manifest. The documentation on this feature is sparse. Here's some [simplified] code I use in an extension of BaseAdapter to fetch the running tasks: ActivityManager manager = (ActivityManager)context.getSystemService (Context.ACTIVITY_SERVICE); ListRunningTaskInfo tasks = manager.getRunningTasks(10); RunningTaskInfo info = tasks.get(arg0); LayoutInflater inflater = (LayoutInflater)context.getSystemService (Context.LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(R.layout.taskitem, null); ImageView image = (ImageView)view.findViewById(R.id.image); TextView label = (TextView)view.findViewById(R.id.label); label.setText(info.baseActivity.getPackageName()); Bitmap bmp = info.thumbnail; image.setImageBitmap(bmp); -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Manage the home screen
Thanks for your help Romain - jaz On Jan 21, 1:57 pm, Romain Guy romain...@google.com wrote: No :) On Wed, Jan 21, 2009 at 10:56 AM, Jaz jazmeetwad...@gmail.com wrote: Thanks Romain - Is there any capability by which I could arrange these in custom layouts over the default home screen ? Thanks jaz On Jan 21, 11:19 am, Romain Guy romain...@google.com wrote: You need the permission com.android.launcher.permission.INSTALL_SHORTCUT then follows what Browser does here:http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a... (see the createShortcutIntent() method and how INSTALL_SHORTCUT is used.) On Wed, Jan 21, 2009 at 7:41 AM, Jaz jazmeetwad...@gmail.com wrote: I am looking for pointers on Androids capability to manage its home screen. for example I need to put my own application links programatically in a particular design/UI and manage it . Something similar to the Nokia E71 home screen interface capabilities Would appreciate any help on this. Thanks - jaz -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone willing to share...
To be safe, you could set a flag to say it has been dismissed that you check when creating the next activity. Generally we call onCreate() immediately after onDestroy() when switching orientations, but this is a good point that there may be another message dispatch between them in some cases so to be correct you need to deal with that. On Wed, Jan 21, 2009 at 7:24 AM, sp spapa...@gmail.com wrote: Great, exactly what I was looking for! However, at first blush, I see a potential race condition if the thread finishes and sends its message after onDestroy() but before onCreate() -- then the managed dialog will never be dismissed. Am I wrong? Spiros On Dec 16 2008, 12:21 pm, Dianne Hackborn hack...@android.com wrote: You can't call .dismiss() after onDestroy() of an activity. In the case of an orientation switch, the previous activity will be destroyed and a new instance created; after the previous instance is destroyed, its window and all windows it created are removed from the window manager, and the next instance will need to take care of re-adding them. If you are using managed dialogs, most of the work to deal with this should be done for you, you just need to make sure that you don't do anything with an old dialog after the onDestroy() call. The easiest way to do this is probably to have the main thread handle all of the dialogs, create a Handler on that thread that is NOT an inner class of the Activity, but just has a pointer to the current Activity, and clear that pointer in onDestroy() and set in in onCreate(). Now when another thread wants to dismiss the dialog, it can send a message requesting this from the handler, and the handler simply grabs the Activity pointer and if non-null, gets the Dialog pointer from it and dismisses it if there is one. On Mon, Dec 15, 2008 at 8:44 AM, Al Sutton a...@funkyandroid.com wrote: A code snippet which prevents an java.lang.IllegalArgumentException: View not attached to window manager being thrown when .dismiss() is called on a progress dialogue box which is on screen when the device changes orientation. Thanks, Al. -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to re-install sign android built-in applications
I thought one of the core tenants of Android was that developers could write, and end users could install, apps that replaced the default apps. (Such as k9 and k9sms.) Is this not, in fact, true? (And please don't try to claim that sms/mms isn't a core feature of a mobile phone OS. And both of those projects are, from the start, forks of the AOSP applications.) Looking at the Android page (http://code.google.com/android/) I see: *Any app on the mobile device can be replaced or extended -- even core components such as the dialer or home.* ..the dialer has already been hashed over (at best, you can make non-emergency calls, but you cannot in fact replace or extend the dialer completely.) Are you now saying that the entire statement is false? On Wed, Jan 21, 2009 at 2:41 PM, Dianne Hackborn hack...@android.comwrote: Yes in this case probably what is desired is changing the package name, though that wasn't explicitly requested. But in Android that is how you install an alternative version of an app -- by installing a -different- app with the same public capabilities (handling the same intents etc) as the built-in app. Then the user is free to decide when and where they want to use that new app, if at all. For the desire to just install a custom version of a built-in app that has the same name, and is thus treated as a new version, of the built-in app, the basic answer is: - In the current platform, it is not possible to install an UPDATE (key word) to a built-in application in to the data partition; updates can only be done by replacing the app in /system. - In Cupcake we will have this facility, HOWEVER: 1. You still must be able to sign the app with the same certificate as the version in the system partition. If you can't, you can't update it. Only the original author of an application can create new versions of their own applications. You won't be able to do this with any of the built-in apps, because HTC and Google own the various certificates. 2. It simply is not correct to install a your own update to one of the system apps (contacts, calendar, etc) because those are part of the open source platform and the company who made the phone you are installing it on could have customized that app in significant ways. Your update could actually be a regression, or completely incompatible with how the built-in app stores its data. On Wed, Jan 21, 2009 at 9:42 AM, Disconnect dc.disconn...@gmail.comwrote: ..android-platform covers building apps with the sdk? Thats new. I think he's looking for info on changing package names so that he can replace the default apps. (I don't have that info handy, sorry..) On Wed, Jan 21, 2009 at 12:14 PM, Andrew Stadler stad...@gmail.comwrote: Wrong list. Please see android-platform, which covers topics such as this. http://source.android.com/discuss for more information. On Tue, Jan 20, 2009 at 12:24 AM, Gerald myq...@gmail.com wrote: Hi, I want to customize some built-in applications on android, for example Launcher or Contacts, etc. I've downloaded the source code and compile it by eclipse successfully. But when I tried to run it, a signing error comes: [2009-01-20 16:17:27 - Launcher] Installing Launcher.apk... [2009-01-20 16:17:35 - Launcher] Application already exists. Attempting to re-install instead... [2009-01-20 16:17:43 - Launcher] Re-installation failed due to different application signatures. [2009-01-20 16:17:43 - Launcher] You must perform a full uninstall of the application. WARNING: This will remove the application data! [2009-01-20 16:17:43 - Launcher] Please execute 'adb uninstall com.android.launcher' in a shell. I followed above instruction: adb uninstall com.android.launcher, but it failed (Can't remove the application). The official document only provides How to sign a new application, but it's not usable in my case. Does anyone know how to do it? Thank you very much Gerald -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android.hardware.Camera - JPEG image of correct size but always black
Right now, the answer is no. Most cameras require that you go to preview mode before you can take a picture so that the image processor can grab some frames for auto-focus, white balance, etc. I'll see if we can get a change into Cupcake that allows you to start preview without a surface. That should allow you to do what you want. It will be some time though before this feature will appear on devices in the field. The other thing you need to bear in mind is that the camera eats a LOT of power. You don't want to run it for long periods of time in background. I forget what the power numbers are on the G1, but I bet when if kept fully spun-up it will drain the battery in a couple of hours. On Jan 21, 9:28 am, Pascal Merle pmerl...@googlemail.com wrote: Please also try to address my last question Can this be done from within a service (no activity)?. Since a service does not have a UI I don't see how I can start a preview from there. I want to take the picture from the service running in the background. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Make a photo with Android Emulator
You need to call startPreview() before takePicture. You also need to supply a PictureCallback function to receive the encoded JPEG. By passing null, you are telling the camera service you don't want the final JPEG image. On Jan 21, 2:50 am, ANDREA P andrewpag...@gmail.com wrote: I want to use the camera to make a photo snapshot with Android . At the beginning in my code : Camera mCamera = Camera.open(); PictureCallback callback = null; mCamera.takePicture(null, null, callback); but nothing doesn't happen And if I Use the program Camera of the phone Emulator says that I have to insert the SD Card. Please Help me..Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to re-install sign android built-in applications
I don't understand why taking the AOSP launcher, for example, and modifying it is simply not correct but writing one from scratch is..? I thought part of the point of the AOSP was that you could use those apps as bases for your own development. (I can go digging for more website/marketing/etc quotes if you really want, but..) On Wed, Jan 21, 2009 at 3:04 PM, Romain Guy romain...@google.com wrote: Replacing a core application is achieved using intent filters. This is how you can replace Home with your own application or replace Browser with your own web browser, et. On Wed, Jan 21, 2009 at 11:58 AM, Disconnect dc.disconn...@gmail.com wrote: I thought one of the core tenants of Android was that developers could write, and end users could install, apps that replaced the default apps. (Such as k9 and k9sms.) Is this not, in fact, true? (And please don't try to claim that sms/mms isn't a core feature of a mobile phone OS. And both of those projects are, from the start, forks of the AOSP applications.) Looking at the Android page (http://code.google.com/android/) I see: Any app on the mobile device can be replaced or extended -- even core components such as the dialer or home. ..the dialer has already been hashed over (at best, you can make non-emergency calls, but you cannot in fact replace or extend the dialer completely.) Are you now saying that the entire statement is false? On Wed, Jan 21, 2009 at 2:41 PM, Dianne Hackborn hack...@android.com wrote: Yes in this case probably what is desired is changing the package name, though that wasn't explicitly requested. But in Android that is how you install an alternative version of an app -- by installing a -different- app with the same public capabilities (handling the same intents etc) as the built-in app. Then the user is free to decide when and where they want to use that new app, if at all. For the desire to just install a custom version of a built-in app that has the same name, and is thus treated as a new version, of the built-in app, the basic answer is: - In the current platform, it is not possible to install an UPDATE (key word) to a built-in application in to the data partition; updates can only be done by replacing the app in /system. - In Cupcake we will have this facility, HOWEVER: 1. You still must be able to sign the app with the same certificate as the version in the system partition. If you can't, you can't update it. Only the original author of an application can create new versions of their own applications. You won't be able to do this with any of the built-in apps, because HTC and Google own the various certificates. 2. It simply is not correct to install a your own update to one of the system apps (contacts, calendar, etc) because those are part of the open source platform and the company who made the phone you are installing it on could have customized that app in significant ways. Your update could actually be a regression, or completely incompatible with how the built-in app stores its data. On Wed, Jan 21, 2009 at 9:42 AM, Disconnect dc.disconn...@gmail.com wrote: ..android-platform covers building apps with the sdk? Thats new. I think he's looking for info on changing package names so that he can replace the default apps. (I don't have that info handy, sorry..) On Wed, Jan 21, 2009 at 12:14 PM, Andrew Stadler stad...@gmail.com wrote: Wrong list. Please see android-platform, which covers topics such as this. http://source.android.com/discuss for more information. On Tue, Jan 20, 2009 at 12:24 AM, Gerald myq...@gmail.com wrote: Hi, I want to customize some built-in applications on android, for example Launcher or Contacts, etc. I've downloaded the source code and compile it by eclipse successfully. But when I tried to run it, a signing error comes: [2009-01-20 16:17:27 - Launcher] Installing Launcher.apk... [2009-01-20 16:17:35 - Launcher] Application already exists. Attempting to re-install instead... [2009-01-20 16:17:43 - Launcher] Re-installation failed due to different application signatures. [2009-01-20 16:17:43 - Launcher] You must perform a full uninstall of the application. WARNING: This will remove the application data! [2009-01-20 16:17:43 - Launcher] Please execute 'adb uninstall com.android.launcher' in a shell. I followed above instruction: adb uninstall com.android.launcher, but it failed (Can't remove the application). The official document only provides How to sign a new application, but it's not usable in my case. Does anyone know how to do it? Thank you very much Gerald -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All
[android-developers] Re: How to re-install sign android built-in applications
I don't understand why taking the AOSP launcher, for example, and modifying it is simply not correct but writing one from scratch is..? You can, Dianne just said that you need to change its package name to avoid conflicting with the system apps. That's all. That's what K9 does with Email. So take the launcher, modify it and install it but change its package name. I thought part of the point of the AOSP was that you could use those apps as bases for your own development. (I can go digging for more website/marketing/etc quotes if you really want, but..) On Wed, Jan 21, 2009 at 3:04 PM, Romain Guy romain...@google.com wrote: Replacing a core application is achieved using intent filters. This is how you can replace Home with your own application or replace Browser with your own web browser, et. On Wed, Jan 21, 2009 at 11:58 AM, Disconnect dc.disconn...@gmail.com wrote: I thought one of the core tenants of Android was that developers could write, and end users could install, apps that replaced the default apps. (Such as k9 and k9sms.) Is this not, in fact, true? (And please don't try to claim that sms/mms isn't a core feature of a mobile phone OS. And both of those projects are, from the start, forks of the AOSP applications.) Looking at the Android page (http://code.google.com/android/) I see: Any app on the mobile device can be replaced or extended -- even core components such as the dialer or home. ..the dialer has already been hashed over (at best, you can make non-emergency calls, but you cannot in fact replace or extend the dialer completely.) Are you now saying that the entire statement is false? On Wed, Jan 21, 2009 at 2:41 PM, Dianne Hackborn hack...@android.com wrote: Yes in this case probably what is desired is changing the package name, though that wasn't explicitly requested. But in Android that is how you install an alternative version of an app -- by installing a -different- app with the same public capabilities (handling the same intents etc) as the built-in app. Then the user is free to decide when and where they want to use that new app, if at all. For the desire to just install a custom version of a built-in app that has the same name, and is thus treated as a new version, of the built-in app, the basic answer is: - In the current platform, it is not possible to install an UPDATE (key word) to a built-in application in to the data partition; updates can only be done by replacing the app in /system. - In Cupcake we will have this facility, HOWEVER: 1. You still must be able to sign the app with the same certificate as the version in the system partition. If you can't, you can't update it. Only the original author of an application can create new versions of their own applications. You won't be able to do this with any of the built-in apps, because HTC and Google own the various certificates. 2. It simply is not correct to install a your own update to one of the system apps (contacts, calendar, etc) because those are part of the open source platform and the company who made the phone you are installing it on could have customized that app in significant ways. Your update could actually be a regression, or completely incompatible with how the built-in app stores its data. On Wed, Jan 21, 2009 at 9:42 AM, Disconnect dc.disconn...@gmail.com wrote: ..android-platform covers building apps with the sdk? Thats new. I think he's looking for info on changing package names so that he can replace the default apps. (I don't have that info handy, sorry..) On Wed, Jan 21, 2009 at 12:14 PM, Andrew Stadler stad...@gmail.com wrote: Wrong list. Please see android-platform, which covers topics such as this. http://source.android.com/discuss for more information. On Tue, Jan 20, 2009 at 12:24 AM, Gerald myq...@gmail.com wrote: Hi, I want to customize some built-in applications on android, for example Launcher or Contacts, etc. I've downloaded the source code and compile it by eclipse successfully. But when I tried to run it, a signing error comes: [2009-01-20 16:17:27 - Launcher] Installing Launcher.apk... [2009-01-20 16:17:35 - Launcher] Application already exists. Attempting to re-install instead... [2009-01-20 16:17:43 - Launcher] Re-installation failed due to different application signatures. [2009-01-20 16:17:43 - Launcher] You must perform a full uninstall of the application. WARNING: This will remove the application data! [2009-01-20 16:17:43 - Launcher] Please execute 'adb uninstall com.android.launcher' in a shell. I followed above instruction: adb uninstall com.android.launcher, but it failed (Can't remove the application). The official document only provides How to sign a new application, but it's not usable in my case. Does
[android-developers] Re: Camera Focus Facility
Roughly: Camera mCamera = Camera.open(); // this sequence should occur after onResume and surfaceCreated mCamera.setPreviewDisplay(mSurfaceHolder); // saved from surfaceCreated call mCamera.startPreview(); // to start focus - usally called from your onClickListener mCamera.autoFocus(afCallback); // to take picture - usually called from your onClick listener mCamera.takePicture(shutterCallback, null, pictureCallback); // auto focus callback public void autoFocusCallback(boolean focused, Camera camera) { // play focused sound } // shutter callback function public void shutterCallback() { // play shutter sound } // picture callback function public void pictureCallback(byte rawData[], Camera camera) { // save JPEG } You should also note that there is significant lag from the time takePicture() is called until the image capture begins. You can shorten this time by calling auto-focus first. You don't want to move the camera until after the shutter callback. On Jan 21, 1:59 am, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Could you list the proper sequence as I'm having hard time working it out! Thanks On Jan 21, 3:21 am, Dave Sparks davidspa...@android.com wrote: Sounds like you might have some sequencing issues. Did you call startPreview first? On Jan 20, 2:51 pm, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, thanks for the hint! I've tried that but I got this: java.io.IOException: autoFocus failed I registered the callback in CameraActivity.surfaceCreated() method. Could you advice on how to get that working? Thank you! On Jan 20, 5:09 pm, Dave Sparks davidspa...@android.com wrote: Camera.autoFocus(cb); where cb is a callback function you supply that tells you focus is successful or not. On Jan 20, 5:27 am, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, My app is struggling to take focused shots. Is there a built in facility that sets an auto-focus property on the camera, so it automatically takes clear and focused images. I've noticed that feature in numerous well-known apps such as ShopSavvy, CompareEverywhere, etc. Could you advise on how to achieve that? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Play wav files in Media player
I suspect that your problem is in some details that you haven't given us yet. How many media players are you creating at the same time? On Jan 20, 10:47 pm, ena enu1...@gmail.com wrote: On Jan 21, 8:23 am, Dave Sparks davidspa...@android.com wrote: What is the format of the data in the WAVE file? i play audio file of wav format. OpenCore only supports 8- and 16-bit linear PCM. i think that is not file problem because some time the files are able to played and some time not... On Jan 20, 11:59 am, ena enu1...@gmail.com wrote: plz help me outActually i want to play many file one by one in media player.im using that code MediaPlayer melodyPlayer=MediaPlayer.create(context, resID); melodyPlayer.seekTo(0); melodyPlayer.start(); but after same time i get Error 01-20 23:12:01.785: ERROR/AudioTrack(24): Could not get control block 01-20 23:12:01.785: ERROR/AudioSink(24): Unable to create audio track 01-20 23:12:01.785: ERROR/audiothread(24): Error creating AudioTrack 01-20 23:12:01.876: WARN/PlayerDriver(24): PVMFInfoErrorHandlingComplete 01-20 23:12:01.886: DEBUG/MediaPlayer(316): create failed: 01-20 23:12:01.886: DEBUG/MediaPlayer(316): java.io.IOException: Prepare failed.: status=0x 01-20 23:12:01.886: DEBUG/MediaPlayer(316): at android.media.MediaPlayer.prepare(Native Method) 01-20 23:12:01.886: DEBUG/MediaPlayer(316): at android.media.MediaPlayer.create(MediaPlayer.java:169) 01-20 23:12:01.886: DEBUG/MediaPlayer(316): at org.isol.MyCustomButton$1.onClick(MyCustomButton.java:89) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to re-install sign android built-in applications
It's not that easy, because aapt assumes that the android package name is also the source code package name. At the very least you need a custom post-processing step to move the generated R file into the proper source code package, and none of the standard Android build tools support that. On top of that, you've got to pray that the application you're working with only uses SDK-accessible permissions. JBQ On Wed, Jan 21, 2009 at 12:13 PM, Romain Guy romain...@google.com wrote: I don't understand why taking the AOSP launcher, for example, and modifying it is simply not correct but writing one from scratch is..? You can, Dianne just said that you need to change its package name to avoid conflicting with the system apps. That's all. That's what K9 does with Email. So take the launcher, modify it and install it but change its package name. I thought part of the point of the AOSP was that you could use those apps as bases for your own development. (I can go digging for more website/marketing/etc quotes if you really want, but..) On Wed, Jan 21, 2009 at 3:04 PM, Romain Guy romain...@google.com wrote: Replacing a core application is achieved using intent filters. This is how you can replace Home with your own application or replace Browser with your own web browser, et. On Wed, Jan 21, 2009 at 11:58 AM, Disconnect dc.disconn...@gmail.com wrote: I thought one of the core tenants of Android was that developers could write, and end users could install, apps that replaced the default apps. (Such as k9 and k9sms.) Is this not, in fact, true? (And please don't try to claim that sms/mms isn't a core feature of a mobile phone OS. And both of those projects are, from the start, forks of the AOSP applications.) Looking at the Android page (http://code.google.com/android/) I see: Any app on the mobile device can be replaced or extended -- even core components such as the dialer or home. ..the dialer has already been hashed over (at best, you can make non-emergency calls, but you cannot in fact replace or extend the dialer completely.) Are you now saying that the entire statement is false? On Wed, Jan 21, 2009 at 2:41 PM, Dianne Hackborn hack...@android.com wrote: Yes in this case probably what is desired is changing the package name, though that wasn't explicitly requested. But in Android that is how you install an alternative version of an app -- by installing a -different- app with the same public capabilities (handling the same intents etc) as the built-in app. Then the user is free to decide when and where they want to use that new app, if at all. For the desire to just install a custom version of a built-in app that has the same name, and is thus treated as a new version, of the built-in app, the basic answer is: - In the current platform, it is not possible to install an UPDATE (key word) to a built-in application in to the data partition; updates can only be done by replacing the app in /system. - In Cupcake we will have this facility, HOWEVER: 1. You still must be able to sign the app with the same certificate as the version in the system partition. If you can't, you can't update it. Only the original author of an application can create new versions of their own applications. You won't be able to do this with any of the built-in apps, because HTC and Google own the various certificates. 2. It simply is not correct to install a your own update to one of the system apps (contacts, calendar, etc) because those are part of the open source platform and the company who made the phone you are installing it on could have customized that app in significant ways. Your update could actually be a regression, or completely incompatible with how the built-in app stores its data. On Wed, Jan 21, 2009 at 9:42 AM, Disconnect dc.disconn...@gmail.com wrote: ..android-platform covers building apps with the sdk? Thats new. I think he's looking for info on changing package names so that he can replace the default apps. (I don't have that info handy, sorry..) On Wed, Jan 21, 2009 at 12:14 PM, Andrew Stadler stad...@gmail.com wrote: Wrong list. Please see android-platform, which covers topics such as this. http://source.android.com/discuss for more information. On Tue, Jan 20, 2009 at 12:24 AM, Gerald myq...@gmail.com wrote: Hi, I want to customize some built-in applications on android, for example Launcher or Contacts, etc. I've downloaded the source code and compile it by eclipse successfully. But when I tried to run it, a signing error comes: [2009-01-20 16:17:27 - Launcher] Installing Launcher.apk... [2009-01-20 16:17:35 - Launcher] Application already exists. Attempting to re-install instead... [2009-01-20 16:17:43 - Launcher] Re-installation failed due to different application signatures.
[android-developers] Re: How to re-install sign android built-in applications
On Wed, Jan 21, 2009 at 12:22 PM, Jean-Baptiste Queru j...@google.comwrote: It's not that easy, because aapt assumes that the android package name is also the source code package name. At the very least you need a custom post-processing step to move the generated R file into the proper source code package, and none of the standard Android build tools support that. Yes, better tools to help with this would be nice. The basic point of the package name is this: it provides a unique identity for an application under a particular author's control. It does not make any sense for someone to go and modify an application in the open-source platform and make it available with the same package name, because what you have done is created a -fork- and it needs a new identity. The existing system app will continue to evolve, and your own fork will continue to evolve, and there is no way to ensure they are compatible. And further, as I said, the apps that are available as part of the platform code are really owned by the manufacturer of the device they are running on (using the platform code as a base), so there is simply no way you can know that your version of the app forked off of some version of the platform will be able to actually replace the version built into a piece of hardware based on possibly some other version of the platform with who knows what customization done by the hardware manufacturer. So the way one replaces components is to create a -new- application that supplies the same features to the system as the built-in application, so the system can let the user pick which one to use where appropriate, use the built-in one where the replacement didn't actually happen to provide some functionality it has, etc. This is actually an -intrinsic- part of the claim about third parties being able to replace applications, in that it is done in such a way that it can be controlled and avoid breaking things on whatever device the replacement is being installed on. On top of that, you've got to pray that the application you're working with only uses SDK-accessible permissions. The vast majority of applications built into the system use normal application permissions. As we have already gone over numerous times, yes there are some parts of the UI that are more intimately tied with the system (in-call screen, lock screen, settings) and not so easy to extract at this point. That doesn't invalidate the general philosophy nor the extensive architecture in place to support that philosophy. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] openGL colors
I'm writing some 3D rendering code, having started from the API demos to get the SurfaceHolder and openGL initialization/refresh logic. The actual rendering after that is not a problem. However, it seems that openGL does not create a surface properly. You can see the problem in the API demo. Both the GLSurfaceView and Translucent GLSurfaceView demos use the same Cube class to draw the mesh, and so have the same color. But the result on screen has inverted color channels in the translucent case. To make it obvious, change the colors in the Cube.java color array to be 0x1, 0, 0, 0x1 on each line. In the non-translucent demo, the cube will appear red. In the translucent demo, it will show blue. If the format set on the SurfaceHolder does not match the one requested from openGL, it's obvious the phone does not do any conversion, and simply copies the bits to the surface. That's expected, except there seems to be no way to define them to be the same if we want better then 565 quality. The non-translucent demo uses a RGB 565 format, whereas the translucent one uses RGBA . But it seems open GL creates a BGRA instead. Am I missing a call somewhere to specify the channel order? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SurfaceView overriding onDraw
I'm attempting to extend SurfaceView and override it's onDraw method. But, the onDraw method is never called ? @override protected void onDraw(Canvas canvas) { } What's the problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Theme on a preferences screen
Hi all , in a preferences screen in my application which is build by extending the PreferenceActivity i need to change background on the window itself and on the PreferenceCategory. How i can do it via Themes/Styles ? Which attributes i need to define ? thanks Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: save image file in sqlite db
Use the ContentResolver().openOutputStream(), etc. in the example here. http://code.google.com/android/devel/data/contentproviders.html SQLite supports binary data. However, I think you may have trouble with direct access to binary data with the Android Cursors. - Juan T. On Jan 20, 12:19 am, And-Rider rahulregunat...@gmail.com wrote: I want to save images from a particular URL into the sqlite db and then display it from the database..Can anyone tell me as how i could do that --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Theme on a preferences screen
This gave me a background for the whole list i wanted. Now i wonder how to set background fro the PreferenceCategory style name=Theme parent=android:Theme.Light /style style name=Theme.Express item name=android:listViewStyle@style/Widget.ListView/ item /style style name=Widget parent=android:Widget /style style name=Widget.AbsListView item name=android:scrollbarsvertical/item item name=android:fadingEdgevertical/item item name=android:scrollbarStyleoutsideInset/item /style style name=Widget.ListView parent=Widget.AbsListView item name=android:background@drawable/background/item item name=android:divider@drawable/line_darker/item /style On Jan 21, 3:33 pm, Alexey avolo...@gmail.com wrote: Hi all , in a preferences screen in my application which is build by extending the PreferenceActivity i need to change background on the window itself and on the PreferenceCategory. How i can do it via Themes/Styles ? Which attributes i need to define ? thanks Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: two threads, the main closes the DB but the second is still running and need to use the DB!
Another problem related to this one. When the secondary thread post back to the main thread, the main thread fetches data from the DB and update the view. Here also I got an error. It is perfectly normal since the application has been killed. How to handle that? Thanks a lot in advance. On Jan 21, 2:45 pm, polo777 polodr...@yahoo.com wrote: Hi everyone, I have two threads: - the main one in charge of the UI - a second one that takes care of network calls, parsing responses and database updates. The main threads open the database, retrieves information into a Cursor that is used to feed a listView. My problem is the following: When I close the application the activity is destroyed, the second thread can still be running and thereby still can update the DB. Since the main thread open the DB, I want to close it to do the stuffs properly. However if I close it within the onDestroy method and if the second thread is running and is about to update the DB, I get an error. What is the best way to handle this situation? Thanks a lot Polo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Radio button items's text not visible in Dialog
So in the mean time is there anything we can do (other than setting our theme to Dark) to get this to work? Is there a way to set the theme of the AlertDialog Builder? On Jan 21, 5:28 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote: We found a bug in Android Our theme for the Application was set to android:theme=@android:style/ Theme.Light . Setting the theme back to dark and our text now displays... Dear Google Developers, Please fix this if you have not already. thank you. On Jan 21, 10:55 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote: There was a similar post to this but used an activity and I am using a dialog. This is real simple code and it works int he APIDemo (which is where I pulled the code from to begin with). The dialog display just fine with the correct number of radio buttons, but the text for the buttons does not display UNLESS I press/select an item. Then once I let up on the selection it disapperas again... what in the world am I not getting??? return new AlertDialog.Builder(this) .setTitle(R.string.choose_location_in_list) .setSingleChoiceItems(R.array.select_add_location, 1, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .setPositiveButton(R.string.add_to_favs, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .create(); my array looks like this, ?xml version=1.0 encoding=utf-8? resources string-array name=select_add_location itemAdd to Top/item itemAdd to Bottom/item itemAdd and Define/item /string-array /resources --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Screen Orientation change performance Question
From reading Romain Guy's blog post, I understand keep static reference to a Drawable can create huge memory leaks. So what is the recommended solution if I don't want to reload my big Drawable image every time screen orientation changes? Currently my app takes 3 seconds to complete each orientation change. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Screen Orientation change performance Question
Hi, You can forward them to the next activity using Activity.onRetainNonConfigurationInstance(). You can also keep static references to the drawables if you remove their callbacks in onDestroy(). You can look at Home's source code for an example of the latter or at the source code of Photostream (code.google.com/p/apps-for-android) for an example of the former. On Wed, Jan 21, 2009 at 3:49 PM, j jac...@gmail.com wrote: From reading Romain Guy's blog post, I understand keep static reference to a Drawable can create huge memory leaks. So what is the recommended solution if I don't want to reload my big Drawable image every time screen orientation changes? Currently my app takes 3 seconds to complete each orientation change. -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] spurious WAKE_LOCK SecurityException?
I am very confused because I am getting a permission problem when I have clearly included: uses-permission android:name=android.permission.WAKE_LOCK/uses- permission in the manifest. 01-21 15:43:44.318: ERROR/AndroidRuntime(806): java.lang.SecurityException: Neither user 10019 nor current process has android.permission.WAKE_LOCK. Has anyone else encountered this? - is there a work-around? Thanks much. Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---