[android-developers] How to receive/catch SIP MESSAGE
I am using SipDemo as a SIP softphone that's able to receive or make calls to another SIP client. I have a requirement that the SIP softphone is enabled to receive SIP message from a server. From the debug console ( LogCat ) I see the SIP MESSAGE been sent to the client, but my softphone is not set to catch the message and not able to respond. I have set a break point in IncomingCallReceiver ( which extends BroadcastReceiver class ), but it did not get hit. I would appreciate any help on how to catch this SIP message sent from the server. Regards, -Beth -- 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 can we control the background data for Individual Apps ?
The background data setting might change for all apps with a quota or for a single app that is using more than the user would like. The background data setting that was once a simple boolean is now a complicated data structure. Does the OS gives some kind of notification or does the app just stop? It looks like the system will continue to send the ACTION_BACKGROUND_DATA_SETTING_CHANGED broadcast. With the new user interface, the setting change may or may not apply to your app. Maybe there are extras in the broadcast that can read the setting and store it in a db or preference. If there are extras, and I doubt there are extras, the app could use the intent to work out whether or not that change is being made on your app or all apps or a different app. Without extras, the app should just use the network info methods when it starts/resumes and every time the setting changes. The thing to do would be to listen for the broadcast and tear down an active connection if the network info object returned by the network info methods does not allow the app to continue to connect. -- 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] Live Wallpaper configuration
Quick question for Android developers out in the world. Is it possible to lock the display of a live wallpaper to be portrait? Instead of duplicating my layouts and graphics for a wide screen, I want to be lazy and lock the thing. I know how to do this for an activity. It would be nice if the live wallpaper display were as configurable as that... Thanks and regards, Beth -- 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: ImageView setColorFilter, what to do for a bitmap?
Thanks Greg, I saw that. There is no ImageView. It's straight canvas and bitmaps, no Drawables, no Views. I may change that... The pixels to change could be one of several bitmaps in an ImageView. I don't know if the ImageView ColorFilter call will work in this case. The bitmap I want to change is on top of another bitmap (background) that I do not want to fliter. On Jul 23, 9:19 pm, greg sep...@eduneer.com wrote: Isn't your canvas associated with an ImageView? (ImageView has a setColorFilter() method.) On Jul 23, 1:31 pm, Beth emez...@gmail.com wrote: Hi all, In my code there is a canvas drawing a bitmap created from a resource png. It is not a Drawable. If I want to take that bitmap and tint it, is there something similar to setColorFilter in the graphics package that I can use on the canvas and bitmap object? To be clear, my goal is to change the brown pixels of my bitmap to blue, or from white to red. Do you all have any suggestions? Regards, Beth -- 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] ImageView setColorFilter, what to do for a bitmap?
Hi all, In my code there is a canvas drawing a bitmap created from a resource png. It is not a Drawable. If I want to take that bitmap and tint it, is there something similar to setColorFilter in the graphics package that I can use on the canvas and bitmap object? To be clear, my goal is to change the brown pixels of my bitmap to blue, or from white to red. Do you all have any suggestions? Regards, Beth -- 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: Dynamic TableLayout problem
David, The output shows you have a null pointer at line 93 of your activity. Look there for a solution. Also, I noticed you have System.out.println. Where are you expecting the println output to appear? You might want to replace that with Android.util.log. Regards, Beth On Feb 2, 3:41 am, David Arm zash...@gmail.com wrote: No idea? :s On 1 feb, 22:09, David Arm zash...@gmail.com wrote: Sorry, double post. On 1 feb, 18:37, David Arm zash...@gmail.com wrote: Hi! Im having a problem with a tablelayout. Im trying to add rows dinamically and display the content of these rows (there are not content problems as T tested it and the app has all the data that it needs). This is the java code and the xml of the activity: [syntax=java]import java.util.ArrayList; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class DisplayResult extends Activity{ /** Called when the activity is first created. */ �...@suppresswarnings(unchecked) public void onCreate(Bundle savedInstanceState) { System.out.println(2º actividad lanzada); super.onCreate(savedInstanceState); setContentView(R.layout.displayresults); Bundle extras = getIntent().getExtras(); //this.setContentView(R.layout.main); /* Find Tablelayout defined in main.xml */ TableLayout tl = (TableLayout)findViewById (R.layout.displayresults); ArrayList finalResults; if(extras!=null){ finalResults = (ArrayList) (extras.getSerializable (RemoteIR.RESULTS)); Iterator it = finalResults.iterator(); while(it.hasNext()) { SearchResult result = ((SearchResult) it.next()); /* Create a new row to be added. */ TableRow tr = new TableRow(this); tr.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); TextView title = new TextView(this); title.setText(result.title.toString()); //System.out.println(title.getText()); TextView author = new TextView(this); author.setText(result.author.toString()); TextView file = new TextView(this); file.setText(result.file.toString()); TextView modDate = new TextView(this); author.setText(result.modDate.toString()); TextView size = new TextView(this); size.setText(result.size.toString()); title.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); author.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); file.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); modDate.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); size.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); tr.addView(title); tr.addView(author); tr.addView(file); tr.addView(modDate); tr.addView(size); tl.addView(tr,new TableLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); } } } }[/syntax] This is the xml: [syntax=xml] ?xml version=1.0 encoding=utf-8? TableLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/DisplayResults android:layout_width=fill_parent android:layout_height=fill_parent TableRow TextView android:layout_column=1 android:text=Title android:padding=3dip / TextView android:text=Author android:padding=3dip / TextView android:text=File android:padding=3dip / TextView android:text=ModDate android:padding=3dip / TextView android:text=Size android:padding=3dip / /TableRow /TableLayout[/syntax] And this is the error that is frustrating me :s ERROR: 02-01 12:10:34.129: ERROR/AndroidRuntime(938
[android-developers] Re: Doubts while doing app's with graphics
You can create an Animation Listener to call the new activity when the animation ends with the onAnimationEnd function. Good luck! On Feb 1, 9:00 pm, deeMurthy darshana.mur...@wipro.com wrote: Hi I have doubts while doing some 2D Graphics and animation. Here is what i have done and what i want to do further: An application starts with a 2D object [ball] rotating and execising in a particular fashion, and after a particular point in time the object [ball] scrolls out of vision. After this point i want to invoke a new activity with a different UI. I m stuck up while trying to transit from this View to a new activity. Please give me some inputs as to what can be done Many thanks in advance Darshana -- 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: Lookup contacts in a certain group
Correction, the query for names the works well is like this: final Cursor c = ctxt.getContentResolver().query( Data.CONTENT_URI, new String[] {ContactsContract.Contacts.DISPLAY_NAME }, GroupMembership.GROUP_ROW_ID + = + grpid + AND + Data.MIMETYPE + =' + GroupMembership.CONTENT_ITEM_TYPE + ', null, DISPLAY_NAME); On Jan 20, 2:50 pm, Beth emez...@gmail.com wrote: Are you trying to get their names? If so, the following query works for me where the group number is grpid in my code: final Cursor c = ctxt.getContentResolver().query( Data.CONTENT_URI, new String[] {ContactsContract.Contacts.DISPLAY_NAME }, GroupMembership.GROUP_ROW_ID + = + grpid + OR + GroupMembership.GROUP_SOURCE_ID += + grpid + AND + Data.MIMETYPE + =' + GroupMembership.CONTENT_ITEM_TYPE + ', null, DISPLAY_NAME); If you need their numbers, it gets a little more complicated. I hope this helps. Regards, Beth On Jan 19, 11:24 pm, jmf jon.fort...@gmail.com wrote: I am using android 2.0.1. I have a group id and I am trying to find all contacts in this group. I have been banging my head against the wall on this for a while. I can't seem to find a contentprovider that ties these two together. There has to be a standard answer to this question...? I hope. Thanks for any and all help you might be able to provide. Jon -- 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: Lookup contacts in a certain group
Are you trying to get their names? If so, the following query works for me where the group number is grpid in my code: final Cursor c = ctxt.getContentResolver().query( Data.CONTENT_URI, new String[] {ContactsContract.Contacts.DISPLAY_NAME }, GroupMembership.GROUP_ROW_ID + = + grpid + OR + GroupMembership.GROUP_SOURCE_ID += + grpid + AND +Data.MIMETYPE + =' + GroupMembership.CONTENT_ITEM_TYPE + ', null, DISPLAY_NAME); If you need their numbers, it gets a little more complicated. I hope this helps. Regards, Beth On Jan 19, 11:24 pm, jmf jon.fort...@gmail.com wrote: I am using android 2.0.1. I have a group id and I am trying to find all contacts in this group. I have been banging my head against the wall on this for a while. I can't seem to find a contentprovider that ties these two together. There has to be a standard answer to this question...? I hope. Thanks for any and all help you might be able to provide. Jon -- 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: Invalidate and a card flip
Since you have exactly two images, face down and face up, you might try out an ImageSwitcher object. Toggle the image with show next and skip the validation business. On Jan 13, 7:00 am, Gregg Reno gregg.r...@gmail.com wrote: I am working on a card game, and using a custom ImageView for the cards. I have an OnClickListener that handles the presses on the cards. What I want to happen is in some cases is: - User presses a face down card - Card displays face up - Wait 1 second - Card displays face down Within the OnClickListener , I draw the face up card, call invalidate, use Thread.currentThread().sleep(1000), draw the card face down, and call invalidate again. What happens is you never see the card face up - just face down. From what I understand from prior threads, this is expected behavior as invalidate won't re-draw immediately, so you only wind up seeing that last thing drawn. The view is probably being re-drawn after exiting the OnClickListener. So, any suggestions for accomplishing this using a different method? Thanks, -Gregg -- 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
Re: [android-developers] Re: Create Nexus One live wallpaper
Just to confirm, the code is ok if it sets the theme: setTheme(android.R.style.Theme_Wallpaper); Merci beaucoup! On Sat, Jan 9, 2010 at 11:50 AM, Romain Guy romain...@android.com wrote: Can you please tell me if an app is picking up the system wallpaper to set it in an Activity, will the new live wallpaper break the activity? Not at all. The wallpaper now lives in its own process, in its own window. If your app uses the correct theme in its manifest, it will be transparent and show the live wallpaper underneath. If not, you can draw the static wallpaper in your background yourself. You won't be able to get live wallpapers though if you don't use the special wallpaper theme. On Jan 9, 1:16 am, String sterling.ud...@googlemail.com wrote: On Jan 9, 7:30 am, Romain Guy romain...@android.com wrote: We are certainly not trying to piss off developers. The SDK is coming *very soon* and we understand your frustration. Trust me that if we could release it right now we would. Romain, Thanks for your response, and I do want to reiterate that my (our) frustration isn't directed at you personally. But if you have any way of passing word up the chain of command, please try to let them know that external developers are a vital part of the ecosystem, and releasing the appropriate SDK *before* any new OS version needs to be a priority. In fact, I'd go so far as to say that releasing an SDK needs to be an immutable prerequisite for any OS upgrade. Thanks again for your patience. String -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Marie von Ebner-Eschenbachhttp://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html - Even a stopped clock is right twice a day. -- 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
Re: [android-developers] Re: Create Nexus One live wallpaper
The program has more than one theme possible. The theme is set based on a preference, *before* the content view is set. Does that make a difference? I can make the same wallpaper theme a parent for my other (gradient drawable) themes. Currently, the other choices inherit from Theme. In this way the code will change only the background and not the theme. In other words, when an Activity in the app displays, if the users choose to set the system wallpaper the theme will be set by the Manifest and only the background is set programmatically in the Activity. However, if the user chooses something else, the other theme will have the wallpaper theme as a parent and setTheme will be called with a resource definition from xml in the values folder. Is this a problem? Do I need to rewrite my code to set the background each time and get the Theme only from the manifest? Thanks and regards, Beth On Sun, Jan 10, 2010 at 11:11 AM, Romain Guy romain...@android.com wrote: No, don't do this in code, do this in your manifest. Otherwise there will be an ugly transition. On Sun, Jan 10, 2010 at 9:57 AM, Beth Mezias emez...@gmail.com wrote: Just to confirm, the code is ok if it sets the theme: setTheme(android.R.style.Theme_Wallpaper); Merci beaucoup! On Sat, Jan 9, 2010 at 11:50 AM, Romain Guy romain...@android.com wrote: Can you please tell me if an app is picking up the system wallpaper to set it in an Activity, will the new live wallpaper break the activity? Not at all. The wallpaper now lives in its own process, in its own window. If your app uses the correct theme in its manifest, it will be transparent and show the live wallpaper underneath. If not, you can draw the static wallpaper in your background yourself. You won't be able to get live wallpapers though if you don't use the special wallpaper theme. On Jan 9, 1:16 am, String sterling.ud...@googlemail.com wrote: On Jan 9, 7:30 am, Romain Guy romain...@android.com wrote: We are certainly not trying to piss off developers. The SDK is coming *very soon* and we understand your frustration. Trust me that if we could release it right now we would. Romain, Thanks for your response, and I do want to reiterate that my (our) frustration isn't directed at you personally. But if you have any way of passing word up the chain of command, please try to let them know that external developers are a vital part of the ecosystem, and releasing the appropriate SDK *before* any new OS version needs to be a priority. In fact, I'd go so far as to say that releasing an SDK needs to be an immutable prerequisite for any OS upgrade. Thanks again for your patience. String -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Marie von Ebner-Eschenbach - Even a stopped clock is right twice a day. -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid
[android-developers] Re: Create Nexus One live wallpaper
In advance of the release I do have a question about this feature. Can you please tell me if an app is picking up the system wallpaper to set it in an Activity, will the new live wallpaper break the activity? On Jan 9, 1:16 am, String sterling.ud...@googlemail.com wrote: On Jan 9, 7:30 am, Romain Guy romain...@android.com wrote: We are certainly not trying to piss off developers. The SDK is coming *very soon* and we understand your frustration. Trust me that if we could release it right now we would. Romain, Thanks for your response, and I do want to reiterate that my (our) frustration isn't directed at you personally. But if you have any way of passing word up the chain of command, please try to let them know that external developers are a vital part of the ecosystem, and releasing the appropriate SDK *before* any new OS version needs to be a priority. In fact, I'd go so far as to say that releasing an SDK needs to be an immutable prerequisite for any OS upgrade. Thanks again for your patience. String -- 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] Active Activity?
Hi all, Is there a way to find out what is on the screen at any given point in time? In a broadcast receiver, I would like to determine if a specific activity is onscreen. Is it possible? In that activity I have a button that is assigned two different functions and is labeled with text to match that function, based on current state... Because of some code in the receiver (a preference change) the button action in that activity would change and would not do what it says. The receiver displays a notification, but I would like to do a little bit more to help my user in this context. If the receiver executes when one of my Activities is running I want to show a toast to alert the user in addition to displaying the standard notification on the top left. Maybe I could update the Activity screen with the notification to reflect the proper state. Can I do any of that? Is there a way for my receiver to determine if a specific Activity within my application is running? I don't think it is possible to get that information, but I wanted to ask you all. This is a corner case and my users really should notice the notification. If not, the Activity has clear visual feedback to the button press that shows the user what the button did (since it did not do what was expected). The ActivityManager and WindowManager do not seem to offer this level of detail. Please share any insights you might have. Thanks and regards, Beth -- 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: ServiceConnectionLeaked warning
Yep, based on your description it sounds like Activity 1 is already running and bound to the Service when you call it from Activity 2. There's your leak. See if you can put a test in Activity 1 before you bind to the service. If it is already running the service and bound, don't do it again. You might set a boolean flag in the Activity or Service when you start and bind to it then check for that before you call it and start again. That's my educated guess. Good luck. On Jan 5, 10:17 am, Pawel Kapala pawel.kap...@googlemail.com wrote: Hello! It seems you're leaking the service connection in some way. Try doing some logging after you bind and before you unbind to the service, to see if you have unbound where needed (i.e. Activity.onDestroy). I guess, in your case, when you restart the activity 1, without previous unbind, the service connection is leaked. Do you call unbind in onDestroy method in your activities? Also try isolating the code, maybe you'll find the solution this way. Maybe, this also could be helpful in your case:http://groups.google.com/group/android-developers/browse_thread/threa... -- Best regards, Pawel On Jan 5, 2:11 am, Mike Collins mike.d.coll...@gmail.com wrote: I'm getting aServiceConnectionLeakedmessage that I don't understand. There are 3 activities and a remote service, all the activities use the same remote service. The main window, activity 1, starts up, auto-starts the service and binds to it. The user then starts activity 2 to do something. The user now wants activity 3, so the code in activity 2 puts some data in an intent and starts activity 1 via startActivity (). When activity 1 is started, it reads the data in the intent and starts activity 3. This all works as expected except that while activity 3 is starting I get theServiceConnectionLeakedwarning. This is odd because the code that unbinds from the service has never been called and the service connection continues to operate just fine. If the user backs out of the main window the service is unbound and everything shuts down correctly. Because the UI design doesn't want activity 2 to stack on top of 3, or 3 on top of 2 I use a FLAG_ACTIVITY_CLEAR_TOP flag when starting activity 1. (I tested with this flag removed and the leakwarning goes away but I wind up with extra activities/windows in the stack). To make it even a bit weirder, if I run through the same scenario again, e.g. close activity 3 to get back to activity 1, open 2, switch to 3 there is no leakage the second and successive times, only the first time (near as I can tell). any hints, thoughts? tia, mike I could pare it all down to an example if that is required/helpful. -- 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: Led notification on Motorola Milestone
To define your own color and pattern, define a value for the ledARGB field (for the color)... from http://developer.android.com/guide/topics/ui/notifiers/notifications.html Regards, Beth On Jan 5, 7:14 am, Pablo Szyrko pablo.szy...@gmail.com wrote: Hi all, I'm dealing with an issue related with notifications. My application shows led notification for some events, but it isn't working in the Motorola Milestone (i'm not sure if it doesn't work in the Motorola DROID also). Led notifications are shown in HTC Hero, Magic and G1 This is my code: Notification notif = new Notification(); notif.flags |= Notification.FLAG_SHOW_LIGHTS; notif.ledOnMS = 200; notif.ledOffMS = 200; notificationManager.notify(LED_NOTIFICATION, notif); Do you know if this code is OK? i don't know if i'm missing something. Thanks, Pablo -- 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: ListActivity not updating on Database update.
Hmmm - not sure you want to call this method more than once. setListAdapter(shows); Set the adapter once, when you create the list. Requery the list's cursor as needed. If you use a cursor adapter you may never have to requery manually. Good luck! On Jan 5, 7:42 am, mac-systems jens.h...@gmx.de wrote: I just figured out that if i write the setActive Method like this i see a update, but i have duplicated Code: private void setActive(final boolean _state) { final ISelectedDAO dao = DAOFactory.getSelectedDAO(this); dao.setActiv(getSelectedItemId(), _state); c = dao.fetchAll(); startManagingCursor(c); final String[] from = new String[] { ISelectedDAO.COLUMN_ACTIV, ISelectedDAO.COLUMN_NAME, ISelectedDAO.COLUMN_ID, ISelectedDAO.COLUMN_STARTING, ISelectedDAO.COLUMN_TILL }; final int[] to = new int[] { R.id.custom_spotoverview_activ, R.id.custom_spotoverview_name, R.id.custom_spotoverview_detail, R.id.custom_spotoverview_wind_from, R.id.custom_spotoverview_wind_to }; shows = new SimpleCursorAdapter(this, R.layout.custom_listview_spotoverview, c, from, to); shows.setViewBinder(new SpotOverviewViewBinder()); setListAdapter(shows); Log.d(LOG_TAG, Updating View); } -- 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] FLAG_CANCEL_CURRENT or FLAG_UPDATE_CURRENT
hello friends... My app sets a repeating alarm and based on user interaction, it might need to change the time set for the broadcast with AlarmManager. It will repeat on the same interval. There is not much in the way of extras. Is the update or cancel flag better in this case? Thanks and regards, Beth -- 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 can I add a button to a linear layout 'right justified'
The problem may be that the TextView atitle has android:layout_width=fill_parent. Try setting it to wrap_content and see if you get better results. Regards, Beth On Jan 5, 1:57 pm, n179911 n179...@gmail.com wrote: Hi, I have a linear layout like this: LinearLayout android:id=@+id/header android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=horizontal android:gravity=center_vertical ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=wrap_content android:layout_gravity=top android:src=@drawable/img1 / TextView android:id=@+id/atitle android:singleLine=true android:layout_width=fill_parent android:layout_height=wrap_content / /LinearLayout And I need to add a button to the above layout programatically which is right justified? I need to do that in code instead of layout xml file (this is because i can't modify that layout xml file) Here is what I am doing: LinearLayout header = (LinearLayout) findViewById(R.id.header); Button buyButton = new Button(this); buyButton.setText(R.string.buy_ringtone); buyButton.setLayoutParams(new LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); header.addView(buyButton); But the button does not appear. Can you please tell me how can i achieve that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Contacts-based app force-closing on Droid, unable to repro
Hey Eric, When I was working on a Droid I found that fields were null unexpectedly when I queried for a specific MIMETYPE. The display name for a contact is not null with a GroupMembership MIMETYPE query but there is no data in the phone number fields. My guess is that the Phone.Number MIMETYPE might not have a display name column. Like me, you may need two queries. One with a MIMETYPE that has display name and another to fetch the numbers where selection is based on the contact_id or raw_contact id collected in the first query. Here is a question for you... How do you put contact data into the Emulator? Unfortunately for me, although contacts can be loaded, the Emulator data cannot be grouped. This means I am not able to use the Emulator at all to test my code since I query for the GroupMembership.CONTENT_ITEM_TYPE. If you or anyone has a suggestion, great, my access to the Droid is limited and I really want to put out a new feature on Alarmoid. Boas Festas! Beth On Dec 23, 9:47 pm, Eric eric.c.willi...@gmail.com wrote: I'm having problems with my application on Droid phones. I am unable to reproduce the problems in the emulator. A co-worker of mine with a Droid also has no issues running my app. Any help you can provide would be much appreciated. My application is called Dialify. It's open source; you can find the code here:http://code.google.com/p/dialify/source/browse/#svn/trunk/Dialify/src... My app queries the contacts DB to display a list of contacts. The user can select contacts to turn them into notifications that can be dialed/ texted. Droid users reported 2 problems: 1) Contacts not appearing 2) App force-closes when they begin to scroll through the contacts list My app creates a cursor over the contacts DB to display contacts. I realized problem #1 was due to using the API level 5 method of access which only shows contacts for the master account. I fixed this, but the force-close issue remains. Unfortunately, I am unable to replicate a force-close in the emulator. I thought maybe it was the number of contacts and created about 200 of them, to no avail. It's been happening to users who use Exchange and users who do not, so I haven't tried getting Exchange contacts into the Emulator. This is how my deployed app retrieves contacts today:http://code.google.com/p/dialify/source/browse/trunk/Dialify/src/org/... Here are some of the changes I made for API level 6 compatibility: //Phone is android.provider.ContactsContract.CommonDataKinds.Phone private static final String[] PROJECTION = new String[] { ContactsContract.Data._ID, //0 Phone.DISPLAY_NAME, //1 Phone.TYPE, //2 Phone.LABEL, //3 Phone.NUMBER, //4 Phone.CONTACT_ID //5 }; private static final String SORT_PHONES_ASC = upper( + Phone.DISPLAY_NAME + ), + Phone.TYPE + , + upper( + Phone.LABEL + ); //Data is android.provider.ContactsContract.Data String selection = Data.MIMETYPE + =' + Phone.CONTENT_ITEM_TYPE + '; //here's the query itself: return _context.getContentResolver().query( ContactsContract.Data.CONTENT_URI, PROJECTION, selection, selectionArgs, //will be null in this case sort.getSort() //will be SORT_PHONES_ASC, above ); //to display the contact I turn it into an internal type (Contact) //_contactTypes comes from resources.getStringArray (android.R.array.phoneTypes) public Contact getContactAtCursor(Cursor cursor) { int typeId = cursor.getInt(2); String type = (typeId == Phone.TYPE_CUSTOM) ? cursor.getString(3) : _contactTypes[typeId - 1]; return new Contact( cursor.getLong(0), //id cursor.getLong(5), //contact ID cursor.getString(1), //display name cursor.getString(4), //number type ); } I realize I can bring up a contact selector using an Intent, but I don't think that will work for me. My app has a custom view of contacts, and it always displays the contacts list. Any guidance, suggestions, feedback or help would be most welcome. I'm not sure how to proceed with this issue. Regards, Eric -- 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: Setting for Use incoming call volume for notifications
I need to bump this thread I face the same problem. My guess is that there is nothing public and anything we might find through source and code into a program could change without notice. Truth is that the shift from SDK 1.1 to SDK 1.5 introduced this tie in and broke my UI! My solution was to pop an alert dialog that will open the settings application. To further complicate the matter, I found that the public action - the intent that is supposed to open the sound preferences page, was broken (on the Hero?). Thus, I cannot navigate to the specific page that holds this setting. I guess maybe an issue needs to be filed. So far I have not taken that step. If anybody has a better solution, please speak up! Thanks and regards, Beth On Dec 12, 11:25 am, Open ldonel...@gmail.com wrote: Hi All- Does anyone know where the value for Use incoming call volume for notifications is stored? This is a checkbox found in the Ringer Volume settings that allows you to set a separate notification volume and incoming call volume. I would like to programatically toggle the value, but I can't figure out where it's stored. I looked at Context.AudioManager, I see methods for controlling the notification volume, but I can't find a setting for separating notification volume from incoming call volume. 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 custom defaults for PreferenceScreen
One pattern for using XML preferences is to run addPreferencesFromResource once and only once, the first time your app is executed. You probably know that preferences can be saved and persist from one run of the application to the next. Use a boolean preference to determine if it is the first run of the app. In subsequent logic and based on conditions, you can set the value of the preference by fetching the shared preferences (getSharedPreferences) and creating an editor to write out the correct value. Set your defaults once, in XML or in code. After that, set the value. It will display in the PreferencesActivity as you expect it to. It sounds like you might run addPreferencesFromResource and load defaults every time. Maybe that is not the case... If your app requires loading defaults each time, just set the correct value after loading defaults, as needed. In the Preferences Activity you can use both onResume and onPreferenceClick to manage the appearance of preferences (that is what I do). You might use these functions to manage preference values as well. I hope this makes sense. Regards, Beth On Dec 11, 6:38 pm, spocky12 spock...@gmail.com wrote: I've encountered the same behaviour a few days ago. I'm wondering if there's a way to fix it. -- 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: Localized to: unknown even though I have localized strings
Hey! I also see the unknown message in my localized application. The first time I loaded a localized app on the Android Market, it read the folders right. Since the (SDK 1.6) Market upgrade I have gotten the unknown message. It looks like a bug should be filed on the Market. Sandscorpio, do you want to take that step? Thanks and regards, Beth On Dec 9, 4:19 pm, tassie christop...@minsontan.com wrote: I have the same issue. I've been ignoring it, inasmuch as my localizations obviously work on the device. Even so, I am wondering what is going on here. Did you ever get a resolution? On Nov 8, 3:46 pm, sandscorpio amit.aggarwa...@gmail.com wrote: I have default strings under res/values/strings.xml andlocalized strings at res/values-de/strings.xml and res/values-es/strings.xml . But when I upload the app to the Market, it shows 'Localizedto:unknown'! If I run the app in the simulator using the German or Spanish locale, thelocalizedstrings show up correctly. 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: Device Specific System Settings
Hi Tom, In doing work on the ringer/notification volume settings I had a similar problem. My solution was to alert the user with a dialog that has a button to open the settings application. Text in the layout gives the user information about how to navigate to the setting themselves. Maybe this can work for your app. Best regards, Beth On Dec 7, 12:29 am, Dianne Hackborn hack...@android.com wrote: If they are not part of the standard system, there is no API for them. It is possible for a vendor to provide an ADT plugin with their own APIs, but afaik HTC has not done this. On Sat, Dec 5, 2009 at 10:24 AM, Tom Reay tomfr...@gmail.com wrote: Hi, I'm stuck on trying to change system settings that are not standard android ones, specifically trying to enable/disable the auto backlight setting on the HTC Hero in code, I can't see anyway to find out the string I need to use when doing Settings.System.get... Thanks for your help -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: TabActivity with scroll
Hi Priyanka, You might implement this functionality using a gallery, a list widget that scrolls sideways. In the Gallery adapter, you can set up each Gallery item as a TextView with a CompoundDrawable icon displayed above the text. A visual 'tab' outline could be set into the background of each item in the list. It's just a possibility if you really want more than 3 or 4 tabs. Regards, Beth On Dec 7, 10:53 am, Mark Murphy mmur...@commonsware.com wrote: I want to use a TabActivity with 6 or 7 or more tabs. However, I do not want to clutter my screen with so many tabs together. Hence, I'd like to be able to show, say, 3 tabs on the screen, and to be able to scroll to the other tabs. How may I achieve this? The built-in tab system does not support this concept. I recommend using fewer tabs, dividing your functionality into multiple activities. -- Mark Murphy (a Commons Guy)http://commonsware.com 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: getting Contact data into the Emulator
OK, well, I put my mind to it and got it done. It's vCard format. I also saved a script with data to do it again (copy vcard files from my hard drive to the emulator pseudo-sdcard) more easily next time. Hopefully this info can help others. Boas Festas! On Dec 4, 6:17 pm, Beth emez...@gmail.com wrote: Update! The 2.0.1emulatorno longer crashes after pressing the menu in Contacts and using the add account module. However, the only option available is to add an Exchange account. Is there another way to addcontacts? Does anybody know the import format if I want to copy a file to my virtual sdcard and import from the sdcard? I mean you Xavier! F1! F1! Help! Help! On Dec 3, 5:49 pm, Beth emez...@gmail.com wrote: Any suggestions for testing aContactapp on eclair? I can't seem to putcontactdata into theemulator On Dec 1, 12:30 pm, Beth emez...@gmail.com wrote: Do you have steps for me to pullContactdata off a phone and put it into anemulatorfor test purposes? The device has either the 1.5 or 1.6 SDK. An alternative datasource would a Gmail file export. If I open theContactsapp and use the Accounts menu in a 2.0emulator the acore process of theemulatorcrashes. Bothcontactsandcontact group data is needed since I do not have a 2.0 device and I have code that needs the data to run. I thought somebody on this list might easily answer. Thanks in advance for any solution. Regards, Beth -- 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: getting Contact data into the Emulator
Update! The 2.0.1 emulator no longer crashes after pressing the menu in Contacts and using the add account module. However, the only option available is to add an Exchange account. Is there another way to add contacts? Does anybody know the import format if I want to copy a file to my virtual sdcard and import from the sdcard? I mean you Xavier! F1! F1! Help! Help! On Dec 3, 5:49 pm, Beth emez...@gmail.com wrote: Any suggestions for testing aContactapp on eclair? I can't seem to putcontactdata into theemulator On Dec 1, 12:30 pm, Beth emez...@gmail.com wrote: Do you have steps for me to pullContactdata off a phone and put it into anemulatorfor test purposes? The device has either the 1.5 or 1.6 SDK. An alternative datasource would a Gmail file export. If I open the Contacts app and use the Accounts menu in a 2.0emulator the acore process of theemulatorcrashes. Both contacts andcontact group data is needed since I do not have a 2.0 device and I have code that needs the data to run. I thought somebody on this list might easily answer. Thanks in advance for any solution. Regards, Beth -- 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: Timer
Sorry, Can't do it! You need to track a timer when you set it. There's no way to poll the system. You can also notice that a set timer does not persist through a phone boot and would need to be reset in that case. On Dec 3, 4:22 am, Sasikumar.S sasikumar.it1...@gmail.com wrote: Hi, How to get whether timer is runnning or not?... That means How to get whether timer is scheduled or not?... -- Thanks Regards Sasikumar.S -- 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: getting Contact data into the Emulator
Any suggestions for testing a Contact app on eclair? I can't seem to put contact data into the emulator On Dec 1, 12:30 pm, Beth emez...@gmail.com wrote: Do you have steps for me to pullContactdata off a phone and put it into anemulatorfor test purposes? The device has either the 1.5 or 1.6 SDK. An alternative datasource would a Gmail file export. If I open the Contacts app and use the Accounts menu in a 2.0emulator the acore process of theemulatorcrashes. Both contacts andcontact group data is needed since I do not have a 2.0 device and I have code that needs the data to run. I thought somebody on this list might easily answer. Thanks in advance for any solution. Regards, Beth -- 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: Phone still making sounds when it's silent?
The command you are using may or may not silence notifications. If the user has separated ringer and notification volumes in the Settings application then the notifications from email or text messages will continue to be heard. On Dec 2, 12:30 am, Teo [GD API Guru] teomina...@gmail.com wrote: Hi, i got reports from some users that after making the phone silent with my app, sometimes, text messages or emails still make sounds. I don't have a phone so this is why i'm asking... The app is making the phone silent this way: final AudioManager am = (AudioManager) context.getSystemService (Context.AUDIO_SERVICE); am.setRingerMode(AudioManager.RINGER_MODE_SILENT); Thanks, Teo -- 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: Checked List View am I missing something
Take a look at the CheckedTextView in the android widget package. Should make things easier. Regards, Beth On Dec 2, 5:55 am, Jose Gomez j...@josecgomez.com wrote: Bump any ideas? please!!! Thanks! Sincerely Jose C Gomez http://www.josecgomez.com Sent from Jacksonville, Florida, United States On Tue, Dec 1, 2009 at 9:24 AM, Jose Gomez j...@josecgomez.com wrote: Hello, I am fairly new to android and I am trying to do a simple and very common grocery list application where you type in an item and add it to a list then you can check that item off as you purchase it. I am using a ListView to do this but I can't seem to get it to show a checkbox instead of just a plain text is this a control that exists in android or do I have to make my own? If so any pointers? I've looker around on on google but I can't find a solid example that uses the XML layout to do this. This is what I have for my layout so far ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical TableLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent TableRow android:gravity=center TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/lblAddItem / /TableRow TableRow android:gravity=center EditText android:id=@+id/txtItemAdd android:layout_width=200px android:layout_height=wrap_content / Button android:id=@+id/btnAddItem android:layout_width=50px android:layout_height=50px android:text=Add / ImageButton android:id=@+id/btnScanItem android:layout_width=60px android:layout_height=50px android:scaleType=center android:src=@drawable/barcode / /TableRow TableRow ListView android:id=@+id/lvItems android:layout_width=fill_parent android:layout_height=wrap_content /ListView /TableRow /TableLayout /LinearLayout Thanks! Sincerely Jose C Gomez http://www.josecgomez.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] getting Contact data into the Emulator
Do you have steps for me to pull Contact data off a phone and put it into an emulator for test purposes? The device has either the 1.5 or 1.6 SDK. An alternative datasource would a Gmail file export. If I open the Contacts app and use the Accounts menu in a 2.0 emulator the acore process of the emulator crashes. Both contacts and contact group data is needed since I do not have a 2.0 device and I have code that needs the data to run. I thought somebody on this list might easily answer. Thanks in advance for any solution. Regards, Beth -- 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] launching settings from my app
Hi there, Has anybody got the right intent to open sound settings? I find that this line of code: startActivity(new Intent (android.provider.Settings.ACTION_SETTINGS)); works great, while this line, which should open exactly the Settings panel I need to show, does not work at all and my application force closes. startActivity(new Intent (android.provider.Settings.ACTION_SOUND_SETTINGS)); I also find that the ACTION_DISPLAY_SETTINGS works on the emulator and then does not work on the Hero device. Does anyone have a suggestion of how to open the sound settings? I am using a try/catch block and an error toast to defensively code my app not to crash this way. Thanks in advance for any help you might offer. Regards, Beth -- 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] Timepicker appearances, the disabled state is ugly
My application has a timepicker widget smack dab in the middle of the screen. In certain conditions, the widget must be disabled. Have you seen that? The default disabled timepicker widget is rather unattractive. Has anyone been able to make it look a little better? I could not find any built-in methods that would help. If you have suggestions for dealing with it, please let me know. Regards, Beth -- 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] BG threads with 1.6; is the AlarmManager starving?
I have a question about the background thread handling change that went into SDK 1.6. I read here that BG threads get placed in a scheduling class that can't use more than 5-10% of the CPU in order to keep the foreground responsive. Do system services get into that scheduling class? My app uses repeating alarms. It was great with 1.5, very reliable. Since the upgrade to 1.6, the phone seems to be dropping some of my repeating broadcasts, especially if I am doing something fun in the foreground like with WIFI when the Alarm is supposed to fire. I do not have any of the task killer programs that have been a hot topic lately. To be clear, the dropped alarm broadcast behavior is intermittent. I am not 100% sure if I really am doing something when it has failed. If the timer is a one shot, it seems to work better but there is no real empirical evidence here. My phone is usually in my pocket when I fire one of the one shot alarms. If my theory about system services in the background scheduling class is correct, then I probably cannot find a workaround or defensively code a solution. Will it be the same in 2.0? Have others seen issues with alarms and with the setRepeating method? I am looking for suggestions to troubleshoot this problem. How can I determine if the problem is the broadcast, if it is the repeating alarm creation, or if there is some other issue like low memory coming in to play. Any ideas? Thanks and regards, Beth --~--~-~--~~~---~--~~ 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: BG threads with 1.6; is the AlarmManager starving?
That's good news. Thanks for the quick response. Here is a follow on... Would the resulting execution of my broadcast receiver from the AlarmManager broadcast go into the background thread pool or get into the foreground inheriting from the AlarmManager? I'm relieved to know that a system service will not starve and now I want to know if onReceive is sure to get all the CPU time it needs. On Oct 30, 5:51 am, Dianne Hackborn hack...@android.com wrote: No, the alarm manager does not run at the background priority, and when delivering an intent broadcast to an application it is actually pulled into the foreground scheduling class (else there would often be ANRs and such). On Thu, Oct 29, 2009 at 11:31 PM, Beth emez...@gmail.com wrote: I have a question about the background thread handling change that went into SDK 1.6. I read here that BG threads get placed in a scheduling class that can't use more than 5-10% of the CPU in order to keep the foreground responsive. Do system services get into that scheduling class? My app uses repeating alarms. It was great with 1.5, very reliable. Since the upgrade to 1.6, the phone seems to be dropping some of my repeating broadcasts, especially if I am doing something fun in the foreground like with WIFI when the Alarm is supposed to fire. I do not have any of the task killer programs that have been a hot topic lately. To be clear, the dropped alarm broadcast behavior is intermittent. I am not 100% sure if I really am doing something when it has failed. If the timer is a one shot, it seems to work better but there is no real empirical evidence here. My phone is usually in my pocket when I fire one of the one shot alarms. If my theory about system services in the background scheduling class is correct, then I probably cannot find a workaround or defensively code a solution. Will it be the same in 2.0? Have others seen issues with alarms and with the setRepeating method? I am looking for suggestions to troubleshoot this problem. How can I determine if the problem is the broadcast, if it is the repeating alarm creation, or if there is some other issue like low memory coming in to play. Any ideas? Thanks and regards, Beth -- 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: BG threads with 1.6; is the AlarmManager starving?
OK, but my application is not running at the time. Does that mean it goes into the foreground thread pool even if there is no window? There is supposed to be a notification drawn on the top left but that might not qualify the code into the foreground. On Fri, Oct 30, 2009 at 10:12 AM, Mark Murphy mmur...@commonsware.comwrote: Beth wrote: Would the resulting execution of my broadcast receiver from the AlarmManager broadcast go into the background thread pool or get into the foreground inheriting from the AlarmManager? BroadcastReceiver is invoked on the UI thread, which is to say, the primary thread for your application. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- Mike Ditka http://www.brainyquote.com/quotes/authors/m/mike_ditka.html - If God had wanted man to play soccer, he wouldn't have given us arms. --~--~-~--~~~---~--~~ 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: BG threads with 1.6; is the AlarmManager starving?
Sorry but I still need clarification here. This new 1.6 feature distinguishes between foreground and background and would seem to alter thread priorities based on that characteristic despite all priorities being normal. Assume that when the broadcast receiver is called, another application might have the UI Thread by running an interactive window with the Android end user. In this case, does onReceive run in the foreground or background? Dianne made clear that the System Service is not starved and the broadcast is sent. It still looks to me like the resulting broadcast receiver may not be getting the CPU. Is there any way to defensively code for this situation? Regards, Beth On Oct 30, 2009 11:03 AM, Mark Murphy mmur...@commonsware.com wrote: Beth Mezias wrote: OK, but my application is not running at the time. Sure it is. If your code runs, your application is running. Does that mean it goes into the foreground thread pool even if there is no window? Unless specifically documented, all threads in Android are normal priority. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Program... --~--~-~--~~~---~--~~ 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: BG threads with 1.6; is the AlarmManager starving?
It's intermittent. I don't read anything about broadcast receivers in Dianne's response. Sent from my mobile. Regards, Beth On Oct 30, 2009 11:32 AM, Mark Murphy mmur...@commonsware.com wrote: Beth Mezias wrote: Assume that when the broadcast receiver is called, another application might have the UI Thread by running an interactive window with the Android end user. In this case, does onReceive run in the foreground or background? According to Ms. Hackborn's previous reply, the foreground. Bear in mind that each Android application runs in its own process (by default) and has its own threads, so there are many UI Threads on your device at any one time. It still looks to me like the resulting broadcast receiver may not be getting the CPU. Can you create a sample application that demonstrates the problem, then post it and your description to http://b.android.com? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Pr... --~--~-~--~~~---~--~~ 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: BG threads with 1.6; is the AlarmManager starving?
Broadcast receiver's priority Sent from my mobile. Regards, Beth On Oct 30, 2009 11:41 AM, Beth Mezias emez...@gmail.com wrote: It's intermittent. I don't read anything about broadcast receivers in Dianne's response. Sent from my mobile. Regards, Beth On Oct 30, 2009 11:32 AM, Mark Murphy mmur...@commonsware.com wrote: Beth Mezias wrot... -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Pr... --~--~-~--~~~---~--~~ 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: BG threads with 1.6; is the AlarmManager starving?
Right, right... Dianne, could you possibly clarify whether or not the receiver goes in the foreground? Sent from my mobile. Regards, Beth On Oct 30, 2009 11:46 AM, Mark Murphy mmur...@commonsware.com wrote: Beth Mezias wrote: I don't read anything about broadcast receivers in Dianne's response. No, the alarm manager does not run at the background priority, and when delivering an intent broadc... I am interpreting it as being the act of delivering an intent broadcast, which is to say, calling onReceive() on the BroadcastReceiver. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~... --~--~-~--~~~---~--~~ 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: ListView vs. ListActivity different default behavior
Does your ListView have a width set to fill_parent? On Oct 26, 5:30 pm, skyhigh skyhigh1...@gmail.com wrote: I have an application which has some activities that display a single list and extends ListActivity. The application also has other activities that have several things on the screen in addition to a list, so these activity classes use extends Activity and then include a ListView in the layout file. I have noticed that ListActivity provides different default behavior than the behavior provided by putting ListView in a layout file. When the list is presented on the screen and the user touches an item in the list the active area on the screen which responds to the touch is different for ListActivity vs ListView. For ListActivity I can touch anywhere on the row and it will respond, but for ListView I must touch an area of the row where a word is displayed. With ListView if the row is blank on the right side of the screen (because the word or phrase is short), when I touch the right side of the row nothing happens. It only responds to touches on the word itself. With ListActivity I can touch the blank area of the row and it works fine. I think that this must be the result of ListActivity changing some setting on the list which is not provided as a default by ListView. The behavior of responding to a touch anywhere on the row is much nicer than the default behavior I get when using ListView. With ListView, it is very annoying to touch the row but get no response because I didn't touch the word itself. Does anyone know why these behave differently? Does anyone know what setting I should change on ListView to get the nicer behavior that is the default with ListActivity? --~--~-~--~~~---~--~~ 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: updatePeriodMillis not working for widget on 1.6
Here is a related question. Are there other reasons to say the Alarm service is unreliable? My app uses repeating alarms. It was great with 1.5, very reliable. Since the upgrade to 1.6, the phone seems to be dropping some of my repeating broadcasts. I do not have any task killer programs, or at least I did not knowingly install any. Notice that I use unique requestCodes in the creation of my PendingIntent (children.getInt(0) in the code snippet below) to insure that the correct number of distinct alarms is created and to cancel any of those alarms at a later point in time, should that become necessary. Has the use of the requestCode parameter changed with the 1.6 SDK? almMgr.setRepeating (AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), SchedulerActivity.WEEKINMILLIS, PendingIntent.getBroadcast(ctxt, children.getInt(0), new Intent(ctxt, SoundOffTimer.class), PendingIntent.FLAG_UPDATE_CURRENT)); children.moveToNext(); The dropped broadcast behavior is intermittent. When the timer is a one shot, it seems to work correctly. I am wondering if others on the list have seen issues with the setRepeating method. I am also looking for suggestions for troubleshooting this problem. How can I determine if the problem is the broadcast, if it is the repeating alarm creation, or if there is some other issue like low memory coming in to play. Any ideas? Thanks and regards, Beth On Oct 23, 6:15 pm, Dianne Hackborn hack...@android.com wrote: On Fri, Oct 23, 2009 at 6:16 AM, String sterling.ud...@googlemail.comwrote: I'm already using alarms to drive my widget updates. Problem is, alarms are unreliable, especially with the proliferation of task killer apps which abuse the API (see http://groups.google.com/group/android-developers/browse_thread/threa... ). People have these running in the background, then I get complaints that my clock has stopped. Well the underlying problem there is these #$#$#!! apps abusing that API. I so regret having made that available. I should have realized it was a bad idea, because it violates a very basic tenant: one application should not be able to disrupt the behavior of another. Anyway, if possible it would be great if you chould tell your users that their task killer app is causing their problems. And it's not going to just cause problems with alarms: it will unpost any notifications you have, stop services you have running, etc. -- 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: Bold a row in ListView programmatically
Maybe your text settings are overwritten by the getView method of the simple adapter. That is the method where you want to set text characteristics. Otherwise a scroll down the list and return to item 2 will remove your bold. Good luck! On Oct 21, 7:41 pm, cartoontan tap.sop...@gmail.com wrote: I have created a ListView with rows of text+icon. On certain conditions, I want to BOLD the text on a particular row. I first tried it out in the On-Click and it works. myListView.setOnItemClickListener(new OnItemClickListener(){ public void onItemClick(AdapterView? parent, View v, int position,long id) { TextView b1 = (TextView) v.findViewById (R.id.itemText); b1.setTypeface(null, Typeface.BOLD); Log.i(TAG, onItemClick ...+b1.getText()); //b1.setText(testing); }}); However when I put the codes into a function and call it (I created a menu item to activate it), the text does not become bold. public void setBold() { View v = (View) mySimpleAdapter.getView(2, null, myListView); // get row 3 TextView tv2 = (TextView) v.findViewById(R.id.itemText); tv2.setTypeface(null, Typeface.BOLD); Log.i(TAG, setBold ...+tv2.getText()); tv2.setText(testing); //v.invalidate(); //mySimpleAdapter.notifyDataSetChanged(); } The Log in setBold function does show up, so I believe the codes in setBold() are being executed. What is so different about on-Click that refreshed the ListView but not through the function? I am using the default ListView and a SimpleAdapter to populate the List. Is there something I should add to the setBold() to refresh the view or is there other better way to change the textView to bold? --~--~-~--~~~---~--~~ 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] Market upgrade requires same certificate
Although I am using the same certificate and keystore, I am not able to upload an upgrade of my application to the Android Market. The key is the same but may not appear to be since I changed platforms from PC to Mac. It is also possible that this is my mistake rather than a bug. Although the keystore is obviously named and the password is correct, I might have created and used some other key... It has been months since I uploaded the last version of the app. Is there anything I can do to override the certificate errors I am hitting when I use the 'upload upgrade' link? The error is The apk must be signed with at least one certificate in common with the previous version. To try and get around this, I unpublished, put in the updated apk, got the same error, still no go. I unpublished and pushed out a refactored apk. No go. I finally refactored to change the package name which allows me to upload the upgrade as a new application. Of course, the old app is still in place and I can't migrate existing users to give them the upgrade. Can I solve this problem? If not, the Market is going to be a mess of many versions of the same applications. (it already is messed up this way, no? :) Of course I like the added security of encryption and certificates so that nobody can hack my app and upload malicious code under my name. Today the protection is hampering my efforts, today it is inflexible. Can I get a one time work-around for the certificate requirement so that an upgrade will be published without the same certificate? Any feedback will be appreciated. Regards, Beth --~--~-~--~~~---~--~~ 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: System Setting ties notification volume to ringer volume
Hello again, So far no answers... Does anyone know of a way to simply detect that they are tied together. The MODE_RINGER_STREAMS_AFFECTED was a red herring. Thanks and regards! On Oct 4, 1:38 am, Beth Mezias emez...@gmail.com wrote: Hi all, Do you know a way to programmatically change the default system setting that ties the ringer volume to the notification volume? In system settings I can see a constant called MODE_RINGER_STREAMS_AFFECTED. Is there a way that I can change this setting? I want to let the phone ring while making the notification volume zero. When Android has the phone and notification volume tied together in settings the notification volume does not change with a call to the Audio Manager service to setStreamVolume(AudioManager.STREAM_NOTIFICATION, 0, 0); Any pointers would be great. Thanks and regards, Beth --~--~-~--~~~---~--~~ 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] System Setting ties notification volume to ringer volume
Hi all, Do you know a way to programmatically change the default system setting that ties the ringer volume to the notification volume? In system settings I can see a constant called MODE_RINGER_STREAMS_AFFECTED. Is there a way that I can change this setting? I want to let the phone ring while making the notification volume zero. When Android has the phone and notification volume tied together in settings the notification volume does not change with a call to the Audio Manager service to setStreamVolume(AudioManager.STREAM_NOTIFICATION, 0, 0); Any pointers would be great. Thanks and regards, Beth --~--~-~--~~~---~--~~ 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: 1.6 error with NumericShaper.class?
Aargh, finally worked out that I duplicated the android jar in my Build Path libraries. Not sure how the properties got into that state but I am relieved to solve the problem. On Sep 26, 4:44 pm, Beth emez...@gmail.com wrote: In an effort to brute force a solution I removed the only instance of the NumericShaper class I could find in my project, deleting from android.jar. After removing the NumericShaper class from the android.jar file that comes with the SDK, the next class in the java/ awt package structure throws the error. If I take that class out, the system moves on to the java/beans classes and throws the error on that part of the class tree. If I remove the entire set of classes under java from the jar, then a javax/crypto class throws the exception. Of course, removing the java tree breaks the app. I looked at the android.jar file properties and they seem fine. The checksum on the zip file is a match. I downloaded and overwrote existing SDK files in my effort to solve, to no avail. What's gone wrong? Suddenly, Eclipse is completely unusable with projects that were running fine last week. The MotoDev version of Eclipse is behaving the same way. Any workarounds or suggestions would be deeply appreciated. Although it does not make sense, my next step is to downgrade and try an older version of Eclipse to see if I can get back on track. What a mess! Thanks and regards, Beth On Sep 25, 6:47 pm, Beth Mezias emez...@gmail.com wrote: Nope, both apps are 100% Android SDK objects. Sent from my mobile. Regards, Beth On Sep 25, 2009 6:39 PM, Xavier Ducrohet x...@android.com wrote: Are you including 3rd party libraries in your application? Those might contain code that access (or include) classes in the java.awt namespace which are not supported. Xav On Fri, Sep 25, 2009 at 3:01 PM, Beth emez...@gmail.com wrote: This is getting out of hand! A second project in my Eclipse workspace started throwing the error. I fooled around with the clean project and fix properties commands and got nowhere. I rolled back from 1.6 SDK to 1.5 only to find that did not resolve the problem. I even switched to the MotoDev Studio program, built atop Eclipse. This error seems a bit intermittent and I suspect it is the environment because when I created a new project where there is only the MainActivity stub, no code entered into the project yet, I got an error. That one went away but I cannot shake the error from my other two projects. I deleted the existing project, created my project new, and without even importing the old project source, I got the error. Another reason I suspect configuration is that the compile gets through all of the dalvik classes and then chokes on the very first java package. In other words, the system passes through all my files, all the android and dalvik classes and then throws an error once it hits java. I am not using the awt class unless some other android class is calling it. The error is pasted here. If there are any Eclipse configuration experts reading, I would really welcome ideas. To be clear, I am running on Mac OS v 10.5.8 with JDK 5. Is there an environment variable I need, something on the path? Is there a JRE setup I could be missing? [2009-09-25 14:48:29 -Alarmoid]processing dalvik/system/ Zygote.class... [2009-09-25 14:48:29 -Alarmoid]processing java/awt/font/ NumericShaper.class... [2009-09-25 14:48:29 -Alarmoid] trouble processing java/awt/font/NumericShaper.class: [2009-09-25 14:48:29 -Alarmoid] Attempt to include a core VM class in something other than a core library. It is likely that y... [2009-09-25 14:48:29 -Alarmoid]1 error; aborting [2009-09-25 14:48:29 -Alarmoid]Conversion to Dalvik format failed with error 1 On Sep 18, 1:59 pm, Beth emez...@gmail.com wrote: Thanks for the suggestion, but, I am not using that lib in my code. I do not have any NumericShaper class call and cannot see how to clear the error. Could it be some Eclipse glitch happening with the import of my project from another machine? I guess it's just me with this problem! A second error cropped up where the apk file is not found on my system in bin and I cannot create a new one. Unless there is a better idea, my next step is probably to try and import the code into a new project to see if the weirdness will go away. Wish me luck! On Sep 17, 10:02 pm, Raphael r...@android.com wrote: IIRC awt is a separate library that you need to declare explicitly in your application manifest. http://www.google.com/search?hl=enq=android+uses-library+awt R/ On Thu, Sep 17, 2009 at 1:49 PM,BethMezias emez...@gmail.com wrote:Hiya,... -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ You received
[android-developers] Re: 1.6 error with NumericShaper.class?
In an effort to brute force a solution I removed the only instance of the NumericShaper class I could find in my project, deleting from android.jar. After removing the NumericShaper class from the android.jar file that comes with the SDK, the next class in the java/ awt package structure throws the error. If I take that class out, the system moves on to the java/beans classes and throws the error on that part of the class tree. If I remove the entire set of classes under java from the jar, then a javax/crypto class throws the exception. Of course, removing the java tree breaks the app. I looked at the android.jar file properties and they seem fine. The checksum on the zip file is a match. I downloaded and overwrote existing SDK files in my effort to solve, to no avail. What's gone wrong? Suddenly, Eclipse is completely unusable with projects that were running fine last week. The MotoDev version of Eclipse is behaving the same way. Any workarounds or suggestions would be deeply appreciated. Although it does not make sense, my next step is to downgrade and try an older version of Eclipse to see if I can get back on track. What a mess! Thanks and regards, Beth On Sep 25, 6:47 pm, Beth Mezias emez...@gmail.com wrote: Nope, both apps are 100% Android SDK objects. Sent from my mobile. Regards, Beth On Sep 25, 2009 6:39 PM, Xavier Ducrohet x...@android.com wrote: Are you including 3rd party libraries in your application? Those might contain code that access (or include) classes in the java.awt namespace which are not supported. Xav On Fri, Sep 25, 2009 at 3:01 PM, Beth emez...@gmail.com wrote: This is getting out of hand! A second project in my Eclipse workspace started throwing the error. I fooled around with the clean project and fix properties commands and got nowhere. I rolled back from 1.6 SDK to 1.5 only to find that did not resolve the problem. I even switched to the MotoDev Studio program, built atop Eclipse. This error seems a bit intermittent and I suspect it is the environment because when I created a new project where there is only the MainActivity stub, no code entered into the project yet, I got an error. That one went away but I cannot shake the error from my other two projects. I deleted the existing project, created my project new, and without even importing the old project source, I got the error. Another reason I suspect configuration is that the compile gets through all of the dalvik classes and then chokes on the very first java package. In other words, the system passes through all my files, all the android and dalvik classes and then throws an error once it hits java. I am not using the awt class unless some other android class is calling it. The error is pasted here. If there are any Eclipse configuration experts reading, I would really welcome ideas. To be clear, I am running on Mac OS v 10.5.8 with JDK 5. Is there an environment variable I need, something on the path? Is there a JRE setup I could be missing? [2009-09-25 14:48:29 - Alarmoid]processing dalvik/system/ Zygote.class... [2009-09-25 14:48:29 - Alarmoid]processing java/awt/font/ NumericShaper.class... [2009-09-25 14:48:29 - Alarmoid] trouble processing java/awt/font/NumericShaper.class: [2009-09-25 14:48:29 - Alarmoid] Attempt to include a core VM class in something other than a core library. It is likely that y... [2009-09-25 14:48:29 - Alarmoid]1 error; aborting [2009-09-25 14:48:29 - Alarmoid]Conversion to Dalvik format failed with error 1 On Sep 18, 1:59 pm, Beth emez...@gmail.com wrote: Thanks for the suggestion, but, I am not using that lib in my code. I do not have any NumericShaper class call and cannot see how to clear the error. Could it be some Eclipse glitch happening with the import of my project from another machine? I guess it's just me with this problem! A second error cropped up where the apk file is not found on my system in bin and I cannot create a new one. Unless there is a better idea, my next step is probably to try and import the code into a new project to see if the weirdness will go away. Wish me luck! On Sep 17, 10:02 pm, Raphael r...@android.com wrote: IIRC awt is a separate library that you need to declare explicitly in your application manifest. http://www.google.com/search?hl=enq=android+uses-library+awt R/ On Thu, Sep 17, 2009 at 1:49 PM,BethMezias emez...@gmail.com wrote:Hiya,... -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ 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
[android-developers] Re: 1.6 error with NumericShaper.class?
This is getting out of hand! A second project in my Eclipse workspace started throwing the error. I fooled around with the clean project and fix properties commands and got nowhere. I rolled back from 1.6 SDK to 1.5 only to find that did not resolve the problem. I even switched to the MotoDev Studio program, built atop Eclipse. This error seems a bit intermittent and I suspect it is the environment because when I created a new project where there is only the MainActivity stub, no code entered into the project yet, I got an error. That one went away but I cannot shake the error from my other two projects. I deleted the existing project, created my project new, and without even importing the old project source, I got the error. Another reason I suspect configuration is that the compile gets through all of the dalvik classes and then chokes on the very first java package. In other words, the system passes through all my files, all the android and dalvik classes and then throws an error once it hits java. I am not using the awt class unless some other android class is calling it. The error is pasted here. If there are any Eclipse configuration experts reading, I would really welcome ideas. To be clear, I am running on Mac OS v 10.5.8 with JDK 5. Is there an environment variable I need, something on the path? Is there a JRE setup I could be missing? [2009-09-25 14:48:29 - Alarmoid]processing dalvik/system/ Zygote.class... [2009-09-25 14:48:29 - Alarmoid]processing java/awt/font/ NumericShaper.class... [2009-09-25 14:48:29 - Alarmoid] trouble processing java/awt/font/NumericShaper.class: [2009-09-25 14:48:29 - Alarmoid] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will most assuredly not work. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine binary, as opposed to compiling an application -- then use the --core-library option to suppress this error message. If you go ahead and use --core-library but are in fact building an application, then please be aware that your build will still fail at some point; you will simply be denied the pleasure of reading this helpful error message. [2009-09-25 14:48:29 - Alarmoid]1 error; aborting [2009-09-25 14:48:29 - Alarmoid]Conversion to Dalvik format failed with error 1 On Sep 18, 1:59 pm, Beth emez...@gmail.com wrote: Thanks for the suggestion, but, I am not using that lib in my code. I do not have any NumericShaper class call and cannot see how to clear the error. Could it be some Eclipse glitch happening with the import of my project from another machine? I guess it's just me with this problem! A second error cropped up where the apk file is not found on my system in bin and I cannot create a new one. Unless there is a better idea, my next step is probably to try and import the code into a new project to see if the weirdness will go away. Wish me luck! On Sep 17, 10:02 pm, Raphael r...@android.com wrote: IIRC awt is a separate library that you need to declare explicitly in your application manifest.http://www.google.com/search?hl=enq=android+uses-library+awt R/ On Thu, Sep 17, 2009 at 1:49 PM,BethMezias emez...@gmail.com wrote: Hiya, When I try to open my SDK 1.1 project with Donut, I get an error (pasted below). I did a search and cannot find the NumericShaper anywhere in my code. As a matter of fact, I cannot even find an import or call to the java/awt package. Can I get a clue about how I might solve it? Thanks and regards, Beth [2009-09-17 13:44:14 - Flipper]processing dalvik/system/Zygote.class... [2009-09-17 13:44:14 - Flipper]processing java/awt/font/NumericShaper.class... [2009-09-17 13:44:14 - Flipper] trouble processing java/awt/font/NumericShaper.class: [2009-09-17 13:44:14 - Flipper] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will most assuredly not work. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine binary, as opposed to compiling an application -- then use the --core-library option to suppress this error message. If you go ahead and use --core-library but are in fact building an application, then please be aware that your build will still fail at some point; you will simply be denied the pleasure of reading this helpful error message. [2009-09-17 13:44:14 - Flipper]1 error; aborting [2009-09-17 13:44:14 - Flipper]Conversion to Dalvik format failed with error 1 [2009-09-17 13:44:14 - Flipper]Refreshing resource folders. [2009-09-17 13:44:14 - Flipper]Starting incremental
[android-developers] Re: 1.6 error with NumericShaper.class?
Nope, both apps are 100% Android SDK objects. Sent from my mobile. Regards, Beth On Sep 25, 2009 6:39 PM, Xavier Ducrohet x...@android.com wrote: Are you including 3rd party libraries in your application? Those might contain code that access (or include) classes in the java.awt namespace which are not supported. Xav On Fri, Sep 25, 2009 at 3:01 PM, Beth emez...@gmail.com wrote: This is getting out of hand! A second project in my Eclipse workspace started throwing the error. I fooled around with the clean project and fix properties commands and got nowhere. I rolled back from 1.6 SDK to 1.5 only to find that did not resolve the problem. I even switched to the MotoDev Studio program, built atop Eclipse. This error seems a bit intermittent and I suspect it is the environment because when I created a new project where there is only the MainActivity stub, no code entered into the project yet, I got an error. That one went away but I cannot shake the error from my other two projects. I deleted the existing project, created my project new, and without even importing the old project source, I got the error. Another reason I suspect configuration is that the compile gets through all of the dalvik classes and then chokes on the very first java package. In other words, the system passes through all my files, all the android and dalvik classes and then throws an error once it hits java. I am not using the awt class unless some other android class is calling it. The error is pasted here. If there are any Eclipse configuration experts reading, I would really welcome ideas. To be clear, I am running on Mac OS v 10.5.8 with JDK 5. Is there an environment variable I need, something on the path? Is there a JRE setup I could be missing? [2009-09-25 14:48:29 - Alarmoid]processing dalvik/system/ Zygote.class... [2009-09-25 14:48:29 - Alarmoid]processing java/awt/font/ NumericShaper.class... [2009-09-25 14:48:29 - Alarmoid] trouble processing java/awt/font/NumericShaper.class: [2009-09-25 14:48:29 - Alarmoid] Attempt to include a core VM class in something other than a core library. It is likely that y... [2009-09-25 14:48:29 - Alarmoid]1 error; aborting [2009-09-25 14:48:29 - Alarmoid]Conversion to Dalvik format failed with error 1 On Sep 18, 1:59 pm, Beth emez...@gmail.com wrote: Thanks for the suggestion, but, I am not using that lib in my code. I do not have any NumericShaper class call and cannot see how to clear the error. Could it be some Eclipse glitch happening with the import of my project from another machine? I guess it's just me with this problem! A second error cropped up where the apk file is not found on my system in bin and I cannot create a new one. Unless there is a better idea, my next step is probably to try and import the code into a new project to see if the weirdness will go away. Wish me luck! On Sep 17, 10:02 pm, Raphael r...@android.com wrote: IIRC awt is a separate library that you need to declare explicitly in your application manifest. http://www.google.com/search?hl=enq=android+uses-library+awt R/ On Thu, Sep 17, 2009 at 1:49 PM,BethMezias emez...@gmail.com wrote:Hiya,... -- Xavier Ducrohet Android Developer Tools Engineer Google Inc. --~--~-~--~~~---~--~~ 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: 1.6 error with NumericShaper.class?
Thanks for the suggestion, but, I am not using that lib in my code. I do not have any NumericShaper class call and cannot see how to clear the error. Could it be some Eclipse glitch happening with the import of my project from another machine? I guess it's just me with this problem! A second error cropped up where the apk file is not found on my system in bin and I cannot create a new one. Unless there is a better idea, my next step is probably to try and import the code into a new project to see if the weirdness will go away. Wish me luck! On Sep 17, 10:02 pm, Raphael r...@android.com wrote: IIRC awt is a separate library that you need to declare explicitly in your application manifest.http://www.google.com/search?hl=enq=android+uses-library+awt R/ On Thu, Sep 17, 2009 at 1:49 PM, Beth Mezias emez...@gmail.com wrote: Hiya, When I try to open my SDK 1.1 project with Donut, I get an error (pasted below). I did a search and cannot find the NumericShaper anywhere in my code. As a matter of fact, I cannot even find an import or call to the java/awt package. Can I get a clue about how I might solve it? Thanks and regards, Beth [2009-09-17 13:44:14 - Flipper]processing dalvik/system/Zygote.class... [2009-09-17 13:44:14 - Flipper]processing java/awt/font/NumericShaper.class... [2009-09-17 13:44:14 - Flipper] trouble processing java/awt/font/NumericShaper.class: [2009-09-17 13:44:14 - Flipper] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will most assuredly not work. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine binary, as opposed to compiling an application -- then use the --core-library option to suppress this error message. If you go ahead and use --core-library but are in fact building an application, then please be aware that your build will still fail at some point; you will simply be denied the pleasure of reading this helpful error message. [2009-09-17 13:44:14 - Flipper]1 error; aborting [2009-09-17 13:44:14 - Flipper]Conversion to Dalvik format failed with error 1 [2009-09-17 13:44:14 - Flipper]Refreshing resource folders. [2009-09-17 13:44:14 - Flipper]Starting incremental Pre Compiler: Checking resource changes. [2009-09-17 13:44:14 - Flipper]Manifest min SDK version (2) is lower than project target API level (4) [2009-09-17 13:44:14 - Flipper]Nothing to pre compile! --~--~-~--~~~---~--~~ 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] 1.6 error with NumericShaper.class?
Hiya, When I try to open my SDK 1.1 project with Donut, I get an error (pasted below). I did a search and cannot find the NumericShaper anywhere in my code. As a matter of fact, I cannot even find an import or call to the java/awt package. Can I get a clue about how I might solve it? Thanks and regards, Beth [2009-09-17 13:44:14 - Flipper]processing dalvik/system/Zygote.class... [2009-09-17 13:44:14 - Flipper]processing java/awt/font/NumericShaper.class... [2009-09-17 13:44:14 - Flipper] trouble processing java/awt/font/NumericShaper.class: [2009-09-17 13:44:14 - Flipper] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will most assuredly not work. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine binary, as opposed to compiling an application -- then use the --core-library option to suppress this error message. If you go ahead and use --core-library but are in fact building an application, then please be aware that your build will still fail at some point; you will simply be denied the pleasure of reading this helpful error message. [2009-09-17 13:44:14 - Flipper]1 error; aborting [2009-09-17 13:44:14 - Flipper]Conversion to Dalvik format failed with error 1 [2009-09-17 13:44:14 - Flipper]Refreshing resource folders. [2009-09-17 13:44:14 - Flipper]Starting incremental Pre Compiler: Checking resource changes. [2009-09-17 13:44:14 - Flipper]Manifest min SDK version (2) is lower than project target API level (4) [2009-09-17 13:44:14 - Flipper]Nothing to pre compile! --~--~-~--~~~---~--~~ 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: Probing for an already set Alarm?
All you need to do is to set different request codes in your pending intent parameters to avoid this situation: The setting of this new alarm, and the throwing out of the existing alarm is what I want to avoid. A correction to one line of code would let you use the alarm manager (sorry if my earlier post was unclear). You might further improve by using a Handler, thread or Async Task to collect your second sample after a 15s sleep and then trigger a repeating alarm every ten minutes thereafter. To be clear, a phone reboot will cancel the repeating alarm but you can catch the event and restart. Good luck! On Sep 15, 10:31 pm, Walles johan.wal...@gmail.com wrote: The race is on then, we'll see who's the first to market! Cheers :-) / J On 16 Sep, 06:44, Dianne Hackborn hack...@android.com wrote: Um, 1.6 will do this, and is probably what I would say is the right way in that the implementation is very closely integrated into the system to monitor CPU usage, network usage, wakelock usage, screen usage, etc, etc. On Tue, Sep 15, 2009 at 5:02 AM, Walles johan.wal...@gmail.com wrote: Good point :-), here's the plan: I'm writing an app to find out what apps are using the most CPU time (which I hope will correlate with battery drain). It's possible to get a snapshot picture of this by looking at /proc: http://bazaar.launchpad.net/~walles/drain-o-meter/trunk/annotate/head...http://bazaar.launchpad.net/%7Ewalles/drain-o-meter/trunk/annotate/he... A single snapshot picture will however miss apps that start, run for some time and then exit. So what I want to do is to take *regular* snapshots. I take the difference between the last two snapshots and add the difference to a process name - number of ticks Map. Snapshotting rules are: * Snapshots should be taken at regular intervals. * The first two snapshots should be taken in quick succession to be able to quickly present the first measurement to the user. * It must be possible for an UI app to look at the result of the snapshotting. To get the whole thing going, I'm letting the UI part of the application start the sampler in the background. When the sampling is first started it needs to take two snapshots quickly (see above). The rest of the samples should be taken at longer intervals. I first tried to do this using alarms, but I didn't manage to get the two quick samples first and the rest further apart behavior with alarms: http://bazaar.launchpad.net/~walles/drain-o-meter/trunk/files/39http://bazaar.launchpad.net/%7Ewalles/drain-o-meter/trunk/files/39 I now have a working implementation with a background service: http://bazaar.launchpad.net/~walles/drain-o-meter/trunk/files/57http://bazaar.launchpad.net/%7Ewalles/drain-o-meter/trunk/files/57 Suggestions on how I should *really* be doing welcome :-). Cheers //Johan On 9 Sep, 16:47, Mark Murphy mmur...@commonsware.com wrote: Walleswrote: I'll use a Service instead of an Alarm and keep it running in the background. That way I can keep track of it myself. Please don't. For starters, it won't work, since the service may get killed off by the user or the system. Also, while the service is in memory, you are taking up one process' worth of RAM. If you could explain to us what the effect is you are trying to achieve (versus low-level technical statements, like not to overwrite an existing alarm with a new one), we might be able to suggest alternative patterns. -- Mark Murphy (a Commons Guy)http://commonsware.com| http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- 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: Probing for an already set Alarm?
What does the background service do, exactly? Sorry, I don't really want to sort through the two versions of your code. What I did see in the alarm version leads me to suggest that you can set a repeating alarm in your Activity after collecting the initial data rather than set a new Alarm each time your broadcast receiver is called. If you describe what went wrong trying to use the alarm manager maybe you can drop the excess baggage of a background service. Since you are trying to measure performance, you really ought to go the extra mile to drop the extra process and be sure your app does all it should to mitigate any performance impact. On Sep 15, 5:02 am, Walles johan.wal...@gmail.com wrote: Good point :-), here's the plan: I'm writing an app to find out what apps are using the most CPU time (which I hope will correlate with battery drain). It's possible to get a snapshot picture of this by looking at /proc:http://bazaar.launchpad.net/~walles/drain-o-meter/trunk/annotate/head... A single snapshot picture will however miss apps that start, run for some time and then exit. So what I want to do is to take *regular* snapshots. I take the difference between the last two snapshots and add the difference to a process name - number of ticks Map. Snapshotting rules are: * Snapshots should be taken at regular intervals. * The first two snapshots should be taken in quick succession to be able to quickly present the first measurement to the user. * It must be possible for an UI app to look at the result of the snapshotting. To get the whole thing going, I'm letting the UI part of the application start the sampler in the background. When the sampling is first started it needs to take two snapshots quickly (see above). The rest of the samples should be taken at longer intervals. I first tried to do this using alarms, but I didn't manage to get the two quick samples first and the rest further apart behavior with alarms:http://bazaar.launchpad.net/~walles/drain-o-meter/trunk/files/39 I now have a working implementation with a background service:http://bazaar.launchpad.net/~walles/drain-o-meter/trunk/files/57 Suggestions on how I should *really* be doing welcome :-). Cheers //Johan On 9 Sep, 16:47, Mark Murphy mmur...@commonsware.com wrote: Walleswrote: I'll use a Service instead of an Alarm and keep it running in the background. That way I can keep track of it myself. Please don't. For starters, it won't work, since the service may get killed off by the user or the system. Also, while the service is in memory, you are taking up one process' worth of RAM. If you could explain to us what the effect is you are trying to achieve (versus low-level technical statements, like not to overwrite an existing alarm with a new one), we might be able to suggest alternative patterns. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~-~--~~~---~--~~ 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: onReceive not triggering for SEND / image
Here is the nudge you wanted... Your intent filter needs to be set on an activity. The code you posted shows it as a Broadcast Receiver. Change: receiver android:name=.ImageReceiver to activity android:name=.ImageReceiver and move all your stuff from onRecieve to onCreate. That should take you forward. Good luck! On Sep 9, 10:25 am, EnnaN nhui...@gmail.com wrote: and there we are. for future reference // other readers: i was looking for the following line: Intent i=getIntent(); n. On Sep 9, 12:14 pm, EnnaN nhui...@gmail.com wrote: I know i'm bumping this, but i really think it's something simple i've missed. Trying to avoid definitions i might be using incorrectly: This is what i have: An app that turns up in the share menu of the gallery. Selecting my app starts it as if you would start it normally This is what i don't have: A way to react to the image i was looking at: i do not know where to define code to do stuff with the picture. Just a small nudge in the right direction is enough hopefully, please? :D Nanne. On Sep 2, 1:51 pm, EnnaN nhui...@gmail.com wrote: Thanks! THen i'm just confused about how to react to the intent - at some point the images i'm sharing should be triggering some sort of event, so i can handle it. That's what i was trying to do with the receiver. Could you point me how to have a functions that reacts as an event- handler of the received 'SEND'? Nanne. On Sep 2, 8:52 am, Dianne Hackborn hack...@android.com wrote: SEND is an activity action. All you need to do is have it in your manifest for an activity, as you have shown, and you know it is working because you see it in the share menu, and when you select your item in the share menu your activity will be launched with the intent. That is all there is to it. There is no broadcast receiver involved at all, anywhere. On Tue, Sep 1, 2009 at 11:42 PM, EnnaN nhui...@gmail.com wrote: FOr some more information: I did try to add the intent to an receiver in the manifest XML on a tip i got, but this not only didn't work to start my receiver class, it also removed the share option from the image i was trying to do something with... So not so big a succes. I'm sure it's a small thing i've missed (i hope ;) ), so if anyone can point me towards how what where? activity android:name=.TestingApp android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity receiver android:name=.ImageReceiver intent-filter action android:name=android.intent.action.SEND / category android:name=android.intent.category.DEFAULT / data android:mimeType=image/* / /intent-filter /receiver /application On Aug 31, 9:21 pm, EnnaN nhui...@gmail.com wrote: There are a number of posts about getting your intent to actually register, but unfortunately i was not able to distill a sollution from them. The simple concept of getting an image and doing something with it seems to be too much at the moment :( I have the following in my manifest.xml: application android:icon=@drawable/icon android:label=@string/ app_name android:theme=@android:style/Theme.NoTitleBar activity android:name=.TestingApp android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter intent-filter action android:name=android.intent.action.SEND / category android:name=android.intent.category.DEFAULT / data android:mimeType=image/* / /intent-filter /activity /application And this does what i thought it should do: when i press share on a picture, i get my application as an option. Now, to act on this selecting, i thought to do this: registerReceiver(new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent) { //do some stuff } }, new IntentFilter(android.intent.action.SEND,image/*)); Now i've tried this with a seperate class, without the second argument on the intentfilter, and with several variations of the intent action.SEND, but it doesn't seem to fire when i share my picture. Could anyone point me somewheres? Do i need an extra
[android-developers] Re: ListActivity Out of Memory
Romain covered some tips on lists and using compound drawables in his Google I/O session. Take a look here: http://code.google.com/events/io/sessions/TurboChargeUiAndroidFast.html On Sep 8, 6:49 am, Ives i...@itechnet.com.au wrote: I am using a ListActivity. Each list entry contains an ImageView and a TextView. I have a huge list and has been getting Out of Memory errors once I scroll through a fair amount of them. I figured I need to reduce the size of the images but I am wondering what happens to the objects once the list entry is hidden from view (as i scroll down the list). I have read somewhere that the list entry objects are automatically re-use. But what happens to the drawable images which were loaded into the ImageView? IF the ImageView object is reused, what happens to the binary image? Are they freed automatically? How do I prevent the OutOfMemory exception? I want to do something similar like the Android Market. As one scroll downwards the images are loaded and new entries are loaded. The Markey can have a long list which one can scroll down and all the way back up again without any problem. The only difference being mine throws OutOfMemory Exception. Advice anyone? --~--~-~--~~~---~--~~ 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: Probing for an already set Alarm?
It seems like you should be tracking exactly which Alarms you have set as a matter of course, rather than try to find out what is set after the fact. If you use a unique id for each alarm then you need not be concerned that you will overwrite one that is in the queue. When I say unique id, what I mean is the requestCode parameter to the Pending Intent. If you change this code PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); so that your second parameter is unique for each alarm then you will not overwrite an existing Alarm. I hope this helps. Good luck! On Sep 8, 7:18 pm, htbest2000 htbest2...@gmail.com wrote: I guess there is no way to achieve your purpose, except hack the AlarmManagerService to export the array list mRtcAlarms, which holds all requested RTC alarms. On Sep 8, 1:34 pm, Walles johan.wal...@gmail.com wrote: Hi! How can I probe for whether a specific alarm has been set? I set the alarm as illustrated below, but how can I ask the OS whether or not the below code has been called? The point is not to overwrite an existing alarm with a new one. public static void scheduleNextUpdate(Context context, long delay_seconds) { Intent intent = new Intent(context, Updater.class); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); AlarmManager alarmManger = (AlarmManager)context.getSystemService (Context.ALARM_SERVICE); long now = System.currentTimeMillis(); long later = now + delay_seconds * 1000; Log.d(DrainOMeter.LOGGING_TAG, Scheduling next update in + delay_seconds + s at + new Date(later)); alarmManger.set(AlarmManager.RTC, later, pendingIntent); } Full sources available athttp://bazaar.launchpad.net/~walles/drain-o-meter/trunk/annotate/head... if needed. Thanks //Johan --~--~-~--~~~---~--~~ 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: Hmm... at last ADC2 is out of our way ... tell about your app and experience
App Name: Alarmoid Category: Tools/Productivity Alarmoid was submitted with (last-minute) translations into Russian, French, Spanish and a bit of German. When it reaches the Android Market (possibly not until after the end user judging is complete) it will have Italian and a more complete German translation. Description: * Alarmoid uses a built-in Android System Service to shut off and automatically restart sounds on your phone. Technically, it will lower the notification volume to zero for the amount of time you set. It has is a 'quiet time' schedule and you can create a timer on the fly. The appwidget can start a new timer with two touches! * Alarmoid is designed to turn the sound off and on again without a fuss. The default settings do the job quietly, shutting off the phone ringer as well as all applications configured with a sound notification. Use Preferences to allow the phone to ring during quiet time. Preferences can also make the phone vibrate, play a sound or flash the LED when quiet time is over. You could use Alarmoid as an alarm clock or a (kitchen) timer. * After installation, Alarmoid is set up with a schedule to turn sound off automatically at 11pm and back on at 8am, 7 days a week. Touch any entry in the expandable list view under the Scheduler tab to edit or delete that entry. Rather than delete entries, you can turn off the schedule using a checkbox in the Preferences tab. Use the Menu to add additional entries to the schedule. You can have any number of Alarmoids in the schedule, organized by the days of the week. You can see the app firsthand in a five minute demo on YouTube. There is some additional information in the published Google Docs. This is one of the apps in the contest you want to try. I hope y'all like it! Best regards, Beth URL: http://www.youtube.com/watch?v=yNcVkP_vK08 (YouTube Demo) http://docs.google.com/View?id=dfvkbzjp_84dz5db9fc (Dos And Donts) http://docs.google.com/View?id=dfvkbzjp_85htfctvfs (About Alarmoid) --~--~-~--~~~---~--~~ 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: 5 mins to ADC II submission deadline - so what is your submission?
I posted this information on another thread. Here is a repeat of the details, for serendipity and in case you missed it. Description: * Alarmoid uses a built-in Android System Service to shut off and automatically restart sounds on your phone. Technically, it will lower the notification volume to zero for the amount of time you set. It has is a 'quiet time' schedule and you can create a timer on the fly. You can see the app firsthand in a five minute demo on YouTube. This is one of the apps in the contest you want to try. I hope y'all like it! Best regards, Beth URL: http://www.youtube.com/watch?v=yNcVkP_vK08 (YouTube Demo) http://docs.google.com/View?id=dfvkbzjp_84dz5db9fc (Dos And Donts) http://docs.google.com/View?id=dfvkbzjp_85htfctvfs (About Alarmoid) On Sep 7, 3:32 pm, Michael push0...@gmail.com wrote: I've finally managed to create a website for seawasp. It's located at:www.honeymilklabs.com Let me know what you think about, 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] ExpandableListView won't redraw, static group data, dynamic child data
Hello good people, I have an expandable list view with a static array for the group data and an SQLite database for the child data. It is implemented with the BaseExpandableListAdapter and works great, except, when I edit the database to delete or add children to the list I do not see the changes onscreen. It looks like I can use the registerDataSetObserver method to notify the adapter and expandable list of a data change. What I have to do in the callback to make Android redraw the list after data changes is what I need to know. Can I do it? Documentation on this part of the SDK is a bit sparse and expandable list view example code is not a good match. Can anyone offer advice on how to use a DataSetObserver? It feels like I have to switch over to a Cursor type adapter. Any insight is most welcome. Pardon the double post to Android Beginners. Best regards, Beth On Jul 27, 2:48 pm, Beth Mezias emez...@gmail.com wrote: Hi there, Here is the situation. In a TabbedView, one of three tabs is an ExpandableListViewActivity. My application is using SQL Lite to store the data bound to the ExpandableListView. When I change the SQL Lite data in another activity, I need to refresh the ExpandableListView and show the new data. If I am drawing the tab for the first time after adding new data, the list shows correctly after the tab switch. If I am in the ExpandableListViewActivity when I add new data to the list or edit existing data, then I do not see the change. In this case, when I exit the application and restart, I see the modified data was stored in SQL Lite as expected. Can anyone suggest how I might get the tab to redraw the list? The partially working code looks like this: @Override protected void onActivityResult(int requestCode, int resultCode, Intent intent) { super.onActivityResult(requestCode, resultCode, intent); //stuff deleted if((requestCode == EDITOR) resultCode==RESULT_OK) { tabs.setCurrentTab(1); tabs.getCurrentView().invalidate(); } } The constructor for the list adapter is where I execute the code to populate the groups and children. Do I want to drop and create a new list adapter? That seems like a waste of perfectly good rows. Is it something I should do in the ExpandableListViewActivity, rather than the TabHost? The fact that this is an expandable list is probably irrelevant; I am stuck where an object on the screen that has changed is not redrawn automatically. Your help is deeply appreciated. Best regards, Beth --~--~-~--~~~---~--~~ 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] code to mute using the MODIFY_AUDIO_SETTINGS permission
Hi, At the end of my AndroidManifest xml file you find this tag: uses-permission android:name=android.permission.MODIFY_AUDIO_SETTINGS/uses- permission /manifest I am using Eclipse to write code to mute notifications and I get a java.lang.SecurityException: Permission Denial from the Emulator every time. I realize the change will affect other applications, however, it was unclear that more was needed to mute a stream. What am I missing? Thanks and regards! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---