[android-developers] Re: ant and eclipse builds don't play nice
On Wed, May 27, 2009 at 2:36 PM, Raphael r...@android.com wrote: On Tue, May 26, 2009 at 6:26 PM, Craig supkic...@gmail.com wrote: On May 26, 9:49 pm, Zero zeroo...@googlemail.com wrote: from my experience, eclipse never used the build.xml for it's internal builds - how did you do that ? The eclipse build doesn't use build.xml at all, but due to the fact that build.xml is in the eclipse project (because it is in the same directory as AndroidManifest.xml) eclipse tries to build it or at least parse it and check for errors. build.xml can't be parsed by eclipse (even though it is a valid file according to ant) and thus the android builder refuses to launch the project at all. This seems wrong to me. No it doesn't do that. Would you have the Ant view open by any chance? Don't build from the ant view if you build using Eclipse. Hey Raph, To be clear, I'm not trying to build using ant from within eclipse. I use ant to do customised builds from the command line. All every-day builds are done from eclipse using F11-Debug As-Android Application. I simply want the two different build methods to ignore each other. I have a clean install of ganymede EE 3.4.2, the latest DDMS, no ant views open, and a cleaned android project. If I rename build.xml to build.txt and refresh the project, the error goes away, and I can launch and debug the project. If I rename it back to build.xml and refresh the project, the errors aren't detected, and I can launch and debug If I open build.xml with the ant editor (because I want to edit it :), the error is detected, and I can no longer launch and debug, even if I close everything and refresh. If I open build.xml with the xml editor, the error is not detected...so I guess I just found my own work-around. Never open the ant editor. Still seems like a bug to me. cheers, Craig --~--~-~--~~~---~--~~ 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: implementation of onDestroy for a service containing a worker or backround thread
Android may kill the process and thus the service running in the process, once onDestroy() returns (after sending a message to the worker thread). But how will I make sure that the service has completed it's clean up operations (ex. saving some data on to some storage, etc...), if any? The main thread nevers gets blocked in any other scenario except onDestroy(). Do you have any other mechanism to achieve this behavior in the platform? On May 27, 2:23 am, Dianne Hackborn hack...@android.com wrote: Blocking in onDestroy() waiting for the background thread to complete basically defeats the purpose of doing work in a background thread. On Tue, May 26, 2009 at 7:09 AM, Gautam gautam_raychaudh...@hotmail.comwrote: Hi, I'm implementing a service that contains a thread to handle all time consuming operation. My core service logic is in a different thread than the ui or main thread. According to the Android document, when the OS plans to free some system resource, it will call onDestroy () on the service and only when onDestroy() returns it will kill the process hosting the service, thus giving opportunity to the service to cleanup. Now, when onDestroy() is called, I want to send a message to my service thread to do the necessary cleanup. Only when the service thread acknowledges that the cleanup or shutdown is complete, onDestroy () should return. I could find a way to send asynchronous messages to threads and the corresponding processing of the messages, but not able to figure out how I need to implement onDestroy(), such that it would send a message to the service thread and should wait for a result, before returning. Appreciate if someone can comment on my understanding of onDestroy () and provide some solution to the above problem. Thanks and Regards, Gautam. -- 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, and so won't reply to such e-mails. 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] Using Parcelable with Android 1.5
Hello, I have a small problem, hope you can help me. I want to pass one object of class A from one Android Activity to another and I need to use Parcelable (performance and Class loading issues). My code is similar to the lines listed below: class A implements Parcelable { private String x; //other fields here... private B b; .. public void writeToParcel(Parcel out, int i) { out.writeString(x); out.writeParcelable(b, i); } public static Parcelable.Creator CREATOR = new Parcelable.Creator () { public A createFromParcel(Parcel in) { A result = new A(); result.x= in.readString(); result.b = in.readParcelable(getClass().getClassLOader ()); return result; } } } class B implements Parcelable {...} // Sending Parcelable bundle.putParcelable(KEY1, a); bundle.putSerializable(KEY2, something); bundle.putParcelable(KEY3, otherParcelableObject); //Receiving Parcelable... @Override public void onCreate(Bundle icicle) { Bundle receivedBundle = getIntent().getExtras() Object o= receivedBundle.getParcelable(KEY3) // Problem: o is NULL here // Debug: receivedBundle.mMap= HashMap{ [something, null], [Map { [KEY3, other], [null,null] }, KEY2], [KEY1, a] } If I remove from class A the code that writes B into Parcel, receivedBundle.mMap has the expected value: HashMap {[KEY1, a], [KEY2, something], [KEY3, other]}. Am I doing something wrong or is the parcelization mechanism not supporting recursive Parcelable entities? Thanks in advance, Lia. --~--~-~--~~~---~--~~ 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: A window does not automatiacally resize when an IME is shown
Hi, Can u please tell me how do u re size the window? Any sample code. For example.. I have developed one application and i want to resize in on runtime. How do i do so? Thanks, Souvik On May 12, 5:52 am, freelancer303 freelancer...@gmail.com wrote: Hi, I am using the following attributes for an activity and expect a window to resize automatically to occupy space available above IME: android:windowSoftInputMode=adjustResize android:theme=@android:style/Theme.NoTitleBar.Fullscreen When IME is opened the window does not resize and the bottom appart is hidden by the IME. I've observed that if I remove the Fullscreen flag, window resizes as expected. Is there a way to make window resize with Fullscreen flag? 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: Help for decoding the camera data from the PreviewCallback
sorry man, the data from the camera preview is encoded in raw YCbCr from the camera hardware, it's not readable in any sensible time frame by anything available in the Android SDK. Sujay has the wrong end of the stick again, he's talking about the image that's captured when the camera actually takes a picture. the preview data is in a completely different format and is not directly usable. ask me, i tried it :-) hth j Does anyone know how to decode the camera data from the PreviewCallback? I need to capture camera preview frames and process the bitmap obtained by decoding the frames before displaying. -- jason.software.particle --~--~-~--~~~---~--~~ 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: finishing subactivity after some perticular time
Is it possible to call finish() for subactivity from the parent activity?? I want to show subactivity for only some perticular time and after that I want it to be automatically finished.. Thanks, Asif On May 26, 7:26 pm, Asif k asifk1...@gmail.com wrote: Hi all, I had opened an image file store in the sdcard using startActivity (intent) API. By doing this, image has opened and will remain open til manually coming back to parent activity by pressing back button. but I want it to be opened only for some perticular time after that it should exit and came back to parent acity. So how to set timer for subactivity?? Please help. Thanks, Asif --~--~-~--~~~---~--~~ 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] Remove screen lock like the MENU key do?
The lock screen is also a java class called LockScreen.java.In this class,it captures the event of MENU key, so if the screen is locked,we can click the MENU key to remove the lock. The qustion of mine is that How Can I remove the lock like MENU key do??Is that possible? (I know KeyguardManager and KeyguardManager.KeyguardLock,but this is not the right way,I want to remove,not to hide!). --~--~-~--~~~---~--~~ 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: Help for decoding the camera data from the PreviewCallback
See http://code.google.com/p/android/issues/detail?id=823 Android 1.5 still lacks support for decoding preview images, while data [] is headerless. The first width x height bytes are just the Y (brightness) component though, so you can easily decode the greyscale part pixel-by-pixel. However, doing so at Android level remains painfully slow. On May 27, 7:07 am, loril...@gmail.com loril...@gmail.com wrote: Does anyone know how to decode the camera data from the PreviewCallback? I need to capture camera preview frames and process the bitmap obtained by decoding the frames before displaying. --~--~-~--~~~---~--~~ 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 update an app itself?
Hi, all I want to add an auto update function to an app. This app can download a new version of itself, i.e., a new apk file. After finishing downloading this apk file, how to let the app update? I'm going to try this by using PackageManager.installPackage(), but failed. The system said no one has the permission to install a package, even I had added uses-permission android:name=android.permission.INSTALL_PACKAGES / to the manifest.xml 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: Controlling the width of listview items
Thanks Romain, although I'd be interested in any tips on how to get around that? Would I have to implement my own custom ListView sub- class, or where should I start? What I also don't quite understand is why I get the same result even if I embed a second inner RelativeLayout inside the outer one and set wrap_content on that one as well. Even if it only encloses those two small TextViews (for which wrap_content does work) it still grows to fill the parent. It's as if wrap_content is overruled by the ListView for _all_ ViewGroups found in the entire hierarchy of the list item? What am I missing here? Thanks /Henrik On May 26, 11:51 pm, Romain Guy romain...@google.com wrote: List items are always as wide as the ListView. On Tue, May 26, 2009 at 2:19 AM, HenrikH henrik.ha...@gmail.com wrote: Hi, I'm trying to make a list that contains elements not necessarily occupying the entire width of the screen, but even if using android:layout_width=wrap_content on my elements, they always behave as if their width value were set to fill_parent instead. If I set a fixed value for the width, e.g. 100px, that value is indeed used, but I just can't get wrap_content to work. Example simple list item: RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=wrap_content android:layout_height=wrap_content android:background=#707 TextView android:id=@+id/text1 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentTop=true android:layout_alignParentRight=true android:background=#770 android:text=Text1 / TextView android:id=@+id/text2 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentLeft=true android:layout_below=@id/ text1 android:background=#077 android:text=Text2 / /RelativeLayout What am I missing here? How do I accomplish a list item with wrap_content behaviour, i.e., where the width of each RelativeLayout is adapted to the length of the strings in the contained text views? BR /Henrik -- 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: onKeyDown doesn't capture event
That should happen automatically, without implementing onKeyDown(). Without implementing onKeyDown the back button will close my application. Thus, I implemented the onKeyDown method. Where? On the activity? On a subclass of one of the widgets? On the activity: from this activity I want to go back to a parent activity (which extends ActivityGroup). As already said I have a problem only when the list is empty. It seems to me that this happens when the list isn't focused, but again, when it is empty, list.requestFocus() doesn't solve my problem... On 26 Mai, 17:50, Mark Murphy mmur...@commonsware.com wrote: I have a proble with onKeyDown: my activity consists in a simple textView (as header) and a ListView below it, I need to go back to the previous screen when the user presses the back button. That should happen automatically, without implementing onKeyDown(). Thus, I implemented the onKeyDown method. Where? On the activity? On a subclass of one of the widgets? Everything works fine if the list contains some elements, but when the list is empty the onKeyDown method is never called... I would just get rid of it and allow Android to handle the back button, since Android's default behavior seems to be what you want. -- 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] How to use a finger to pull the screen to view more data?
Hi, I got a question about what kind of view should I use in the following case. As it shows below, I want to draw a 2D coordinates, and show a diagram in it(by drawing points and then connecting them from left to right). But I have much more data than the screen size, I wish the user to press the arrow under the coordinates( ), or just use finger to drag the coordinates to see the information at the left/right of the screen. What kind of view/layout should I use to implement this? Thanks. Y /|\ extra data |--320px| extra data |--- | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _X --~--~-~--~~~---~--~~ 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] sharing a utility project between two apps
I am hoping to release two apps which are very different in functionality but share common classes. To make my maintenance of these apps easier I am hoping to split the common classes into a new project in eclipse and reference this from both apps. Do android projects in eclipse let you do this? Will this confuse the market when I upload? The launch projects will have different package names and activity names but the shared project will have a single package name. --~--~-~--~~~---~--~~ 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 use a finger to pull the screen to view more data?
Hi, I got a question about what kind of view should I use in the following case. As it shows below, I want to draw a 2D coordinates, and show a diagram in it(by drawing points and then connecting them from left to right). But I have much more data than the screen size, I wish the user to press the arrow under the coordinates( ), or just use finger to drag the coordinates to see the information at the left/right of the screen. What kind of view/layout should I use to implement this? Thanks. Y /|\ extra |-320px---| extra --|-- | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _X --~--~-~--~~~---~--~~ 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: Imitating the Launcher or 'Home Screen'
There are two inflexibilities with the SlidingDrawer which is why I'm not keen on using it, cool as it is. The first is the inability to have more than one drawer. (ok, I could have one on the bottom and one on the left, but it's not what I'm looking for) I have found a place in my UI where multiple drawers would have been great. I won't go into details, it's an application specific thing) The effect I was hoping for was that of having two or three handlers at the top, like tabs, which could be pulled down to reveal further information. And that brings me to the second point. 2) Sliding drawers can only be placed at the bottom or the right hand side. Unfortunately, I'm looking for a vertical drawer coming down from the top. (at the bottom I've got a row of buttons and I don't want the user to fear pressing the wrong thing) But, SlidingDrawer aside, the best effect I could have for the app I'm creating is the Launcher with the neat drag multiple 'desktops' into view from the left or right. I guess I could copy the code, both of the Launcher and SlidingDrawer, and modify, but I'd much rather use the existing API if I could. Any ideas at all? On May 27, 12:21 am, Romain Guy romain...@google.com wrote: SlidingDrawer is part of the framework in Android 1.5. Why do you need several drawers? On Tue, May 26, 2009 at 3:47 PM, Dianne Hackborn hack...@android.com wrote: Copy the SlidingDrawer code into your app and modify it to work how you want. Just be sure to put them in your own package so they don't conflict with the platform. On Tue, May 26, 2009 at 3:27 PM, Parakoos parak...@gmail.com wrote: Hello, Is there an easy way to imitate the Launcher look and feel? I mean having three full screen views which can be switched between by sliding/dragging right or left. I had a look at the source code to see how it was done and found that the magic is done in the com.android.launcher package. I take it that it is inadvisable to use the same classes as those in that package due to them not being part of the official SDK and therefore up for change at any point? If so, is there a good way to get a similar effect from the official SDK? The SlidingDrawer would have given me what I needed if it was possible to have more than one defined, but that seems to not be supported. (the handles stack on top of each other) So you know what problem I'm trying to solve, here is some background: I've got the an application which shows a photo. I want to maximize the viewing area of the photo so it takes up most of the screen. At the same time I'd like the user to easily be able to bring into view the metadata of the photo. That is where I wanted the 'slide android view into view' functionality similar to that found in the Launcher and/or the SlidingDrawer. Thanks for any help. Gustav -- 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, and so won't reply to such e-mails. 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: Imitating the Launcher or 'Home Screen'
The existing API is SlidingDrawer. If that's not what you want, you'll have to write your own. The workspace in Home is a custom view with custom layouts inside. On Wed, May 27, 2009 at 12:29 AM, Parakoos parak...@gmail.com wrote: There are two inflexibilities with the SlidingDrawer which is why I'm not keen on using it, cool as it is. The first is the inability to have more than one drawer. (ok, I could have one on the bottom and one on the left, but it's not what I'm looking for) I have found a place in my UI where multiple drawers would have been great. I won't go into details, it's an application specific thing) The effect I was hoping for was that of having two or three handlers at the top, like tabs, which could be pulled down to reveal further information. And that brings me to the second point. 2) Sliding drawers can only be placed at the bottom or the right hand side. Unfortunately, I'm looking for a vertical drawer coming down from the top. (at the bottom I've got a row of buttons and I don't want the user to fear pressing the wrong thing) But, SlidingDrawer aside, the best effect I could have for the app I'm creating is the Launcher with the neat drag multiple 'desktops' into view from the left or right. I guess I could copy the code, both of the Launcher and SlidingDrawer, and modify, but I'd much rather use the existing API if I could. Any ideas at all? On May 27, 12:21 am, Romain Guy romain...@google.com wrote: SlidingDrawer is part of the framework in Android 1.5. Why do you need several drawers? On Tue, May 26, 2009 at 3:47 PM, Dianne Hackborn hack...@android.com wrote: Copy the SlidingDrawer code into your app and modify it to work how you want. Just be sure to put them in your own package so they don't conflict with the platform. On Tue, May 26, 2009 at 3:27 PM, Parakoos parak...@gmail.com wrote: Hello, Is there an easy way to imitate the Launcher look and feel? I mean having three full screen views which can be switched between by sliding/dragging right or left. I had a look at the source code to see how it was done and found that the magic is done in the com.android.launcher package. I take it that it is inadvisable to use the same classes as those in that package due to them not being part of the official SDK and therefore up for change at any point? If so, is there a good way to get a similar effect from the official SDK? The SlidingDrawer would have given me what I needed if it was possible to have more than one defined, but that seems to not be supported. (the handles stack on top of each other) So you know what problem I'm trying to solve, here is some background: I've got the an application which shows a photo. I want to maximize the viewing area of the photo so it takes up most of the screen. At the same time I'd like the user to easily be able to bring into view the metadata of the photo. That is where I wanted the 'slide android view into view' functionality similar to that found in the Launcher and/or the SlidingDrawer. Thanks for any help. Gustav -- 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, and so won't reply to such e-mails. 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 -- 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: How to let Android create my activity within the process which the launcher activity lies in?
Thank your very much! BlablaManager actually handles the image editing session information. One task shall have only one session. I understand your point. Now I quit using singleton stead using a static field of the main activity to reference the instance of BlablaManager, and then any other activities within my application share the instance with this static field. Currently it works fine. But I don't know whether it's OK as design in Android. Please give your comments. Thanks! On May 27, 10:29 am, Dianne Hackborn hack...@android.com wrote: On Tue, May 26, 2009 at 7:11 PM, Oceanedge newsforhar...@gmail.com wrote: Yeah, but I think my singleton class can works well with the OS handle Task as a single process. But in Android, Task can be cross linux process. So my two activity instances are created by two tasks. Because you have set up your app to behave this way. But they are all created within one Dalvik VM linux process, and Dalvik VM didn't distinguishes the static field(mInstance) which reference the singleton class instance for two activity instances belongs to two different tasks. Then I encounter the problem. Yes, all instances of a particular activity run in a single process. This for the most part a feature, and there are actually a lot of things that use singletons to take advantage of this. So I think the problem occurs because Android define a Task can be cross process, but Dalvik VM still handles static field based on process. So do you think this is a little confused? It is working exactly as intended, which is fine. Because if we think Activity as a module in a Task, for other OS, normally a Task is a single process, and that process can have modules(dynamic link library). Static variable can also be defined in dynamic link library, but that static variable will be map in the process which load the library. That static variable won't be shared to different processes (Tasks). I would suggest not thinking of Android tasks in any way like what you think tasks are on other platforms. The -only- thing a task is on Android is a way to organize related activities. My singleton class is implemented like this: BlablaManager { public static BlablaManager getInstance() { if (mInstance == null) { mInstance = new BlablaManager (); } return mInstance; } private BlablaManager() { } private static BlablaManager mInstance = null; } That's fine, and you get to share one instance of this with all things running in a process. Matt suggested to use the Application context to synchronize access to the singleton. But I still not very clear about how to implement. Should I add a context parameter to getInstance() and maintain a list of application context reference, so I can return different instance of BlablaManager for different application context? Honestly, I think at this point you should stop doing whatever you are doing which is causing your activity to be used in multiple different tasks, because this sounds like it isn't the behavior you want. But you haven't really clearly described how you are currently setting up your activity flow, nor exactly how you want it to work, so it is hard to provide more help here. And if you really do want your activity to be in separate tasks, then you do indeed need multiple instances of it, and it sounds like whatever this BlablaManager thing is should just not be a singleton. -- 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, and so won't reply to such e-mails. 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 update an app itself?
http://www.tomgibara.com/android/veecheck/ Al. --- * Written an Android App? - List it at http://andappstore.com/ * == 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. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Kaka Sent: 27 May 2009 08:11 To: Android Developers Subject: [android-developers] How to update an app itself? Hi, all I want to add an auto update function to an app. This app can download a new version of itself, i.e., a new apk file. After finishing downloading this apk file, how to let the app update? I'm going to try this by using PackageManager.installPackage(), but failed. The system said no one has the permission to install a package, even I had added uses-permission android:name=android.permission.INSTALL_PACKAGES / to the manifest.xml 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: detecting idle, off hook and ringing
Thanks a lot!! that finally works ! On May 26, 4:59 pm, Mark Murphy mmur...@commonsware.com wrote: I add : �...@override public void onResume() { super.onResume(); telephone.listen (psl, android.telephony.PhoneStateListener.LISTEN_SERVICE_STATE); } @Override public void onDestroy() { telephone.listen (psl, android.telephony.PhoneStateListener.LISTEN_NONE); } but still ... i tried everything and compared parts of my program with solutions i found on this group and i don't understand why this doesn't work !!! Try LISTEN_CALL_STATE. LISTEN_SERVICE_STATE is whether or not you have a cell signal. LISTEN_CALL_STATE is whether or not there is a call going on. -- 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: Help for decoding the camera data from the PreviewCallback
So that means I cannot decode continuous frames of data to bitmap in PreviewCallback because data is encoded in raw YCbCr which cannot be decoded.The only way I can do this is using onPictureTaken method of PictureCallback where data is encoded in jpeg format which can be easily decoded. This is however a slow process and I really wish that preview frames could be decoded. Below link demonstrates how a user decodes the YUV byte[] buffer from the preview callback and converts it into an ARGB_ int[] buffer http://groups.google.com/group/android-developers/msg/d3b29d3ddc8abf9b There is also an issue that discusses about applying setPreviewFormat() to set PixelFormat.JPEG at http://code.google.com/p/android/issues/detail?id=823 I would really appreciate if anyone could decode the YUV byte[] buffer from the preview callback and converts it into bitmaps. On Wed, May 27, 2009 at 12:19 PM, Jason Proctor ja...@particularplace.comwrote: sorry man, the data from the camera preview is encoded in raw YCbCr from the camera hardware, it's not readable in any sensible time frame by anything available in the Android SDK. Sujay has the wrong end of the stick again, he's talking about the image that's captured when the camera actually takes a picture. the preview data is in a completely different format and is not directly usable. ask me, i tried it :-) hth j Does anyone know how to decode the camera data from the PreviewCallback? I need to capture camera preview frames and process the bitmap obtained by decoding the frames before displaying. -- jason.software.particle --~--~-~--~~~---~--~~ 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: Progress bar update help
Is this correct? It works accordingly. But I m not sure about the performance issues. I am relatively new to Android. Please help private void testDownload1(String urlStr) { try { progress = 0; URL sourceURL = new URL(urlStr); URLConnection con = sourceURL.openConnection(); InputStream inStream=(InputStream)con.getContent(); pbMax =con.getContentLength(); // max length of the progress bar FileOutputStream outStream = new FileOutputStream(sdcard/ tmz1.tr3); byte[] bytes = new byte[20480]; int readBytes = inStream.read(bytes); while (readBytes 0) { try { Thread.sleep(time); } catch (InterruptedException e) { e.printStackTrace(); } this.runOnUiThread(new Runnable() { public void run() { pBar.setProgress(progress); pBar.invalidate(); } }); outStream.write(bytes, 0, readBytes); readBytes = inStream.read(bytes); progress += readBytes; } inStream.close(); outStream.close(); } catch (IOException e) { Log.e(TAG, error: + e.toString()); } } --~--~-~--~~~---~--~~ 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] File download
Hi all, My app downloads a file from the web into sd card. Works well. Now I want to put a button to pause the download and resume it later. Download is being done in a background thread. Any suggestions folks? 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] File download
Hi all, My app downloads a file from the web into sd card. Works well. Now I want to put a button to pause the download and resume it later. Download is being done in a background thread. Any suggestions folks? 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: Help for decoding the camera data from the PreviewCallback
I use my own decoder, but here you can find another one (December 2, 2008): http://groups.google.com/group/android-developers/browse_thread/thread/c85e829ab209ceea/ Again, all of this is very slow under the currently available APIs. On May 27, 9:43 am, lori lori loril...@gmail.com wrote: So that means I cannot decode continuous frames of data to bitmap in PreviewCallback because data is encoded in raw YCbCr which cannot be decoded.The only way I can do this is using onPictureTaken method of PictureCallback where data is encoded in jpeg format which can be easily decoded. This is however a slow process and I really wish that preview frames could be decoded. Below link demonstrates how a user decodes the YUV byte[] buffer from the preview callback and converts it into an ARGB_ int[] bufferhttp://groups.google.com/group/android-developers/msg/d3b29d3ddc8abf9b There is also an issue that discusses about applying setPreviewFormat() to set PixelFormat.JPEG athttp://code.google.com/p/android/issues/detail?id=823 I would really appreciate if anyone could decode the YUV byte[] buffer from the preview callback and converts it into bitmaps. --~--~-~--~~~---~--~~ 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] start a ssh tunnel with an already known pre-shared key (psk)
Hello, I have a pre-shared key (psk) that i have received from an external way (GBA : Generic Bootstrap Architecture). I wanna know if you know how to create a ssl tunnel on a https server using my local psk ? Have you ever try such kind of system ? Cordialement Thierry GAYET NextInnovation.org +33(0)663.849.589 --~--~-~--~~~---~--~~ 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: Progress bar update help
Is this correct? It works accordingly. But I m not sure about the performance issues. I am relatively new to Android. Please help private void testDownload1(String urlStr) { try { progress = 0; URL sourceURL = new URL(urlStr); URLConnection con = sourceURL.openConnection (); InputStream inStream=(InputStream) con.getContent(); pbMax =con.getContentLength (); // max length of the progress bar FileOutputStream outStream = new FileOutputStream(sdcard/ tmz1.tr3); byte[] bytes = new byte[20480]; int readBytes = inStream.read(bytes); while (readBytes 0) { this.runOnUiThread(new Runnable() { public void run() { pBar.setProgress (progress); pBar.invalidate(); } }); outStream.write(bytes, 0, readBytes); readBytes = inStream.read(bytes); progress += readBytes; } inStream.close(); outStream.close(); } catch (IOException e) { Log.e(TAG, error: + e.toString()); } } --~--~-~--~~~---~--~~ 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: Input for App Widgets? Search Widget?
So from your reply i gather you're implying theres no way to do it underthe current appwidget apis available to us? On May 27, 2:21 pm, Jean-Baptiste Queru j...@android.com wrote: If I remember correctly, the search widget is part of the home app, it's not implemented with the app widget APIs. JBQ On Tue, May 26, 2009 at 9:18 PM, SurtaX garylo@gmail.com wrote: Hi I have noticed that alot of the basic input controls are not implemented for app widgets (Ie. EditText). I'm wondering how then does the search widget have the text input bar? Could someone please give me a snippet of the layout to achieve the same effect? text input and autocomplete? -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. Questions sent directly to me that have no reason for being private will likely get ignored or forwarded to a public forum with no further warning. --~--~-~--~~~---~--~~ 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: What is the difference between thread and service?
From what I under understand, your application having a service running is basically just holding a (service) object that tells Android not to kill your process. The service onStart methods etc. still run in your main thread and are subject to Application not responding. You could have a thread directly in your activity without using a service, but Android might kill your Activity/process when you're not looking. Michael --~--~-~--~~~---~--~~ 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] Resumeable downloads??
How to resume a download ? --~--~-~--~~~---~--~~ 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] Data Roaming and 2G only mode Setting
Dear all, Recently, I want to develop an application for myself to do some settings. But I really can't understand how to enable/disable data roaming and setting 2G mode only as Settings.apk provided. Is there any way to set these two attributes? Best regards, Augustin. --~--~-~--~~~---~--~~ 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] Maximum size of onSaveInstanceState bundle
I have an activity that loads a bitmap from a database when it starts up. Due to the nature of the app, should the activity be killed and recreated at a later point, I cannot guarantee that the bitmap in the database is still the same one. Should I save the bitmap to the bundle to be able to ensure I am still having the same data available when my activity is restored? The bitmap may be multiple 100 kilobytes in size, and I worry that saving data this large would defeat the whole purpose of having my activity killed by Android in the first place. Is there a fixed or recommended limit to what amount of data should be stored in the bundle? Micahel --~--~-~--~~~---~--~~ 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 setting borders for view/window
hi, could anyone plz hlp me with drawing borders for views??? i jus wanna place my view/window inside a rectangle border??? any suggestions sample codes would be of great help... thanks in advance... Regards, Sujay --~--~-~--~~~---~--~~ 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: Widget proxy drawable
I had tried it, but when I want to use a selector for my button, it seems the dither can't work again. res/drawable/keyboard_speeddial_normal_dithered.xml: nine-patch xmlns:android=http://schemas.android.com/apk/res/android; android:src=@drawable/keydialer_normal android:dither=true / res/drawable/keyboard_speeddial.xml: selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/keyboard_speeddial_press / item android:state_focused=true android:drawable=@drawable/keyboard_speeddial_focus / item android:drawable=@drawable/ keyboard_speeddial_normal_dithered / /selector I set the keyboard_speeddial as the background of a RelativeLayout. By the way, if I wrap the keyboard_speeddial into another dither xml file such like: res/drawable/keyboard_speeddial_dithered.xml: nine-patch xmlns:android=http://schemas.android.com/apk/res/android; android:src=@drawable/keyboard_speeddial android:dither=true / It will cause a runtime exception. On 5月6日, 上午3時37分, Jeff Sharkey jshar...@android.com wrote: It also works for creating dithered 9-patches: res/drawable/proxy_nine_patch.xml: nine-patch android:src=@drawable/original_nine_patch android:dither=true / j On Tue, May 5, 2009 at 11:32 AM, Romain Guy romain...@google.com wrote: It's just a typo. Here's a proxy example: bitmap android:src=@drawable/my_png_image / Doing so lets you for instance enable or disable dithering using android:dither. On Tue, May 5, 2009 at 10:25 AM, Ward Willats goo...@wardco.com wrote: In the widget design guidelines under widget graphics tips and tricks is says In some cases, devices that have low pixel depths that can cause visual banding and dithering issues. To solve this, application developers should pass assets through a proxy drawable defined as XML:. This technique references the original artwork, in this case background.9.png, and instructs the device to dither it as needed. Jus Eh? I mean, I can see an .xml drawable that points to my .png (not sure which type I would use) but I don't understand what this http-method-ish XML: syntax is referencing. Can someone elaborate on this whole technique? Thanks -- Ward -- 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 -- Jeff Sharkey jshar...@google.com --~--~-~--~~~---~--~~ 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] Application (.apk) Size
Hi, What is the maximum size allowed for an android application? Regards, Abdul Muyeed M --~--~-~--~~~---~--~~ 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: DDMS.. file explorer problem
one observation : Whenever I am puling a file from emulator using DDMS fileexplorer / data/app , one process is created in which file explorer window is continuosly refreshed and emulator remains engaged. So I could not run any application on that instance. To run a new application, I have to close this emulator instance and create a new instance again. What can be the problem?? Please help. regards, Asif. On May 26, 10:58 am, Asif k asifk1...@gmail.com wrote: Hi all, In the DDMS, I had used FileExplorer and visited /data/app folder to see the .apk files installed in the emulator. After that I had minimized the data folder and thus stopped that process. But I am observing that this /data/app folder is opening again and again automatically. I dont know what is the reason and how to stop it. Please help.. Thanks, Asif --~--~-~--~~~---~--~~ 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: Service stops running in standby mode
The problem here is, imho, that cell location changes cannot be detected with a broadcast receiver, but instead we have to use a listener. A broadcast receiver would just be activated/started when the cell location has changed. The listener though has to run all the time to be able to listen. As far as I understand, there is no other way as to use a permanent wake lock to listen to cell changes. I use the boot completed broadcast receiver to start my listener. Otherwise I would have to start the app/listener manually after each boot. This is the code I use for getting the wake lock: final PowerManager pm = (PowerManager) context.getSystemService (Context.POWER_SERVICE); wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); wakeLock.acquire(); I use PARTIAL_WAKE_LOCK because I want the screen to go off, though the cpu should keep processing my listener. The problem might be, that I have no context object withing the listener. So I pass the context object from the boot completed receiver to my listener. Could this be the problem? br and thanx for your help, ash On 26 Mai, 01:13, Mark Murphy mmur...@commonsware.com wrote: wrote: I'm trying to log the phone's cell movement. So I created a PhoneStateListener that is being called when the CellLocation has been changed. Then it informs a logging service to write that new cell information to a log file. This works as long as the screen is on. But when the screen goes off, the logging stops. Correct. The PhoneStateListener gets loaded on boot time public class CellStateListener extends PhoneStateListener { public void onCellLocationChanged(CellLocation location) { ... //this is the logging service which is informed when the cell location changes listener.onCellChanged(mcc, mnc, lac, cid); ... } } If you are doing this from a BroadcastReceiver, that is fairly evil. I tried to use the PowerManager to set a PARTIAL_WAKE_LOCK in my logging service. But this doesn't work. You may be using the WakeLock incorrectly, then. My guess, from your symptoms, is that the device is falling asleep, which is why you are not detecting new cell location updates. Bear in mind, though, that permanently holding a WakeLock, so you can find out about cell location updates, will mean the CPU never stops, and your users will be inclined to beat you about the head with a tire iron due to the vastly reduced battery life. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Development Wiki:http://wiki.andmob.org --~--~-~--~~~---~--~~ 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 MapActivity on the 1.5 release
Yes, I did. Still getting the same error: 05-27 10:55:21.282: ERROR/AndroidRuntime(743): Uncaught handler: thread main exiting due to uncaught exception 05-27 10:55:21.342: ERROR/AndroidRuntime(743): java.lang.NoClassDefFoundError: main.ViewContactActivity 05-27 10:55:21.342: ERROR/AndroidRuntime(743): Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class 05-27 10:55:21.342: ERROR/AndroidRuntime(743): at dalvik.system.DexFile.defineClass(Native Method) 05-27 10:55:21.342: ERROR/AndroidRuntime(743): at dalvik.system.DexFile.loadClass(DexFile.java:193) 05-27 10:55:21.342: ERROR/AndroidRuntime(743): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203) 05-27 10:55:21.342: ERROR/AndroidRuntime(743): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 05-27 10:55:21.342: ERROR/AndroidRuntime(743): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) Any ideas? Thanks. On May 22, 6:57 pm, arnouf arnaud.far...@gmail.com wrote: hi, Did you generate your emulator image with AVD and using target 3? This type of emulator contains maps.jar in native and all is ok. Regards On May 22, 4:17 pm, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, I have a problem with firing an activity that extends MapActivity. When it gets called, it throws a java.lang.NoClassDefFoundError... not sure what this is supposed to mean. I think something goes wrong with the external implementation of the maps API (maps.jar). Has anyone come across that problem? Here's the srack trace: 05-22 15:13:36.723: ERROR/AndroidRuntime(445): java.lang.NoClassDefFoundError: main.ViewContactActivity 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at main.ContactsActivity.onOptionsItemSelected(ContactsActivity.java:311) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.app.Activity.onMenuItemSelected(Activity.java:2085) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected (PhoneWindow.java:820) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java: 139) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:813) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.view.menu.IconMenuView.invokeItem (IconMenuView.java:519) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.view.menu.IconMenuItemView.performClick (IconMenuItemView.java:122) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.view.View.onTouchEvent(View.java:3828) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.widget.TextView.onTouchEvent(TextView.java:6291) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.view.View.dispatchTouchEvent(View.java:3368) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.policy.impl.PhoneWindow $DecorView.dispatchTouchEvent(PhoneWindow.java:1691) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.view.ViewRoot.handleMessage(ViewRoot.java:1525) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.os.Handler.dispatchMessage(Handler.java:99) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.os.Looper.loop(Looper.java:123) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at android.app.ActivityThread.main(ActivityThread.java:3948) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at java.lang.reflect.Method.invokeNative(Native Method) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at java.lang.reflect.Method.invoke(Method.java:521) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at dalvik.system.NativeStart.main(Native Method) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at dalvik.system.DexFile.defineClass(Native Method) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at dalvik.system.DexFile.loadClass(DexFile.java:193) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203) 05-22 15:13:36.723: ERROR/AndroidRuntime(445): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
[android-developers] Exit SMS-app after sending SMS
Hi, Iam a beginner in android development, wanted to know whether following usecase is possible or not Supposing I have 'MyActivity' which starts the in-built SMSapplication using Intent. In SMS activity, when I Click on 'Send', SMS should be send successfully and it should eixt the application without being inside the SMS application . I mean it should come back to 'MyActivity'. Please, let me know if this usecase works, or any suggestions regarding this is highly appreciated. Best Regards, Bindu --~--~-~--~~~---~--~~ 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] Decrypt in Android using RSA
hi, My question is if i am using RSA as an argument to Cipher.getInstance method while encryption and while i am decrypting it with RSA with the RSA/ECB/PKCS1Padding as an argument i am getting bad padding exception . If i am using RSA only in both the case it is woring fine but getting some random output not the original string ... which padding should i use ? Thnx 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: Decrypt in Android using RSA
A bad padding exception usually means your data has been corrupted in transit. If you're doing using an intermediate format (e.g. a hex string) you'll need to make sure your decoding gives the same result as the originally encoded string. Al. --- * Written an Android App? - List it at http://andappstore.com/ * == 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. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Sam Sent: 27 May 2009 12:19 To: Android Developers Subject: [android-developers] Decrypt in Android using RSA hi, My question is if i am using RSA as an argument to Cipher.getInstance method while encryption and while i am decrypting it with RSA with the RSA/ECB/PKCS1Padding as an argument i am getting bad padding exception . If i am using RSA only in both the case it is woring fine but getting some random output not the original string ... which padding should i use ? Thnx 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] Calendar Content Provider
Hi, Is there a way to read data from android.provider.Calendar? It's URI is mentioned here (http://developer.android.com/guide/topics/providers/ content-providers.html), so I thought its data should somehow be accessible. On the other hand it's clearly not within the android.provider package... any thoughts? 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] PAN services
Hi All, can someone let me know what exact services can be used from the PANU when connected to a NAP/GN with some examples. can we connect only to the internet service of the NAP or can we use all the services offered by the NAP.for eg , if there is some music player running in the NAP, can PANU use that service also ? can some one clarify these questions? Regards, Bhargavi --~--~-~--~~~---~--~~ 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] File download help
This is a snip of my code URL sourceURL = new URL(urlStr); URLConnection con = sourceURL.openConnection(); con.setRequestProperty(Content-Range, bytes 0-200/+pbMax); //sets a chunck to download InputStream inStream=(InputStream)con.getContent(); int pbMax =con.getContentLength(); Log.w(TAG,+pbMax); //but this returns the full length Help please? 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] Identifying HSDPA usage
Is is possible to find out if HSDPA is used by the phone? telephonyManager.getNetworkType() only returns UMTS which seems to include HSDPA. Since HSDPA is based on UMTS there is nothing wrong with that:However, there is a significant bandwidth difference between UMTS and HSDPA. HSDPA is actually something like 3.5G. Any idea how a HSDPA connection could be identified? --~--~-~--~~~---~--~~ 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: Unbale to opem IM app.
you have to open the project under IM/samples/PluginDemo with eclipse, build and install the project to emulator. 2009/4/29 srinivas nivasn...@gmail.com Hi, On cupcake builds we are unable to open IM app from main menu. When we open the app, it gets closed immediately and adb logs show the following error. 01-07 03:28:15.939 E/ImApp ( 3147): [IM.FrontDoorPlugin] no plugins found! bail... 01-07 03:28:16.139 E/IM ( 3147): Ignore bad IM frontdoor plugin: ResolveInfo{43780a30 com.android.im.app.FrontDoorPlugin p=0 o=0 m=0x108000}. No providers found 01-07 03:28:16.139 E/IM ( 3147): [onCreate] load plugin failed, no plugin found! It is trying to load some thirdpartyplugins in packages/apps/IM/src/ com/android/im/app/FrontDoorPlugin.java file. Here it is getting plugins count zero and after that the app gets closed. Can any one suggest what can be wrong? Do we need some thirdpartyplugins for this to work? Any pointers will be very very helpful. Thanks In advance, Srinivas --~--~-~--~~~---~--~~ 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: implementation of onDestroy for a service containing a worker or backround thread
Can I use the thread.join() mechanism? Basically, in the onDestroy() method of the service, I would send a message to the background thread and call join on the thread. The background thread would destroy it self after proper cleanup. But, what method should I use to exit the thread. Please note the background thread uses a looper to handle messages from the main thread. Or, pl. suggest some other method of implementing the above behavior. On May 27, 11:31 am, gautam_raychaudh...@hotmail.com wrote: Android may kill the process and thus the service running in the process, onceonDestroy() returns (after sending a message to the worker thread). But how will I make sure that the service has completed it's clean up operations (ex. saving some data on to some storage, etc...), if any? The main thread nevers gets blocked in any other scenario exceptonDestroy(). Do you have any other mechanism to achieve this behavior in the platform? On May 27, 2:23 am, Dianne Hackborn hack...@android.com wrote: Blocking inonDestroy() waiting for the background thread to complete basically defeats the purpose of doing work in a background thread. On Tue, May 26, 2009 at 7:09 AM, Gautam gautam_raychaudh...@hotmail.comwrote: Hi, I'm implementing a service that contains a thread to handle all time consuming operation. My core service logic is in a different thread than the ui or main thread. According to the Android document, when the OS plans to free some system resource, it will callonDestroy () on the service and only whenonDestroy() returns it will kill the process hosting the service, thus giving opportunity to the service to cleanup. Now, whenonDestroy() is called, I want to send a message to my service thread to do the necessary cleanup. Only when the service thread acknowledges that the cleanup or shutdown is complete,onDestroy () should return. I could find a way to send asynchronous messages to threads and the corresponding processing of the messages, but not able to figure out how I need to implementonDestroy(), such that it would send a message to the service thread and should wait for a result, before returning. Appreciate if someone can comment on my understanding ofonDestroy () and provide some solution to the above problem. Thanks and Regards, Gautam. -- 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, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text -- 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: EMMA Code coverage and JUnit
Hi Deeps, Nice to hear that you are making progress. Are you using only the SDK, or are you building the entire android source code? Maybe your code is not instrumented to generate the coverage statistics and this would be why you are getting 0% of code coverage. Are you using the emma.jar provided on the Emma site, or the one built in Android source code?? I'll try to reproduce what you have done up to now here. I hope we can manage to get a final solution for this matter. BR Felipe On Tue, May 26, 2009 at 3:26 AM, Deeps l.prade...@gmail.com wrote: Felipe, Atlast i am half way through in getting the coverage file. But..I dont see any required output in that file. I created a sdcard. Then i run my Instrumentation with the following command, # am instrument -e coverage true -w com.app.exam.tests/ android.test.InstrumentationTestRunner First I got error, Is EMMA jar included. So, i added the amma.jar in the build path. Again I ran the same command. Then, I found a coverage file , coverage.ec while navigating thro file explorer of ddms. I pulled it to the desktop and imported the session to Coverage field in eclipse. Its unfortunate that I dont see any code coverage but i could see only the number of instructions.Even though my test cases has run and the results has displayed, I am getting 0.0% code coverage.. Can u please try this and share ur experience.. Deeps On May 21, 9:25 pm, Felipe Ramos felipe.wo...@gmail.com wrote: Hi deeps, I'm stuck on the point where I need to run the instrumented tests on the emulator. I could not find a way yet to make the emulator believe that theemma.jar is already installed on it. Also, I don't know if there is a way of enablingEMMAinstrumentation using the SDK. I have not tried that yet. I'm using theandroidfull source, compiling it from scratch. I think I'm close, at least to run it on the emulator, but on this past week I was too busy and could not investigate more about this issue. I'm planning to put everything I know on a blog or something like that, at least to help the other developers that are trying to makeEMMAwork onAndroid, since I could not find relevant references on this matter from the Google guys. I'll send later a step by step of what I made up to now... I'm currently at my job, so I don't have much time to write right now. BR Felipe On May 21, 10:00 am, Deeps l.prade...@gmail.com wrote: Felipe Ramos, Did u end up somewhere..? I am not able to go ahead with this.. deeps- 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: Unbale to opem IM app.
Hi all, I got errors when I install the plugin, sometime. I build a system image from the source code and copy the system.img to androidsdk1.5/platforms/android-1.5/images/. When I build the sample IM plugin and install it. Sometime I got error: package com.android.im.plugin.demo has no signatures that match those in shared user android.uid.im; ignoring It seems that the demo plugin use same user id as the IM.apk in system image. But how to get the signature of the IM app in system image and how to add the signature to demo plugin? 2009/5/27 Zhihong GUO gzhh...@gmail.com you have to open the project under IM/samples/PluginDemo with eclipse, build and install the project to emulator. 2009/4/29 srinivas nivasn...@gmail.com Hi, On cupcake builds we are unable to open IM app from main menu. When we open the app, it gets closed immediately and adb logs show the following error. 01-07 03:28:15.939 E/ImApp ( 3147): [IM.FrontDoorPlugin] no plugins found! bail... 01-07 03:28:16.139 E/IM ( 3147): Ignore bad IM frontdoor plugin: ResolveInfo{43780a30 com.android.im.app.FrontDoorPlugin p=0 o=0 m=0x108000}. No providers found 01-07 03:28:16.139 E/IM ( 3147): [onCreate] load plugin failed, no plugin found! It is trying to load some thirdpartyplugins in packages/apps/IM/src/ com/android/im/app/FrontDoorPlugin.java file. Here it is getting plugins count zero and after that the app gets closed. Can any one suggest what can be wrong? Do we need some thirdpartyplugins for this to work? Any pointers will be very very helpful. Thanks In advance, Srinivas --~--~-~--~~~---~--~~ 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] SDK 1.5 CPU usage
Since installing the 1.5 SDK, I have noticed a significant slowdown in my computer when I have the emulator running. I left the emulator running when I went to bed last night, and this morning brought home the reason why : In task Manager, when I sorted by CPU Times the top five were the following: Emulator 7:25:30 System Idle Process 2:55:49 Eclipse 2:08:07 Iexplore 0:46:13 System 0:11:44 FYI, I'm running XP Pro with 4 gig's of RAM, so memory shouldn't have anything to do with it. I'm not really complaining. If that is normal, I'll live with it, but I don't remember ever seeing an application use more CPU time than the System Idle Process (unless it was about to crash :-)). Is there some setting I can change that would help this? Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 www.bgies.com www.truckerphone.com www.EDI-Easy.com www.EDI-Simple.com - Moderation in everything, including abstinence --~--~-~--~~~---~--~~ 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] Check Download freeware for you
http://free-belajaronline.blogspot.com/2009/05/download-free-wma-to-mp3-converter.html Download Free WMA to mp3 converter Windows http://free-belajaronline.blogspot.com/2009/05/nokia-ovi-store-launch-is-complete.html Nokia Ovi Store Launch Is A Complete Disaster http://free-belajaronline.blogspot.com/2009/05/openx-keeps-on-growing-raises-10.html OpenX Keeps On Growing, Raises $10 Million More http://free-belajaronline.blogspot.com/2009/05/kindle-notes-and-highlights-now.html Kindle Notes And Highlights Now Accessible On the http://free-belajaronline.blogspot.com/2009/05/when-13-billion-people-are-too-many.html When 1.3 Billion People Are Too Many http://free-belajaronline.blogspot.com/2009/05/facebook-takes-that-200-million.html Facebook Takes That $200 Million Investment From T http://free-belajaronline.blogspot.com/2009/05/live-blogging-facebook-conference-call.html Live Blogging The Facebook Conference Call http://free-belajaronline.blogspot.com/2009/05/taking-yahoo-meme-for-spin-its-mediocre.html Taking Yahoo Meme For A Spin: It’s A Mediocre Tumb http://free-belajaronline.blogspot.com/2009/05/now-you-can-avoid-euro-disney-in-google.html Now You Can Avoid Euro Disney In Google Earth, Jus http://free-belajaronline.blogspot.com/2009/05/microsofts-bing-logo-leaked-by-way-of.html Microsoft’s Bing Logo Leaked By Way Of Favicon? http://free-belajaronline.blogspot.com/2009/05/awesome-potential-of-retweet.html The Awesome Potential Of Retweet http://free-belajaronline.blogspot.com/2009/05/it-may-not-be-making-tv-show-but.html It May Not Be Making A TV Show, But Twitter Sure H http://free-belajaronline.blogspot.com/2009/05/feel-dailyburn-gyminee-gets-new-name.html Feel The DailyBurn: Gyminee Gets A New Name, Raise http://free-belajaronline.blogspot.com/2009/05/ourparents-launches-free-customized.html OurParents Launches Free Customized Service To Fin http://free-belajaronline.blogspot.com/2009/05/contenture-launches-micropayment-based.html Contenture Launches. Micropayment-Based Freemium M http://free-belajaronline.blogspot.com/2009/05/need-witty-app-for-that-phrase-theres.html Need A Witty “App For That” Phrase? There’s An App http://free-belajaronline.blogspot.com/2009/05/705-am-techcrunch-topsy-search-launches.html 7:05 AM TechCrunch Topsy Search Launches: ReTweets http://free-belajaronline.blogspot.com/2009/05/topsy-search-launches-retweets-are-new.html Topsy Search Launches: ReTweets Are The New Curren http://free-belajaronline.blogspot.com/2009/05/exclusive-video-mark-zuckerberg-and.html Exclusive Video: Mark Zuckerberg And Yuri Milner T http://free-belajaronline.blogspot.com/2009/05/multiply-40-social-network-photo.html Multiply 4.0: Social Network Photo Sharing Done Ri http://free-belajaronline.blogspot.com/2009/05/adify-opens-up-api-to-expand-technology.html Adify Opens Up API To Expand Technology For Ad Net http://free-belajaronline.blogspot.com/2009/05/berita-berita-indonesia-27-maret-2009.html Berita-Berita Indonesia 27 Maret 2009 | Surya Onli http://free-belajaronline.blogspot.com/2009/05/indonesia-berita-27-maret-2009-detikcom.html Indonesia Berita 27 Maret 2009 - detik.com http://free-belajaronline.blogspot.com/2009/05/internet-explorer-8-tip-hide-text-and.html Internet Explorer 8 Tip - Hide Text And Display Ic http://free-belajaronline.blogspot.com/2009/05/1247-pm-tech-dreams-iconfinder.html 12:47 PM Tech Dreams IconFinder – Excellent Search http://free-belajaronline.blogspot.com/2009/05/iconfinder-excellent-search-engine-to.html IconFinder – Excellent Search Engine To Download H http://free-belajaronline.blogspot.com/2009/05/meet-your-april-youperform-contest.html Meet Your April YouPerform Contest Winners http://free-belajaronline.blogspot.com/2009/05/download-unborn-2009-movie.html Download The Unborn (2009) | Movie http://free-belajaronline.blogspot.com/2009/05/download-va-hit-list-music.html Download VA - The Hit List | Music http://free-belajaronline.blogspot.com/2009/05/download-super-mario-collections-2009.html Download Super Mario Collections 2009 | Games http://free-belajaronline.blogspot.com/2009/05/download-avg-internet-security-v85339.html Download AVG Internet Security v8.5.339 http://free-belajaronline.blogspot.com/2009/05/download-kelly-clarkson-all-i-ever.html Download Kelly Clarkson - All I Ever Wanted (2009) http://free-belajaronline.blogspot.com/2009/05/tribute-to-blink-182-vol-2.html A Tribute to Blink-182 VOL 2 http://free-belajaronline.blogspot.com/2009/05/meaningful-tribute-to-fallen-soldiers.html A meaningful tribute to fallen soldiers, on Google http://free-belajaronline.blogspot.com/2009/05/find-right-music-for-your-workout-with.html Find the right music for your workout with Beatsca http://free-belajaronline.blogspot.com/2009/05/may-26-2009-download-squad-embed-flash.html May 26, 2009 Download Squad Embed Flash games on y http://free-belajaronline.blogspot.com/2009/05/embed-flash-games-on-your-site-with.html Embed Flash games on
[android-developers] Re: Exit SMS-app after sending SMS
You can use intent.putExtra(exit_on_sent, true) for your needs I am struck in a problem, wherein on passing intent to Native messaging application, it opens up compose window and waits for user intervention to send the SMS (by clicking on send button). Could you get your code up, wherein it sends the sms automatically without user intervention? On Wed, May 27, 2009 at 4:39 PM, Kasmoori Bindu bindukasmo...@gmail.comwrote: Hi, Iam a beginner in android development, wanted to know whether following usecase is possible or not Supposing I have 'MyActivity' which starts the in-built SMSapplication using Intent. In SMS activity, when I Click on 'Send', SMS should be send successfully and it should eixt the application without being inside the SMS application . I mean it should come back to 'MyActivity'. Please, let me know if this usecase works, or any suggestions regarding this is highly appreciated. Best Regards, Bindu --~--~-~--~~~---~--~~ 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] Can't repo sync
Trying to 'repo sync' into a tree which was fine last Friday: From git://android.git.kernel.org/platform/system/wlan/ti * [new tag] android-1.5r2 - android-1.5r2 Fetching projects: 100% (115/115), done. Syncing work tree: 59% (67/113) fatal: Untracked working tree file 'docs/html/sdk/1.0_r1/requirements.jd' would be overwritten by merge. Syncing work tree: 76% (86/113) fatal: Untracked working tree file 'res/drawable/wallpaper_lake.jpg' would be overwritten by merge. Syncing work tree: 100% (113/113), done. error: frameworks/base/: platform/frameworks/base checkout refs/ remotes/korg/cupcake error: packages/apps/Launcher/: platform/packages/apps/Launcher checkout refs/remotes/korg/cupcake How do I work around this? --~--~-~--~~~---~--~~ 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] Problem with multi select listview with default selected List Items.
HI, I want to create multi select listview with checkbox. and also make checked = true for some of the item based on some business rule. I can get the list view with multiple choice option working but I am not able to load some of the item as default checked when list view first loaded. I tried using custom list adpater with following code, but its not working at all. if (convertView == null) { convertView = mInflater.inflate(android.R.layout.simple_list_item_multiple_choice, null); holder = new ViewHolder(); holder.checkbox = (CheckedTextView) convertView.findViewById(android.R.id.text1); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } //holder.checkbox.setChecked(true); String mvalue = ((Item)lv.get(position)).getValue(); holder.checkbox.setText(mvalue); if(mSelectedValues != null mSelectedValues.length 0) { boolean blnSetChecked = false; for(String s : mSelectedValues) { if(s.equalsIgnoreCase(mvalue)) { blnSetChecked = true; break; } } holder.checkbox.setChecked(blnSetChecked); } else holder.checkbox.setChecked(false); return convertView; I have also set follwoign property for listview after setting custom adapter. lvList.setItemsCanFocus(false); lvList.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); Please help me to get this working. 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: Device Update!!!
I need to update the phone. 1- I developed an application using API number 3 so will the firmware 1.5 be enough ??? 2- I just got the phone and don't want to screw it up, however the process looks very simple. In case I screwed it up, can't I just restore to factory setttings? thanks On May 26, 5:16 pm, schwiz sch...@gmail.com wrote: Im confused you want toupdateyour phone, or your emulator? for your phone here is some directions, but it is for theupdatefrom 1.1 to 1.5 so you might run into problems.http://androidguys.com/?p=5235 toupdateyour emulator just right click on your project and goto properties, then android, then setdevicetarget to 1.5 (assuming you have the latest sdk on your computer) On May 26, 3:45 pm, Georgy georgearna...@gmail.com wrote: Hello, I developed an application that works perfectly with the emulator however mydevicestill has API 1.0 isntalled on it and when I try to run the application on it (from Eclipse) I am getting: ERROR: Application requires API version 3.DeviceAPI version is 1 (Android 1.0). any ideas how can Iupdatethe phone? 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: adb push wtf
Hey all, in case anyone else has a similar problem - here is a bit of code that might help. All I do is write a dummy file to the location I want to put a file to, making it world writable (not sure if I have to sue this flag or not, but it does not matter really, as i will only use this script once), then push right on top of it public class Playback extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { FileOutputStream fs = openFileOutput(ff.mp4, Context.MODE_WORLD_WRITEABLE); fs.close(); } catch (FileNotFoundException e2) { e2.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } Run that to create the correct folders and files (org.you.yourapp.whatever/files/yourfile.woohoo), then push squid$ adb -d push ~/Desktop/ff.mp4 /data/data/org.test/files/ff.mp4 failed to copy '/Users/squid/Desktop/ff.mp4' to '/data/data/org.test/ files/ff.mp4': Permission denied squid$ adb -d push ~/Desktop/ff.mp4 /data/data/org.test/files/ff.mp4 HTH Hamy On Apr 6, 10:36 am, Bo wang.b.fr...@gmail.com wrote: On Apr 5, 8:33 am, Mark Murphy mmur...@commonsware.com wrote: Bowrote: Would you please give a little more detail about pushing files to that app-local file sotre? I still got the permission denied when I was trying to push a file there (My phone don't have that files subdirectory). Then you can't push it there. Your application will need to do something to cause that folder to be created (e.g., call openFileOutput() from your application). Thank you~ I got it solved. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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: Exit SMS-app after sending SMS
Hi Vignesh, Thank you for the quick reply. Iam not sure whether it is possible to send SMS without user intervention but i think some button click or inturn some action should be there to make use of SMS service. However, if you want to send the SMS without invoking built-in SMS app, then you can through the following link http://mobiforge.com/developing/story/sms-messaging-android Best Regards, Bindu On Wed, May 27, 2009 at 6:32 PM, Vignesh vignesh.kart...@gmail.com wrote: You can use intent.putExtra(exit_on_sent, true) for your needs I am struck in a problem, wherein on passing intent to Native messaging application, it opens up compose window and waits for user intervention to send the SMS (by clicking on send button). Could you get your code up, wherein it sends the sms automatically without user intervention? On Wed, May 27, 2009 at 4:39 PM, Kasmoori Bindu bindukasmo...@gmail.comwrote: Hi, Iam a beginner in android development, wanted to know whether following usecase is possible or not Supposing I have 'MyActivity' which starts the in-built SMSapplication using Intent. In SMS activity, when I Click on 'Send', SMS should be send successfully and it should eixt the application without being inside the SMS application . I mean it should come back to 'MyActivity'. Please, let me know if this usecase works, or any suggestions regarding this is highly appreciated. Best Regards, Bindu --~--~-~--~~~---~--~~ 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: Device Update!!!
You could also get your app to run on the current device by updating the following entry in your AndroidManifest.xml file uses-sdk android:minSdkVersion=1 / -CF On May 27, 9:33 am, Georgy georgearna...@gmail.com wrote: I need to update the phone. 1- I developed an application using API number 3 so will the firmware 1.5 be enough ??? 2- I just got the phone and don't want to screw it up, however the process looks very simple. In case I screwed it up, can't I just restore to factory setttings? thanks On May 26, 5:16 pm, schwiz sch...@gmail.com wrote: Im confused you want toupdateyour phone, or your emulator? for your phone here is some directions, but it is for theupdatefrom 1.1 to 1.5 so you might run into problems.http://androidguys.com/?p=5235 toupdateyour emulator just right click on your project and goto properties, then android, then setdevicetarget to 1.5 (assuming you have the latest sdk on your computer) On May 26, 3:45 pm, Georgy georgearna...@gmail.com wrote: Hello, I developed an application that works perfectly with the emulator however mydevicestill has API 1.0 isntalled on it and when I try to run the application on it (from Eclipse) I am getting: ERROR: Application requires API version 3.DeviceAPI version is 1 (Android 1.0). any ideas how can Iupdatethe phone? 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] Upgrading android Application
Hi All, I am developing an Android application. In my application i have an option called Upgrade App. Once user select this option, i need to install (upgrade) the new version of the application. Can any one tell me how to do this through code? Thanks in Advance, Muthu Kumar K. --~--~-~--~~~---~--~~ 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: implementation of onDestroy for a service containing a worker or backround thread
Send a message to your background thread telling it to end. Your background thread: class MyBackgroundThread extends Thread { ... ... private boolean _isRunning = true; public void run() { ... ... while (running()) { ... // fetch and handle messages. ... } } .. private synchronized running() { return _isRunning; } public synchronized stopThread() { _isRunning = false; } ... } On May 27, 8:29 am, gautam_raychaudh...@hotmail.com wrote: Can I use the thread.join() mechanism? Basically, in the onDestroy() method of the service, I would send a message to the background thread and call join on the thread. The background thread would destroy it self after proper cleanup. But, what method should I use to exit the thread. Please note the background thread uses a looper to handle messages from the main thread. Or, pl. suggest some other method of implementing the above behavior. On May 27, 11:31 am, gautam_raychaudh...@hotmail.com wrote: Android may kill the process and thus the service running in the process, onceonDestroy() returns (after sending a message to the worker thread). But how will I make sure that the service has completed it's clean up operations (ex. saving some data on to some storage, etc...), if any? The main thread nevers gets blocked in any other scenario exceptonDestroy(). Do you have any other mechanism to achieve this behavior in the platform? On May 27, 2:23 am, Dianne Hackborn hack...@android.com wrote: Blocking inonDestroy() waiting for the background thread to complete basically defeats the purpose of doing work in a background thread. On Tue, May 26, 2009 at 7:09 AM, Gautam gautam_raychaudh...@hotmail.comwrote: Hi, I'm implementing a service that contains a thread to handle all time consuming operation. My core service logic is in a different thread than the ui or main thread. According to the Android document, when the OS plans to free some system resource, it will callonDestroy () on the service and only whenonDestroy() returns it will kill the process hosting the service, thus giving opportunity to the service to cleanup. Now, whenonDestroy() is called, I want to send a message to my service thread to do the necessary cleanup. Only when the service thread acknowledges that the cleanup or shutdown is complete,onDestroy () should return. I could find a way to send asynchronous messages to threads and the corresponding processing of the messages, but not able to figure out how I need to implementonDestroy(), such that it would send a message to the service thread and should wait for a result, before returning. Appreciate if someone can comment on my understanding ofonDestroy () and provide some solution to the above problem. Thanks and Regards, Gautam. -- 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, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- 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: Can't repo sync
Removing the two files in question and rerunning 'repo sync' seems to have fixed it. That said, how/why did this happen? Was this the correct solution? On May 27, 7:24 am, Gary Thomas samoht.y...@gmail.com wrote: Trying to 'repo sync' into a tree which was fine last Friday: From git://android.git.kernel.org/platform/system/wlan/ti * [new tag] android-1.5r2 - android-1.5r2 Fetching projects: 100% (115/115), done. Syncing work tree: 59% (67/113) fatal: Untracked working tree file 'docs/html/sdk/1.0_r1/requirements.jd' would be overwritten by merge. Syncing work tree: 76% (86/113) fatal: Untracked working tree file 'res/drawable/wallpaper_lake.jpg' would be overwritten by merge. Syncing work tree: 100% (113/113), done. error: frameworks/base/: platform/frameworks/base checkout refs/ remotes/korg/cupcake error: packages/apps/Launcher/: platform/packages/apps/Launcher checkout refs/remotes/korg/cupcake How do I work around this? --~--~-~--~~~---~--~~ 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] HorizontalScrollView reference text
From the page: http://developer.android.com/reference/android/widget/HorizontalScrollView.html You should never use a HorizontalScrollView with a ListView, since ListView takes care of its own scrolling. Most importantly, doing this defeats all of the important optimizations in ListView for dealing with large lists, since it effectively forces the ListView to display its entire list of items to fill up the infinite container supplied by HorizontalScrollView. Does this mean that ListView CAN scroll horizontally? Or is this just a copy/edit from the ScrollView 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: HorizontalScrollView reference text
Oops, it's a copy/paste. My bad :) Do you mind filing a bug at b.android.com? On Wed, May 27, 2009 at 7:08 AM, AusR austinjr...@gmail.com wrote: From the page: http://developer.android.com/reference/android/widget/HorizontalScrollView.html You should never use a HorizontalScrollView with a ListView, since ListView takes care of its own scrolling. Most importantly, doing this defeats all of the important optimizations in ListView for dealing with large lists, since it effectively forces the ListView to display its entire list of items to fill up the infinite container supplied by HorizontalScrollView. Does this mean that ListView CAN scroll horizontally? Or is this just a copy/edit from the ScrollView object? -- 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] using stl in Android
Hi, Is it possible to use stl in android ?? Thanks, Maha --~--~-~--~~~---~--~~ 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: using stl in Android
Is it possible to use stl in android ?? If by STL you mean: http://en.wikipedia.org/wiki/Standard_Template_Library then probably not. First, this list is for those developing using the Android SDK, which is Java, not C++. Second, as I understand it, Android is mostly in C, not C++, though I may be wrong about that. -- 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: finishing subactivity after some perticular time
Why don't you just have your subactivity post a delayed message to itself and have it call finish() when it gets it? On Tue, May 26, 2009 at 11:49 PM, Ask asifk1...@gmail.com wrote: Is it possible to call finish() for subactivity from the parent activity?? I want to show subactivity for only some perticular time and after that I want it to be automatically finished.. Thanks, Asif On May 26, 7:26 pm, Asif k asifk1...@gmail.com wrote: Hi all, I had opened an image file store in the sdcard using startActivity (intent) API. By doing this, image has opened and will remain open til manually coming back to parent activity by pressing back button. but I want it to be opened only for some perticular time after that it should exit and came back to parent acity. So how to set timer for subactivity?? Please help. Thanks, Asif --~--~-~--~~~---~--~~ 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] Android Market rejecting icons
I have finished the first version of my app and I am trying to upload it to the market. But every time I select my apk file for upload, the market upload website says: The icon for your application is not valid. Please use a 48x48 PNG. I have checked my image and resaved it in gimp at various dpi. I have rebuilt several times. I keep gettin the same error. what gives? Is there a fix? --~--~-~--~~~---~--~~ 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: Exit SMS-app after sending SMS
Bindu, On the same page, refer the text after Figure 4. That lists a way to use native application to send sms All, Request help to let me understand what are all the intent.putExtras I must do to send the sms automatically. With the following piece of code, the compose window with To and body filled in comes up, but waits for user to press Send. The developer guide does NOT give any help on this. How do I use native application to send SMS? Uri smsToUri = Uri.parse(smsto:// + phoneNo); Intent returnIt = new Intent(Intent.ACTION_SENDTO, smsToUri); returnIt.putExtra(sms_body, message); returnIt.putExtra(exit_on_sent, true); startActivity(returnIt); -vignesh On Wed, May 27, 2009 at 7:10 PM, Kasmoori Bindu bindukasmo...@gmail.comwrote: Hi Vignesh, Thank you for the quick reply. Iam not sure whether it is possible to send SMS without user intervention but i think some button click or inturn some action should be there to make use of SMS service. However, if you want to send the SMS without invoking built-in SMS app, then you can through the following link http://mobiforge.com/developing/story/sms-messaging-android Best Regards, Bindu On Wed, May 27, 2009 at 6:32 PM, Vignesh vignesh.kart...@gmail.comwrote: You can use intent.putExtra(exit_on_sent, true) for your needs I am struck in a problem, wherein on passing intent to Native messaging application, it opens up compose window and waits for user intervention to send the SMS (by clicking on send button). Could you get your code up, wherein it sends the sms automatically without user intervention? On Wed, May 27, 2009 at 4:39 PM, Kasmoori Bindu bindukasmo...@gmail.comwrote: Hi, Iam a beginner in android development, wanted to know whether following usecase is possible or not Supposing I have 'MyActivity' which starts the in-built SMSapplication using Intent. In SMS activity, when I Click on 'Send', SMS should be send successfully and it should eixt the application without being inside the SMS application . I mean it should come back to 'MyActivity'. Please, let me know if this usecase works, or any suggestions regarding this is highly appreciated. Best Regards, Bindu --~--~-~--~~~---~--~~ 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 Market rejecting icons
You say you have tried it with various dpi. Have you actually tried it with a PNG that has a resolution of 48x48 pixels though? On Wed, May 27, 2009 at 7:48 AM, solid young...@gmail.com wrote: I have finished the first version of my app and I am trying to upload it to the market. But every time I select my apk file for upload, the market upload website says: The icon for your application is not valid. Please use a 48x48 PNG. I have checked my image and resaved it in gimp at various dpi. I have rebuilt several times. I keep gettin the same error. what gives? Is there a fix? --~--~-~--~~~---~--~~ 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] Removing labels on the MapView
Hi, I was wondering if anyone would know a way to remove labels on the MapView? The documentation displays the following statement about the satellite mode: Sets the map mode to satellite mode, loading tiles of aerial imagery with roads and names superimposed. Would anyone know if it's possible to work around it (I don't think sources are available to take a look at it) or maybe if they intend to do it later. I don't get why they wouldn't provide us the choice to do so with the MapView since it's already possible with the regular Google Maps. I would appreciate any information about it. Regards, Issa Fortin --~--~-~--~~~---~--~~ 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] ScrolllBar style
Hi Guys, Is there any way to set the style of the scroll bar so that it is visible only when scrolling and the rest of the time it is invisible? Regards, R.Karthik --~--~-~--~~~---~--~~ 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] Displaying an image over another image
hi, i am using a relative layout to display an image over another i want to align the center of the second image with the right bottom corner of the previous image... can anyone help me out with this... --~--~-~--~~~---~--~~ 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] Can only hear sound when playing video
Hey all, I can only hear sound when trying to play a video in a surfaceView. The video codecs are very likely supported - I was reading this thread: http://groups.google.com/group/android-developers/browse_thread/thread/aeefa6c282c6dfcf where Mark Murphy mentions that the video is known to work. This is very straightforward code, right off the Audio and Video dev guide, so I am surprised I am having so much trouble with it. Thanks, Hamilton Here is all the code in my onCreate method public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); MediaPlayer mp = MediaPlayer.create(this, R.raw.documentariesandyou); SurfaceView sv = (SurfaceView)findViewById(R.id.surface); mp.setDisplay(sv.getHolder()); mp.start(); } and here is my XML ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent SurfaceView android:id=@+id/surface android:layout_width=fill_parent android:layout_height=fill_parent / /LinearLayout --~--~-~--~~~---~--~~ 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] flagNoExtractUi still showing keyboard text area
I'm probably doing something wrong here, but when I set flagNoExtractUi on an EditText the onscreen keyboard still shows its text input area when I type on it (this is in the 1.5 emulator, building against 1.5). How do I get the text area not to display? Here's the xml, and it's the same if I set the option programmatically: EditText android:id=@+id/search android:layout_width=0dip android:layout_height=wrap_content android:layout_weight=1 android:layout_gravity=center_vertical android:layout_marginLeft=6px android:paddingLeft=3px android:textSize=14sp android:textStyle=normal android:textColor=@drawable/text_entry android:background=@drawable/background_text_entry android:singleLine=true android:imeOptions=actionDone|flagNoExtractUi / Thank for any help. -- 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: UnknownHostException on 1.5 emulator
Thanks for the quick response David. I've only seen this on the 1.5 emulator running from the 1.5 SDK, I haven't tried the 1.1 emulator. Previously I was running the 1.0 SDK and never saw it. Below is the / system/build.prop from the emulator, let me know if you need anything else. It happens on all apps that I've tried, I noticed it first in our app then tried the browser, which is what I took the trace from (opening www.google.com). Our app is doing a java.net.HttpURLConnection.connect () when it fails, not sure if the browser uses that too. I haven't been able to reproduce it so far when running with -tcpdump, but I'll let you know if I do. -- Peter -- ro.build.id=CUPCAKE ro.build.display.id=sdk-eng 1.5 CUPCAKE 147336 test-keys ro.build.version.incremental=147336 ro.build.version.sdk=3 ro.build.version.release=1.5 ro.build.date=Tue Apr 21 21:10:23 PDT 2009 ro.build.date.utc=1240373423 ro.build.type=eng ro.build.user=android-build ro.build.host=undroid16.mtv.corp.google.com ro.build.tags=test-keys ro.product.model=sdk ro.product.brand=generic ro.product.name=sdk ro.product.device=generic ro.product.board= ro.product.manufacturer=unknown ro.product.locale.language=en ro.product.locale.region=US ro.board.platform= # ro.build.product is obsolete; use ro.product.device ro.build.product=generic # Do not try to parse ro.build.description or .fingerprint ro.build.description=sdk-eng 1.5 CUPCAKE 147336 test-keys ro.build.fingerprint=generic/sdk/generic/:1.5/CUPCAKE/147336:eng/test- keys # end build properties # # system.prop for generic sdk # rild.libpath=/system/lib/libreference-ril.so rild.libargs=-d /dev/ttyS0 # # ADDITIONAL_BUILD_PROPERTIES # ro.config.notification_sound=F1_New_SMS.ogg ro.kernel.android.checkjni=1 xmpp.auto-presence=true ro.config.nocheckin=yes net.bt.name=Android dalvik.vm.stack-trace-file=/data/anr/traces.txt --~--~-~--~~~---~--~~ 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 only hear sound when playing video
Which Audio and Video dev guide are you referring to? If that guide tells you that the code you posted should work, it needs to be fixed :) There are several problems in your code, but the main one is that you can't use any of the MediaPlayer.create() convenience methods to play video from a resource. This is because create() calls prepare() internally, but you need to call setDisplay() before calling prepare(). You'll need to use new MediaPlayer and setDataSource and setDisplay instead. Also be sure to wait for the surfaceCreated callback on the SurfaceHolder before calling start(). On Wed, May 27, 2009 at 8:42 AM, Hamy hamilt...@gmail.com wrote: Hey all, I can only hear sound when trying to play a video in a surfaceView. The video codecs are very likely supported - I was reading this thread: http://groups.google.com/group/android-developers/browse_thread/thread/aeefa6c282c6dfcf where Mark Murphy mentions that the video is known to work. This is very straightforward code, right off the Audio and Video dev guide, so I am surprised I am having so much trouble with it. Thanks, Hamilton Here is all the code in my onCreate method public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); MediaPlayer mp = MediaPlayer.create(this, R.raw.documentariesandyou); SurfaceView sv = (SurfaceView)findViewById(R.id.surface); mp.setDisplay(sv.getHolder()); mp.start(); } and here is my XML ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent SurfaceView android:id=@+id/surface android:layout_width=fill_parent android:layout_height=fill_parent / /LinearLayout --~--~-~--~~~---~--~~ 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] few querieson OpenGL-ES on Android...
Hi All, I have few queries: - Can anybody let me know is 2D 3D graphics in Android are using OpenGL-ES? I have have read only 3D graphics is using OpenGL-ES. - what are all the application in android which are using OpenGL-ES. please give the list of applications. 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: few querieson OpenGL-ES on Android...
My app is using OpenGL ES: The Gube On May 27, 12:30 pm, Shrinivas sinu.go...@gmail.com wrote: Hi All, I have few queries: - Can anybody let me know is 2D 3D graphics in Android are using OpenGL-ES? I have have read only 3D graphics is using OpenGL-ES. - what are all the application in android which are using OpenGL-ES. please give the list of applications. 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: Remove screen lock like the MENU key do?
Oh,my God,nobody give me a help. Maybe it is not possible to do this?? --~--~-~--~~~---~--~~ 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 only hear sound when playing video
Marco, Thank you so much! I just spent a day and a half trying every example I could get my hands on, and about 2 minutes before you replied I found a hint that video could not be a raw resource. I had just been adapting every example to include that, and it never occurred to me that might be the problem! The dev guide I reference is here http://developer.android.com/guide/topics/media/index.html It is very lacking on video info in general, but in particular it never mentions that video cannot be a raw resource, and I never found that on Google's site anywhere! I would like to file a issue, but before I do, do you know if they include it elsewhere? I don't want to turn in an issue that says it is never mentioned, and then have them dismiss it because it was mentioned somewhere I didn't look. Thanks again, I am so relieved to be done with that! Hamy On May 27, 10:57 am, Marco Nelissen marc...@android.com wrote: Which Audio and Video dev guide are you referring to? If that guide tells you that the code you posted should work, it needs to be fixed :) There are several problems in your code, but the main one is that you can't use any of the MediaPlayer.create() convenience methods to play video from a resource. This is because create() calls prepare() internally, but you need to call setDisplay() before calling prepare(). You'll need to use new MediaPlayer and setDataSource and setDisplay instead. Also be sure to wait for the surfaceCreated callback on the SurfaceHolder before calling start(). On Wed, May 27, 2009 at 8:42 AM, Hamy hamilt...@gmail.com wrote: Hey all, I can only hear sound when trying to play a video in a surfaceView. The video codecs are very likely supported - I was reading this thread: http://groups.google.com/group/android-developers/browse_thread/threa... where Mark Murphy mentions that the video is known to work. This is very straightforward code, right off the Audio and Video dev guide, so I am surprised I am having so much trouble with it. Thanks, Hamilton Here is all the code in my onCreate method public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); MediaPlayer mp = MediaPlayer.create(this, R.raw.documentariesandyou); SurfaceView sv = (SurfaceView)findViewById(R.id.surface); mp.setDisplay(sv.getHolder()); mp.start(); } and here is my XML ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent SurfaceView android:id=@+id/surface android:layout_width=fill_parent android:layout_height=fill_parent / /LinearLayout --~--~-~--~~~---~--~~ 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] Could not find method javax.microedition.io.Connector.open, referenced from method org.ksoap2.transport.ServiceConnectionMidp.
Hi Everyone, I've been getting this error Could not find method javax.microedition.io.Connector.open, referenced from method org.ksoap2.transport.ServiceConnectionMidp. Can anyone help? 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: using stl in Android
Second, as I understand it, Android is mostly in C, not C++, though I may be wrong about that. I'm not sure what your point is in the above statement. Just because a system is built using one language, does not mean other apps cannot be developed using some other language. As long as there is a C++ compiler for the processor, then coding in C++ should not be an issue and neither should using the STL. BTW, there is an ARM C++ compiler which will work just fine if you want to develop native C++ applications. Of course, as Mark mentioned, Android apps are currently written in Java, although that may change in the future (at least here's to hoping). --~--~-~--~~~---~--~~ 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 service utilizing custom usb device
do you have a blog or something for your work. I very like the Idea to connect external usb devices. Could be a great improvment to know a page where that stuff is explained a bit, also technicalwise what wires etc.. you know :) greets chris --~--~-~--~~~---~--~~ 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] Android Runtime Errors!!! NEED HELP!!!
Hi everyone, I'm getting quite a few Android Runtime Errors, and quite frankly, i'm at a loss. Here is a list of all the errors displayed in the console upon launch of the application. The application makes a call to a .NET web service using the kSOAP2 library. 05-27 17:36:39.535: ERROR/dalvikvm(875): Could not find method javax.microedition.io.Connector.open, referenced from method org.ksoap2.transport.ServiceConnectionMidp.init 05-27 17:36:39.555: ERROR/AndroidRuntime(875): Uncaught handler: thread main exiting due to uncaught exception 05-27 17:36:39.567: ERROR/AndroidRuntime(875): java.lang.VerifyError: org.ksoap2.transport.ServiceConnectionMidp 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at org.ksoap2.transport.HttpTransport.getServiceConnection(Unknown Source) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at org.ksoap2.transport.HttpTransport.call(Unknown Source) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at mobileCMDB.prototype_v1_1.mobileCMDBmain.onCreate(mobileCMDBmain.java: 50) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1123) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2231) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2284) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.os.Handler.dispatchMessage(Handler.java:99) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.os.Looper.loop(Looper.java:123) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at android.app.ActivityThread.main(ActivityThread.java:3948) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at java.lang.reflect.Method.invokeNative(Native Method) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at java.lang.reflect.Method.invoke(Method.java:521) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 05-27 17:36:39.567: ERROR/AndroidRuntime(875): at dalvik.system.NativeStart.main(Native Method) I really need help with 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: Can only hear sound when playing video
On Wed, May 27, 2009 at 10:23 AM, Hamy hamilt...@gmail.com wrote: Marco, Thank you so much! I just spent a day and a half trying every example I could get my hands on, and about 2 minutes before you replied I found a hint that video could not be a raw resource. I had just been adapting every example to include that, and it never occurred to me that might be the problem! The dev guide I reference is here http://developer.android.com/guide/topics/media/index.html It is very lacking on video info in general, but in particular it never mentions that video cannot be a raw resource, and I never found That is not entirely true. You can't play video from a resource using any of the MediaPlayer.create() convenience functions, however you can create a new MediaPlayer with 'new' and then use setDataSource(int resourceid) to make it play from a resource, including video. that on Google's site anywhere! I would like to file a issue, but before I do, do you know if they include it elsewhere? I don't want to turn in an issue that says it is never mentioned, and then have them dismiss it because it was mentioned somewhere I didn't look. It's not documented like that explicitly, however it follows implicitly from the fact that MediaPlayer.create() returns a MediaPlayer that has already been prepare()d, and the fact that you must call setDisplay() before calling prepare(). The latter is actually documented poorly, now that I look at it. It's mentioned in the doc for prepare(), but not in the doc for setDisplay(), and the Valid and invalid states section very misleadingly says that setDisplay() can be called in any state (which is technically true, though it won't have any effect in many of those states). --~--~-~--~~~---~--~~ 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: ant and eclipse builds don't play nice
That's kind of an unexpected workflow. The idea is that either you go the full way in Eclipse or you use Ant/DDMS. Trying to combine both is a recipe for confusion :-) What you can try: - use Ant to compile - use the ant install or reinstall target to push the apk - launch app manually - you can still debug by manually selecting the app in Eclipse DDMS perspective and applying the debug icon on it. - make sure you have automatic build disabled in Eclipse If you don't want to launch the app manually you can make an ant target by using the adb shell am start launch command. It goes something like this (from memory): $ adb shell am start -D com.blah.myapp/com.blah.myapp.MyMainActivity (run am without args to see the help) HTH R/ On Tue, May 26, 2009 at 11:02 PM, Craig supkic...@gmail.com wrote: On Wed, May 27, 2009 at 2:36 PM, Raphael r...@android.com wrote: On Tue, May 26, 2009 at 6:26 PM, Craig supkic...@gmail.com wrote: On May 26, 9:49 pm, Zero zeroo...@googlemail.com wrote: from my experience, eclipse never used the build.xml for it's internal builds - how did you do that ? The eclipse build doesn't use build.xml at all, but due to the fact that build.xml is in the eclipse project (because it is in the same directory as AndroidManifest.xml) eclipse tries to build it or at least parse it and check for errors. build.xml can't be parsed by eclipse (even though it is a valid file according to ant) and thus the android builder refuses to launch the project at all. This seems wrong to me. No it doesn't do that. Would you have the Ant view open by any chance? Don't build from the ant view if you build using Eclipse. Hey Raph, To be clear, I'm not trying to build using ant from within eclipse. I use ant to do customised builds from the command line. All every-day builds are done from eclipse using F11-Debug As-Android Application. I simply want the two different build methods to ignore each other. I have a clean install of ganymede EE 3.4.2, the latest DDMS, no ant views open, and a cleaned android project. If I rename build.xml to build.txt and refresh the project, the error goes away, and I can launch and debug the project. If I rename it back to build.xml and refresh the project, the errors aren't detected, and I can launch and debug If I open build.xml with the ant editor (because I want to edit it :), the error is detected, and I can no longer launch and debug, even if I close everything and refresh. If I open build.xml with the xml editor, the error is not detected...so I guess I just found my own work-around. Never open the ant editor. Still seems like a bug to me. cheers, Craig --~--~-~--~~~---~--~~ 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] What's the best way to handle an task w/progress dialog on orientation change?
I have an app that communicates with a server. While it is communicating, it shows a progress dialog. The way this actually works is that I have a class that I call my NetworkGateway. Each method takes a Handler as a callback so that the gateway can send back the response as a bundle when it has finished. Right now when someone changes orientation while a network operation is occuring, the activity doesn't know that a thread is running the network code and then the callback might be invalid. What's the right way to do this? I want to make it so that after the orientation switch, the activity can check something to see if a network operation is running and if so, display the progress dialog again and wait for the callback, or set itself as the callback handler now, invalidating the old one. My first guess is that this is exactly the kind of thing services were designed for, but I'd like specifics if anyone can supply them. 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: Can only hear sound when playing video
On May 27, 12:39 pm, Marco Nelissen marc...@android.com wrote: On Wed, May 27, 2009 at 10:23 AM, Hamy hamilt...@gmail.com wrote: Marco, Thank you so much! I just spent a day and a half trying every example I could get my hands on, and about 2 minutes before you replied I found a hint that video could not be a raw resource. I had just been adapting every example to include that, and it never occurred to me that might be the problem! The dev guide I reference is here http://developer.android.com/guide/topics/media/index.html It is very lacking on video info in general, but in particular it never mentions that video cannot be a raw resource, and I never found That is not entirely true. You can't play video from a resource using any of the MediaPlayer.create() convenience functions, however you can create a new MediaPlayer with 'new' and then use setDataSource(int resourceid) to make it play from a resource, including video. Hm, I don't see that overload in http://developer.android.com/reference/android/media/MediaPlayer.html . All I see are: setDataSource(FileDescriptor), setDataSource(String), setDataSource (Context, Uri), setDataSource(FileDescriptor, long, long) I guess there is some way to get a FileDescriptor from the resourceID - I think there is, but I cannot remember it. that on Google's site anywhere! I would like to file a issue, but before I do, do you know if they include it elsewhere? I don't want to turn in an issue that says it is never mentioned, and then have them dismiss it because it was mentioned somewhere I didn't look. It's not documented like that explicitly, however it follows implicitly from the fact that MediaPlayer.create() returns a MediaPlayer that has already been prepare()d, and the fact that you must call setDisplay() before calling prepare(). The latter is actually documented poorly, now that I look at it. It's mentioned in the doc for prepare(), but not in the doc for setDisplay(), and the Valid and invalid states section very misleadingly says that setDisplay() can be called in any state (which is technically true, though it won't have any effect in many of those states). I was wondering. I had never heard that before, and I did read that state description. If I missed it I figure others might be making the same mistake. --~--~-~--~~~---~--~~ 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: Accessing java SIM card information from android
Hello, Another query is, that how do i find the exact technology in use of the handset? Whether it is GSM, HSPA or even LTE for that matter. thanks aayush On May 27, 3:43 am, aayush abhatnagar192...@gmail.com wrote: Hello, My query is regarding access to USIM card information from an android application. My requirement is to read certain pre populated paramters on the sim card at application startup. Is this use case possible? I found an api in the developer reference that interacts with the sim card, but it is limited to only sms and geolocation information..http://developer.android.com/reference/android/telephony/gsm/package-... i wish to read the MSISDN, and a shared secret key stored on the sim. thanks in advance aayush. --~--~-~--~~~---~--~~ 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 only hear sound when playing video
On Wed, May 27, 2009 at 11:02 AM, Hamy hamilt...@gmail.com wrote: On May 27, 12:39 pm, Marco Nelissen marc...@android.com wrote: On Wed, May 27, 2009 at 10:23 AM, Hamy hamilt...@gmail.com wrote: Marco, Thank you so much! I just spent a day and a half trying every example I could get my hands on, and about 2 minutes before you replied I found a hint that video could not be a raw resource. I had just been adapting every example to include that, and it never occurred to me that might be the problem! The dev guide I reference is here http://developer.android.com/guide/topics/media/index.html It is very lacking on video info in general, but in particular it never mentions that video cannot be a raw resource, and I never found That is not entirely true. You can't play video from a resource using any of the MediaPlayer.create() convenience functions, however you can create a new MediaPlayer with 'new' and then use setDataSource(int resourceid) to make it play from a resource, including video. Hm, I don't see that overload in http://developer.android.com/reference/android/media/MediaPlayer.html . All I see are: setDataSource(FileDescriptor), setDataSource(String), setDataSource (Context, Uri), setDataSource(FileDescriptor, long, long) I guess there is some way to get a FileDescriptor from the resourceID - I think there is, but I cannot remember it. My bad, that method does not exist. You'll need to get an AssetFileDescriptor for your resource, and then use setDataSource(FileDescriptor, long, long) with the FileDescriptor, offset and length from that AssetFileDescriptor. I was wondering. I had never heard that before, and I did read that state description. If I missed it I figure others might be making the same mistake. Yes, this exact issue has come up in the past on this list. --~--~-~--~~~---~--~~ 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] Cannot allocate any memory when using camera pic
I have an app that displays a camera picture as part of it, but if the picture is in memory I get an out of memory exception when an allocation of any size happens no matter what. If the app uses a seekbar in addition to my PictureView the ~900 bytes it allocates are too much. I even tried to load a 16x16 monochrome image on top of the camera pic, but the 256 bytes were too much. I find it extremely unlikely that the object containing the image is precisely the size so that using it alone never causes a crash, but allocating even 256 more bytes exceeds the memory budget. Does anybody know what the problem is? --~--~-~--~~~---~--~~ 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] ActivityGroup + embedded Activity search window
Hi all, I have an ActivityGroup with an embedded TabActivity and another simple Activity. The TabActivity has three tabs, each one with a ListActivity. When I try to start a search from a list (calling onSearchRequested()), I get a WindowManager$BadTokenException. I've tried requesting focus in the list, but the same error occurred. What should I do to solve this? Taísa --~--~-~--~~~---~--~~ 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: Cannot allocate any memory when using camera pic
I have a temporary workaround, but I'd still like to get this issue solved. As for the workaround, it seems that if the SeekBar's image is loaded before the camera picture, the memory error doesn't occur. Right now I have a boolean flag so that the first time my derived ImageView's onDraw method gets called it sets the image, rather than setting it in the xml layout. After this it trips the flag and subsequent onDraw calls get passed to the super. It's not ideal, but it works On May 27, 2:30 pm, Max Salley msalley@gmail.com wrote: I have an app that displays a camera picture as part of it, but if the picture is in memory I get an out of memory exception when an allocation of any size happens no matter what. If the app uses a seekbar in addition to my PictureView the ~900 bytes it allocates are too much. I even tried to load a 16x16 monochrome image on top of the camera pic, but the 256 bytes were too much. I find it extremely unlikely that the object containing the image is precisely the size so that using it alone never causes a crash, but allocating even 256 more bytes exceeds the memory budget. Does anybody know what the problem is? --~--~-~--~~~---~--~~ 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: add my Launcher.apk into emulator
Can you please tell me where in android code which specify using Launcher.apk when android starts? I have grep 'Launcher' in the code, i can't find anywhere it specify android to use Launcher.apk. On Fri, May 22, 2009 at 9:51 AM, Dianne Hackborn hack...@android.com wrote: You need to give it a different package name. If you don't, you are trying to replace the current Launcher .apk, and since you aren't signed with the same cert, you can't. On Fri, May 22, 2009 at 4:38 AM, allstars allstars@gmail.com wrote: hi i try to modify the Launcher in mydroid/package/apps/Launcher and i try to use it as an APK so i dont have to mess up the original system image so i copy it to another project , say mydroid/package/apps/MyLauncher i have changed the package name in case it will conflict with the original Launcher and because some files use android.internal.R using 'android' to install/update is not feasible hence i build my MyLauncher inside mydroid , and i modify the LOCAL_PACKAGE_NAME in Android.mk when i build out the MyLauncher.apk i try to install it with adb install but it complains Failure [INSTALL_FAILED_ALREADY_EXISTS] but i am sure i havent installed this APK before and if i use $adb install -r , it will complain Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES] so i would like to ask what's the correct way to install my MyLauncher.apk into emulator thanks -- 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, and so won't reply to such e-mails. 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: Finding the name of installed applications
PackageManager pm = this.getPackageManager(); Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); ListResolveInfo list = pm.queryIntentActivities(mainIntent, 0); for(ResolveInfo info: list) { Log.w(App browser, info.activityInfo.applicationInfo.loadLabel( pm ).toString()); } On Apr 18, 8:50 am, sam samuel.e.pe...@gmail.com wrote: Given the following code, I know how togeta list of ResolveInfo that describes all of theinstalledapplications, but I am not sure how togetthe names of theapplicationsas seen in the home menu. PackageManager pm = this.getPackageManager(); Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); ListResolveInfo list = pm.queryIntentActivities(mainIntent, 0); Currently I cangetthe packageName and className of a given application as such: ResolveInfo re = list.get(position); String packageName = re.activityInfo.packageName; String className = re.activityInfo.name; But as far as getting the same name that you would find if you were to do Context ctx = this; Resources appR = ctx.getResources(); CharSequence txt = appR.getText(appR.getIdentifier(app_name, string, ctx.getPackageName())); I cannot seem to figure out how to justgetthe name. Obviously this is possible because there areapplicationsthat replace your home screen and so forth, but I have been searching for hours to no avail. Thanks! -Sam --~--~-~--~~~---~--~~ 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: Cannot allocate any memory when using camera pic
I'm not sure about the exact point of failure, which - indeed - seems very precisely cut against the memory needed to load exactly one camera pic. However, you can avoid this. Don't load the full size pic. Load the bitmap using the BitmapFactory and set the Config's inSampleSize attribute to a value larger than 1 (2, 4, 8, 16) that would fit the pixel-size of your PictureView. E.g. use 4 to get a 512 x 384 bitmap that can snuggly fit (without being up-scaled) into a 480x320 size PictureView. If your PictureView is smaller, set the 'inSampleSize' to a larger value. On May 27, 2:30 pm, Max Salley msalley@gmail.com wrote: I have an app that displays a camera picture as part of it, but if the picture is in memory I get an out of memory exception when an allocation of any size happens no matter what. If the app uses a seekbar in addition to my PictureView the ~900 bytes it allocates are too much. I even tried to load a 16x16 monochrome image on top of the camera pic, but the 256 bytes were too much. I find it extremely unlikely that the object containing the image is precisely the size so that using it alone never causes a crash, but allocating even 256 more bytes exceeds the memory budget. Does anybody know what the problem is? --~--~-~--~~~---~--~~ 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: Network over cell (3G, EDGE etc.)
I'm seeing the same exact issue. Were you able to figure this out? Thanks. -Neel On Apr 16, 8:57 am, Alienfluid ahm...@gmail.com wrote: So my app works well in the emulator in various run configurations and on the device when the device is connected to WiFi. But when I switch off the WiFi on the device, the code that goes out to the network takes forever and then times out (i.e. doesn't return any data). Other people have reported this as well. I also notice that no data is going out or coming in when I look at the little up and down arrows on the 3G icon in the status bar on the G1. I am assuming that the Java code I am using should work for both types of connections, right? I mean, do I need to account for the fact that cell data network is very slow with high latencies i.e. pre-cache my data etc.? How can I debug this? -F --~--~-~--~~~---~--~~ 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: What's the best way to handle an task w/progress dialog on orientation change?
Take a look at the method onRetainNonConfigurationInstance() of the Activity class. :-) http://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance() On May 27, 2:01 pm, Robert Green rbgrn@gmail.com wrote: I have an app that communicates with a server. While it is communicating, it shows a progress dialog. The way this actually works is that I have a class that I call my NetworkGateway. Each method takes a Handler as a callback so that the gateway can send back the response as a bundle when it has finished. Right now when someone changes orientation while a network operation is occuring, the activity doesn't know that a thread is running the network code and then the callback might be invalid. What's the right way to do this? I want to make it so that after the orientation switch, the activity can check something to see if a network operation is running and if so, display the progress dialog again and wait for the callback, or set itself as the callback handler now, invalidating the old one. My first guess is that this is exactly the kind of thing services were designed for, but I'd like specifics if anyone can supply them. 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: Network over cell (3G, EDGE etc.)
do I need to account for the fact that cell data network is very slow with high latencies Yep. Or ask your customers to run your app only with WiFi on or with 3G in a good reception area. On Apr 16, 11:57 am, Alienfluid ahm...@gmail.com wrote: So my app works well in the emulator in various run configurations and on the device when the device is connected to WiFi. But when I switch off the WiFi on the device, the code that goes out to the network takes forever and then times out (i.e. doesn't return any data). Other people have reported this as well. I also notice that no data is going out or coming in when I look at the little up and down arrows on the 3G icon in the status bar on the G1. I am assuming that the Java code I am using should work for both types of connections, right? I mean, do I need to account for the fact that cell data network is very slow with high latencies i.e. pre-cache my data etc.? How can I debug this? -F --~--~-~--~~~---~--~~ 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: What's the best way to handle an task w/progress dialog on orientation change?
I just looked at it. 1) They state that it is only an optimization and that you are not to rely on the method being called. 2) My design is a little too complex to use that elegantly. I do network calls from multiple activities and some dialogs on those activities, which need to chain to other actions upon completion. I'm learning about Services right now and I think that if I could have a network service that I can register a specific callback with, like a User Updated callback, it would work really well. When the service finishes updating a user, it simply notifies the user updated callback. It won't care if it was the original activity/dialog or a new one. Does that sound feasible? On May 27, 2:22 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Take a look at the method onRetainNonConfigurationInstance() of the Activity class. :-) http://developer.android.com/reference/android/app/Activity.html#onRe...() On May 27, 2:01 pm, Robert Green rbgrn@gmail.com wrote: I have an app that communicates with a server. While it is communicating, it shows a progress dialog. The way this actually works is that I have a class that I call my NetworkGateway. Each method takes a Handler as a callback so that the gateway can send back the response as a bundle when it has finished. Right now when someone changes orientation while a network operation is occuring, the activity doesn't know that a thread is running the network code and then the callback might be invalid. What's the right way to do this? I want to make it so that after the orientation switch, the activity can check something to see if a network operation is running and if so, display the progress dialog again and wait for the callback, or set itself as the callback handler now, invalidating the old one. My first guess is that this is exactly the kind of thing services were designed for, but I'd like specifics if anyone can supply them. 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: What's the best way to handle an task w/progress dialog on orientation change?
I agree you should use a service. But for optimization, i would use this method. You should have a call to the service to query if the service is still busy. If so, show a progress dialog and start listening to the service to know when it no longer is busy (callback from the service into your app) On May 27, 4:07 pm, Robert Green rbgrn@gmail.com wrote: I just looked at it. 1) They state that it is only an optimization and that you are not to rely on the method being called. 2) My design is a little too complex to use that elegantly. I do network calls from multiple activities and some dialogs on those activities, which need to chain to other actions upon completion. I'm learning about Services right now and I think that if I could have a network service that I can register a specific callback with, like a User Updated callback, it would work really well. When the service finishes updating a user, it simply notifies the user updated callback. It won't care if it was the original activity/dialog or a new one. Does that sound feasible? On May 27, 2:22 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Take a look at the method onRetainNonConfigurationInstance() of the Activity class. :-) http://developer.android.com/reference/android/app/Activity.html#onRe...() On May 27, 2:01 pm, Robert Green rbgrn@gmail.com wrote: I have an app that communicates with a server. While it is communicating, it shows a progress dialog. The way this actually works is that I have a class that I call my NetworkGateway. Each method takes a Handler as a callback so that the gateway can send back the response as a bundle when it has finished. Right now when someone changes orientation while a network operation is occuring, the activity doesn't know that a thread is running the network code and then the callback might be invalid. What's the right way to do this? I want to make it so that after the orientation switch, the activity can check something to see if a network operation is running and if so, display the progress dialog again and wait for the callback, or set itself as the callback handler now, invalidating the old one. My first guess is that this is exactly the kind of thing services were designed for, but I'd like specifics if anyone can supply them. Thanks!- 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 -~--~~~~--~~--~--~---