[android-beginners] Xtify Platform for Push Notifications to Android
Hello Android Beginners! We launched Xtify a few months ago – since then, there has been a tremendous response from the mobile development community for our free Push Notifications Platform. We wanted to let you know that Xtify is currently free for developers with 500,000 or fewer users! Xtify provides a simple web console and SDK so you can push notifications to your mobile application users’ devices. You can create a series of rules that determine when a message gets sent – you can even push notifications based on a user's location! Go to http://developer.xtify.com/register so you can download our sample app and SDK (for fast and easy integration) and start PUSHING GEO-TRIGGERED NOTIFICATIONS directly to your users’ devices. We look forward to joining you live at one of your next Meetups. If any of you make your way to NYC, look us up for a beer! Josh and the Xtify Team Josh Schiffman VP, Business Development Xtify, Inc. +1.646.395.1270 busin...@xtify.com http://www.xtify.com http://developer.xtify.com -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] onHandleIntent(Intent) method does not get called
On Wed, Jun 23, 2010 at 1:03 AM, appsgrrl bettyoch...@gmail.com wrote: I'm tryng to get an IntentService to work, and I have extended IntentService, and I implemented a onHandletIntent(Intent) method. I put some logging in there, but this method never gets called. I must be doing something really dumb, but I don't know what it is. Is there something else I need to implement or override, or whatever, to make this work? No, that's pretty much it. Are you sure whatever is supposed to be calling startService() is actually calling startService()? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Problem with AppWidget Using a Service
I am trying to create a simple AppWidget using a service to initialize the content in the onUpdate() method. The data is not being refreshed and logcat shows me the following warning: AppWidgetService W updateAppWidgetProvider: provider doesn't exist: ComponentInfo{com.jnc.zmanminder/com.jnc.zmanminder.ZMUpdateService} I must be missing something obvious but I cannot figure it out. My AppWidget class (edited for brevity) looks as follows: public class ZmanMinderAppWidget extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { context.startService(new Intent(context, ZMUpdateService.class)); } } My Service class (edited for brevity) looks as follows: public class ZMUpdateService extends Service { public void onStart(Intent intent, int startId) { RemoteViews updateViews = buildUpdate(this); ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); AppWidgetManager manager = AppWidgetManager.getInstance(this); manager.updateAppWidget(thisWidget, updateViews); } public IBinder onBind(Intent arg0) { return null; } public RemoteViews buildUpdate(Context context) { Time time = new Time(); time.setToNow(); RemoteViews views = new RemoteViews(context.getPackageName(),R.layout.widget); views.setTextViewText(R.id.time, time.format(%I:%M%p)); return views; } } The ZMUpdateService service is defined in my manifest file. Thanks for any help. ...Jake -- Jake Colman | Director, Software Development Principia Partners LLC 101 West Elm Street | Conshohocken | PA 19428 | +1 (610) 755 9770 t: +1 (610) 755 9786 | c: +1 (610) 348 2788 | f: +1 (201) 221 8929 e: col...@ppllc.com | w: www.principiapartners.com Credit technology innovation awards winner 2008 and 2009 -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Problem with AppWidget Using a Service
Jake, The error is in the way your code instantiates ComponentName. Instead of: ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); Do this: ComponentName thisWidget = new ComponentName(this,*ZmanMinderAppWidget*.class); The error message was trying to convey same thing... -- Kostya 23.06.2010 17:39, Jake Colman ?: I am trying to create a simple AppWidget using a service to initialize the content in the onUpdate() method. The data is not being refreshed and logcat shows me the following warning: AppWidgetService W updateAppWidgetProvider: provider doesn't exist: ComponentInfo{com.jnc.zmanminder/com.jnc.zmanminder.ZMUpdateService} I must be missing something obvious but I cannot figure it out. My AppWidget class (edited for brevity) looks as follows: public class ZmanMinderAppWidget extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { context.startService(new Intent(context, ZMUpdateService.class)); } } My Service class (edited for brevity) looks as follows: public class ZMUpdateService extends Service { public void onStart(Intent intent, int startId) { RemoteViews updateViews = buildUpdate(this); ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); AppWidgetManager manager = AppWidgetManager.getInstance(this); manager.updateAppWidget(thisWidget, updateViews); } public IBinder onBind(Intent arg0) { return null; } public RemoteViews buildUpdate(Context context) { Time time = new Time(); time.setToNow(); RemoteViews views = new RemoteViews(context.getPackageName(),R.layout.widget); views.setTextViewText(R.id.time, time.format(%I:%M%p)); return views; } } The ZMUpdateService service is defined in my manifest file. Thanks for any help. ...Jake -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: onHandleIntent(Intent) method does not get called
Hi -- Thanks for replying. I also have a logging printout in the onStartCommand() method, and that does show as being called. If onStartCommand() is called, doesn't that mean my startService() from my Activity has indeed started my IntentService? Who ultimately calls onHandleIntent()? That's what I cannot figure out from the docs. Betty On Jun 23, 4:02 am, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jun 23, 2010 at 1:03 AM, appsgrrl bettyoch...@gmail.com wrote: I'm tryng to get an IntentService to work, and I have extended IntentService, and I implemented a onHandletIntent(Intent) method. I put some logging in there, but this method never gets called. I must be doing something really dumb, but I don't know what it is. Is there something else I need to implement or override, or whatever, to make this work? No, that's pretty much it. Are you sure whatever is supposed to be calling startService() is actually calling startService()? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Problem with AppWidget Using a Service
On Wed, Jun 23, 2010 at 9:39 AM, Jake Colman col...@ppllc.com wrote: I am trying to create a simple AppWidget using a service to initialize the content in the onUpdate() method. The data is not being refreshed and logcat shows me the following warning: AppWidgetService W updateAppWidgetProvider: provider doesn't exist: ComponentInfo{com.jnc.zmanminder/com.jnc.zmanminder.ZMUpdateService} This means you are trying to state that ZMUpdateService is an AppWidgetProvider, in one or more places in your code. public class ZMUpdateService extends Service { public void onStart(Intent intent, int startId) { RemoteViews updateViews = buildUpdate(this); ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); Note: you are claiming your AppWidgetProvider is ZMUpdateService, when it is really ZmanMinderAppWidget. If it helps, here is a complete app widget example: http://github.com/commonsguy/cw-advandroid/tree/master/AppWidget/Microblog/ It assumes you have an identi.ca account you can use. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: onHandleIntent(Intent) method does not get called
On Wed, Jun 23, 2010 at 10:37 AM, appsgrrl bettyoch...@gmail.com wrote: Thanks for replying. I also have a logging printout in the onStartCommand() method, and that does show as being called. If onStartCommand() is called, doesn't that mean my startService() from my Activity has indeed started my IntentService? Yes. However, be sure you are chaining to the superclass in onStartCommand() -- otherwise, you will block IntentService from dispatching your Intent to onHandleIntent() via the background thread. Who ultimately calls onHandleIntent()? IntentService does. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: onHandleIntent(Intent) method does not get called
Betty, Make sure your service calls base class methods in onCreate() and onStart(). Intents for processing are queued to a worker thread by IntentService.onStart. The worker thread is set up by onCreate. class BettysService extends IntentService { @Override public void onCreate() { ... logging here ... super.onCreate(); } @Override public void onStart(Intent intent, int startId) { ... logging here... super.onStart(intent, startId); } . } BTW, Android source can be found here: http://www.netmite.com/android/mydroid/1.6/frameworks/base/core/java/android/app/ -- Kostya 23.06.2010 18:37, appsgrrl пишет: Hi -- Thanks for replying. I also have a logging printout in the onStartCommand() method, and that does show as being called. If onStartCommand() is called, doesn't that mean my startService() from my Activity has indeed started my IntentService? Who ultimately calls onHandleIntent()? That's what I cannot figure out from the docs. Betty On Jun 23, 4:02 am, Mark Murphymmur...@commonsware.com wrote: On Wed, Jun 23, 2010 at 1:03 AM, appsgrrlbettyoch...@gmail.com wrote: I'm tryng to get an IntentService to work, and I have extended IntentService, and I implemented a onHandletIntent(Intent) method. I put some logging in there, but this method never gets called. I must be doing something really dumb, but I don't know what it is. Is there something else I need to implement or override, or whatever, to make this work? No, that's pretty much it. Are you sure whatever is supposed to be calling startService() is actually calling startService()? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Problem with AppWidget Using a Service
Kostya, Thanks. That worked like a charm. I noticed in sample AppWidget code that does not use a service, that it iterates the appWidgetIds array so that it updates all instances of the widget. However, in sample code that uses a Service, that iteration is not done. Is that because it is not needed for some reason? How would one update multiple instances using a service-based solution? Thanks. ...Jake KV == Kostya Vasilyev kmans...@gmail.com writes: KV Jake, KV The error is in the way your code instantiates ComponentName. KV Instead of: KV ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); KV Do this: KV ComponentName thisWidget = new KV ComponentName(this,*ZmanMinderAppWidget*.class); KV The error message was trying to convey same thing... KV -- Kostya KV 23.06.2010 17:39, Jake Colman ?: I am trying to create a simple AppWidget using a service to initialize the content in the onUpdate() method. The data is not being refreshed and logcat shows me the following warning: AppWidgetService W updateAppWidgetProvider: provider doesn't exist: ComponentInfo{com.jnc.zmanminder/com.jnc.zmanminder.ZMUpdateService} I must be missing something obvious but I cannot figure it out. My AppWidget class (edited for brevity) looks as follows: public class ZmanMinderAppWidget extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { context.startService(new Intent(context, ZMUpdateService.class)); } } My Service class (edited for brevity) looks as follows: public class ZMUpdateService extends Service { public void onStart(Intent intent, int startId) { RemoteViews updateViews = buildUpdate(this); ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); AppWidgetManager manager = AppWidgetManager.getInstance(this); manager.updateAppWidget(thisWidget, updateViews); } public IBinder onBind(Intent arg0) { return null; } public RemoteViews buildUpdate(Context context) { Time time = new Time(); time.setToNow(); RemoteViews views = new RemoteViews(context.getPackageName(),R.layout.widget); views.setTextViewText(R.id.time, time.format(%I:%M%p)); return views; } } The ZMUpdateService service is defined in my manifest file. Thanks for any help. ...Jake KV -- KV Kostya Vasilev -- WiFi Manager + pretty widget -- KV http://kmansoft.wordpress.com KV -- KV You received this message because you are subscribed to the Google KV Groups Android Beginners group. KV NEW! Try asking and tagging your question on Stack Overflow at KV http://stackoverflow.com/questions/tagged/android KV To unsubscribe from this group, send email to KV android-beginners+unsubscr...@googlegroups.com KV For more options, visit this group at KV http://groups.google.com/group/android-beginners?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: Problem with AppWidget Using a Service
Jake, onUpdate is passed an explicit list of just the widget ids that need to be updated. Supposedly, there could be widgets that belong to this provider but don't need updating (e.g. on a scrolled-off home screen portion). Pushing a RemoveViews object to a paricular widget is done by calling: manager.updateAppWidget(int widgetId, updateViews); It's also possible to update all widgets that belong to a particular widget provider, and this is the approach service-based widgets take, supposedly to avoid paying service start-up costs for each widget id. In this case, a single RemoteViews is pushed to all widgets with a single call to: manager.updateAppWidget(ComponentName thisWidget, updateViews); -- Kostya 23.06.2010 18:57, Jake Colman пишет: Kostya, Thanks. That worked like a charm. I noticed in sample AppWidget code that does not use a service, that it iterates the appWidgetIds array so that it updates all instances of the widget. However, in sample code that uses a Service, that iteration is not done. Is that because it is not needed for some reason? How would one update multiple instances using a service-based solution? Thanks. ...Jake KV == Kostya Vasilyevkmans...@gmail.com writes: KV Jake, KV The error is in the way your code instantiates ComponentName. KV Instead of: KV ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); KV Do this: KV ComponentName thisWidget = new KV ComponentName(this,*ZmanMinderAppWidget*.class); KV The error message was trying to convey same thing... KV -- Kostya KV 23.06.2010 17:39, Jake Colman ?: I am trying to create a simple AppWidget using a service to initialize the content in the onUpdate() method. The data is not being refreshed and logcat shows me the following warning: AppWidgetService W updateAppWidgetProvider: provider doesn't exist: ComponentInfo{com.jnc.zmanminder/com.jnc.zmanminder.ZMUpdateService} I must be missing something obvious but I cannot figure it out. My AppWidget class (edited for brevity) looks as follows: public class ZmanMinderAppWidget extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { context.startService(new Intent(context, ZMUpdateService.class)); } } My Service class (edited for brevity) looks as follows: public class ZMUpdateService extends Service { public void onStart(Intent intent, int startId) { RemoteViews updateViews = buildUpdate(this); ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); AppWidgetManager manager = AppWidgetManager.getInstance(this); manager.updateAppWidget(thisWidget, updateViews); } public IBinder onBind(Intent arg0) { return null; } public RemoteViews buildUpdate(Context context) { Time time = new Time(); time.setToNow(); RemoteViews views = new RemoteViews(context.getPackageName(),R.layout.widget); views.setTextViewText(R.id.time, time.format(%I:%M%p)); return views; } } The ZMUpdateService service is defined in my manifest file. Thanks for any help. ...Jake KV -- KV Kostya Vasilev -- WiFi Manager + pretty widget -- KV http://kmansoft.wordpress.com KV -- KV You received this message because you are subscribed to the Google KV Groups Android Beginners group. KV NEW! Try asking and tagging your question on Stack Overflow at KV http://stackoverflow.com/questions/tagged/android KV To unsubscribe from this group, send email to KV android-beginners+unsubscr...@googlegroups.com KV For more options, visit this group at KV http://groups.google.com/group/android-beginners?hl=en -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] how to change colours in a .xml defined layout in run time
On Wed, Jun 16, 2010 at 6:55 AM, ckloch htc.kl...@hotmail.com wrote: In theory it seems to be easy, but I would highly appreciate your help on how to do this in Android as I cannot see how I start changing the colours of the individual bar in the screen after initially defining the screen. Whatever View you're using to represent the bars should have some background property for changing it's background image or color. Try that. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Problem with AppWidget Using a Service
Kostya, That makes perfect sense. It seems like a service-based update is really the right way to go. It avoids any potential timeout issue and is allows updating of all widgets at once. Thanks for your help. ...Jake KV == Kostya Vasilyev kmans...@gmail.com writes: KV Jake, KV onUpdate is passed an explicit list of just the widget ids that KV need to be updated. Supposedly, there could be widgets that KV belong to this provider but don't need updating (e.g. on a KV scrolled-off home screen portion). KV Pushing a RemoveViews object to a paricular widget is done by KV calling: KV manager.updateAppWidget(int widgetId, updateViews); KV It's also possible to update all widgets that belong to a KV particular widget provider, and this is the approach KV service-based widgets take, supposedly to avoid paying service KV start-up costs for each widget id. KV In this case, a single RemoteViews is pushed to all widgets with KV a single call to: KV manager.updateAppWidget(ComponentName thisWidget, updateViews); KV -- Kostya KV 23.06.2010 18:57, Jake Colman пишет: Kostya, Thanks. That worked like a charm. I noticed in sample AppWidget code that does not use a service, that it iterates the appWidgetIds array so that it updates all instances of the widget. However, in sample code that uses a Service, that iteration is not done. Is that because it is not needed for some reason? How would one update multiple instances using a service-based solution? Thanks. ...Jake KV == Kostya Vasilyevkmans...@gmail.com writes: KV Jake, KV The error is in the way your code instantiates ComponentName. KV Instead of: KV ComponentName thisWidget = new ComponentName(this, KV ZMUpdateService.class); KV Do this: KV ComponentName thisWidget = new KV ComponentName(this,*ZmanMinderAppWidget*.class); KV The error message was trying to convey same thing... KV -- Kostya KV 23.06.2010 17:39, Jake Colman ?: I am trying to create a simple AppWidget using a service to initialize the content in the onUpdate() method. The data is not being refreshed and logcat shows me the following warning: AppWidgetService W updateAppWidgetProvider: provider doesn't exist: ComponentInfo{com.jnc.zmanminder/com.jnc.zmanminder.ZMUpdateService} I must be missing something obvious but I cannot figure it out. My AppWidget class (edited for brevity) looks as follows: public class ZmanMinderAppWidget extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { context.startService(new Intent(context, ZMUpdateService.class)); } } My Service class (edited for brevity) looks as follows: public class ZMUpdateService extends Service { public void onStart(Intent intent, int startId) { RemoteViews updateViews = buildUpdate(this); ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); AppWidgetManager manager = AppWidgetManager.getInstance(this); manager.updateAppWidget(thisWidget, updateViews); } public IBinder onBind(Intent arg0) { return null; } public RemoteViews buildUpdate(Context context) { Time time = new Time(); time.setToNow(); RemoteViews views = new RemoteViews(context.getPackageName(),R.layout.widget); views.setTextViewText(R.id.time, time.format(%I:%M%p)); return views; } } The ZMUpdateService service is defined in my manifest file. Thanks for any help. ...Jake KV -- KV Kostya Vasilev -- WiFi Manager + pretty widget -- KV http://kmansoft.wordpress.com KV -- KV You received this message because you are subscribed to the Google KV Groups Android Beginners group. KV NEW! Try asking and tagging your question on Stack Overflow at KV http://stackoverflow.com/questions/tagged/android KV To unsubscribe from this group, send email to KV android-beginners+unsubscr...@googlegroups.com KV For more options, visit this group at KV http://groups.google.com/group/android-beginners?hl=en KV -- KV Kostya Vasilev -- WiFi Manager + pretty widget -- KV http://kmansoft.wordpress.com KV -- KV You received this message because you are subscribed to the Google KV Groups Android Beginners group. KV NEW! Try asking and tagging your question on Stack Overflow at KV http://stackoverflow.com/questions/tagged/android KV To unsubscribe from this group, send email to KV android-beginners+unsubscr...@googlegroups.com KV For more options, visit this group at KV
[android-beginners] Re: Problem with AppWidget Using a Service
MM == Mark Murphy mmur...@commonsware.com writes: MM If it helps, here is a complete app widget example: MM http://github.com/commonsguy/cw-advandroid/tree/master/AppWidget/Microblog/ MM It assumes you have an identi.ca account you can use. Indeed it does and indeed I do. I am already a subscriber to your excellent books. -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: Problem with AppWidget Using a Service
Jake, Using a service for a widget that's not doing anything lengthy to prepare updates seems like a bit of an overkill. Certainly it works, but probably not necessary. On the other hand, using a service is definitely the way to go for widgets that fetch data from the Internet or some other way that can take a long time. Another issue is - this is all good, until someone uses a task killer, discovers the service, complains that the widget spanws an unnecessary service that uses too much memory and cpu time, kills it, and uninstalls. Has happened to me. Good thing Android 2.x includes great tools to show how memory and battery are used. I hope users learn to use these tools and exercise good judgement before killing a service just because it's there. -- Kostya 23.06.2010 20:15, Jake Colman пишет: Kostya, That makes perfect sense. It seems like a service-based update is really the right way to go. It avoids any potential timeout issue and is allows updating of all widgets at once. Thanks for your help. ...Jake KV == Kostya Vasilyevkmans...@gmail.com writes: KV Jake, KV onUpdate is passed an explicit list of just the widget ids that KV need to be updated. Supposedly, there could be widgets that KV belong to this provider but don't need updating (e.g. on a KV scrolled-off home screen portion). KV Pushing a RemoveViews object to a paricular widget is done by KV calling: KV manager.updateAppWidget(int widgetId, updateViews); KV It's also possible to update all widgets that belong to a KV particular widget provider, and this is the approach KV service-based widgets take, supposedly to avoid paying service KV start-up costs for each widget id. KV In this case, a single RemoteViews is pushed to all widgets with KV a single call to: KV manager.updateAppWidget(ComponentName thisWidget, updateViews); KV -- Kostya KV 23.06.2010 18:57, Jake Colman пишет: Kostya, Thanks. That worked like a charm. I noticed in sample AppWidget code that does not use a service, that it iterates the appWidgetIds array so that it updates all instances of the widget. However, in sample code that uses a Service, that iteration is not done. Is that because it is not needed for some reason? How would one update multiple instances using a service-based solution? Thanks. ...Jake KV == Kostya Vasilyevkmans...@gmail.com writes: KV Jake, KV The error is in the way your code instantiates ComponentName. KV Instead of: KV ComponentName thisWidget = new ComponentName(this, KV ZMUpdateService.class); KV Do this: KV ComponentName thisWidget = new KV ComponentName(this,*ZmanMinderAppWidget*.class); KV The error message was trying to convey same thing... KV -- Kostya KV 23.06.2010 17:39, Jake Colman ?: I am trying to create a simple AppWidget using a service to initialize the content in the onUpdate() method. The data is not being refreshed and logcat shows me the following warning: AppWidgetService W updateAppWidgetProvider: provider doesn't exist: ComponentInfo{com.jnc.zmanminder/com.jnc.zmanminder.ZMUpdateService} I must be missing something obvious but I cannot figure it out. My AppWidget class (edited for brevity) looks as follows: public class ZmanMinderAppWidget extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { context.startService(new Intent(context, ZMUpdateService.class)); } } My Service class (edited for brevity) looks as follows: public class ZMUpdateService extends Service { public void onStart(Intent intent, int startId) { RemoteViews updateViews = buildUpdate(this); ComponentName thisWidget = new ComponentName(this, ZMUpdateService.class); AppWidgetManager manager = AppWidgetManager.getInstance(this); manager.updateAppWidget(thisWidget, updateViews); } public IBinder onBind(Intent arg0) { return null; } public RemoteViews buildUpdate(Context context) { Time time = new Time(); time.setToNow(); RemoteViews views = new RemoteViews(context.getPackageName(),R.layout.widget); views.setTextViewText(R.id.time, time.format(%I:%M%p)); return views; } } The ZMUpdateService service is defined in my manifest file. Thanks for any help. ...Jake KV -- KV Kostya Vasilev -- WiFi
Re: [android-beginners] Re: Problem with AppWidget Using a Service
On Wed, Jun 23, 2010 at 12:36 PM, Kostya Vasilyev kmans...@gmail.com wrote: On the other hand, using a service is definitely the way to go for widgets that fetch data from the Internet or some other way that can take a long time. There are (at least) three costs to doing work in the app widget itself versus an IntentService: 1. The app widget provider might get killed if it takes too long (~10 seconds). 2. Tying up the main application thread, even for fairly short bursts, will cause your app's activity, if visible to freeze up. Even really short bursts (e.g., 250ms) can cause your UI to appear janky if the user is actively using it. 3. Your code is running at foreground priority, and so it will steal CPU cycles from anything truly in the foreground, such as a real-time game. Since app widget providers themselves cannot maintain state, they inevitably have to use flash storage, even if just for reads. Doing a simple database query is perhaps fast enough that you could get away with doing it in the app widget provider itself. However, if you write to flash, you want to move that to the IntentService, because flash writes can get crazy slow (see the Zippy Android Apps presentation from Google I|O 2010). And, of course, network I/O may take indefinitely long. Hence, unless the app widget functionality is trivially small, you're probably going to want an IntentService, task killers be damned. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Application crashing
Hello, I am trying to make a small To do list application. The application keeps crashing on and saying, the application closed and please try again. The message also has force close option. Here is the code, does anyone has an idea what's wrong? Thanks package com.todolist; import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ListView; public class todolist extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { // Inflate your view setContentView(R.layout.main); // Get references to UI widgets ListView myListView = (ListView)findViewById(R.id.myListView); final EditText myEditText = (EditText)findViewById(R.id.myListView); // Create the array list of to do items final ArrayListString todoItems = new ArrayListString(); // Create the array adapter to bind the array to the listview final ArrayAdapterString aa; aa = new ArrayAdapterString(this, android.R.layout.simple_list_item_1, todoItems); // Bind the array adapter to the listview. myListView.setAdapter(aa); myEditText.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { todoItems.add(0, myEditText.getText().toString()); aa.notifyDataSetChanged(); myEditText.setText(); return true; } return false; } }); } } -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Application crashing
On Wed, Jun 23, 2010 at 1:28 PM, Varun Khanduja varunkhand...@gmail.com wrote: I am trying to make a small To do list application. The application keeps crashing on and saying, the application closed and please try again. The message also has force close option. Here is the code, does anyone has an idea what's wrong? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace associated with your crash, so you can see where in your code the problem occurs. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Application crashing
Hi, Your onCreate method is not calling the default: super.onCreate( icicle ); Also, I would wrap the body of the code in a try{ } catch( Exception ex ) clause. Hope this helps, Sy Varun Khanduja wrote: Hello, I am trying to make a small To do list application. The application keeps crashing on and saying, the application closed and please try again. The message also has force close option. Here is the code, does anyone has an idea what's wrong? Thanks package com.todolist; import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ListView; public class todolist extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { // Inflate your view setContentView(R.layout.main); // Get references to UI widgets ListView myListView = (ListView)findViewById(R.id.myListView); final EditText myEditText = (EditText)findViewById(R.id.myListView); // Create the array list of to do items final ArrayListString todoItems = new ArrayListString(); // Create the array adapter to bind the array to the listview final ArrayAdapterString aa; aa = new ArrayAdapterString(this, android.R.layout.simple_list_item_1, todoItems); // Bind the array adapter to the listview. myListView.setAdapter(aa); myEditText.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { todoItems.add(0, myEditText.getText().toString()); aa.notifyDataSetChanged(); myEditText.setText(); return true; } return false; } }); } } -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Application crashing
One other thing to mention... These groups are not only great for posting questions but also for searching through them to find other posts with the same problem or question that may already have an answer. In particular, your question is one that has been answered many times over and a quick search for Force Close or Crash probably would have given you several posts with the same answers that Mark and Simon gave. Not only does it prevent the group from getting bloated with duplicate questions, it can also help improve your development time because you don't have to constantly wait for responses to your questions. Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Jun 23, 2010 at 11:41 AM, Mark Murphy mmur...@commonsware.comwrote: On Wed, Jun 23, 2010 at 1:28 PM, Varun Khanduja varunkhand...@gmail.com wrote: I am trying to make a small To do list application. The application keeps crashing on and saying, the application closed and please try again. The message also has force close option. Here is the code, does anyone has an idea what's wrong? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace associated with your crash, so you can see where in your code the problem occurs. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Problem with AppWidget Using a Service
MM == Mark Murphy mmur...@commonsware.com writes: MM If it helps, here is a complete app widget example: MM http://github.com/commonsguy/cw-advandroid/tree/master/AppWidget/Microblog/ MM It assumes you have an identi.ca account you can use. Mark, Although it says Microblog, the example code still references Twitter. Is this correct? If so, what/where do I download to resolve the winterwell.jtwitter.Twitter import? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Android security features -how to protect our applications for client-they wanted to protect it
On Tue, Jun 15, 2010 at 1:38 PM, SaiSriOrl sridhar.rangasw...@gmail.comwrote: the client wants an App to be secured so that no one can illegal downlod.thats our question. You're not getting any response because: 1) your post is a bit difficult to read, though I'm assuming that's because English isn't your first language 2) this is asked quite a bit on here and has been discussed to death - just search the groups 3) most importantly, there is no such thing as a secure app and no way to prevent illegal downloads, though there are things you can do to make it harder. Google is your friend in that respect. Good luck - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] [Android Beginners]About adding tabs on each carousel page
Hi dear all, I got a question about displaying carousel like contents (pictures, contact info): Eg.: In portrait mode I have a list of contacts on my current screen. When I turn it into landscape mode, the pictures of the ppl in contact list are enlarged in carousel way, by sliding the pic you can see the next one or the previous one. However, for each big picture, I would like to see more information about this person's contact info, organization info and etc. I am thinking whether I can add some tabs onto this picture and each tab contains certain info, and we could still slide it back and forth after adding tabs onto a picture? Or can we do two way slide? that is we could slide the pictures in horizontal way but also slide personal info (different pages) in vertical way? I am not sure whether these could be realized in current Android apps? Thank you very much! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] apps
hi my name is josh i am new to the droid world. i have just rooted my motorola droid. any suggestions on apps good for rooted droids. -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] apps
This is a developers list, try again. On 24 Jun 2010, at 00:31, ravendev wrote: hi my name is josh i am new to the droid world. i have just rooted my motorola droid. any suggestions on apps good for rooted droids. -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] apps
What would be awesome if somehow make your SD card into virtual memory Raul Martinez Message sent from HTC EVO 4G On Jun 23, 2010 6:31 PM, ravendev jzimm1...@gmail.com wrote: hi my name is josh i am new to the droid world. i have just rooted my motorola droid. any suggestions on apps good for rooted droids. -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: LogCat
Thanks but I really prefer to view LogCat in Eclipse because it is so much easier to find what you want. In Eclipse, for example, user- generated log output is split into individual tabs based on the tags you set. Also, in the main log tab everything is color coded. To find the stack trace associated with a Force Close, for example, you just scroll up until you see a block of red output. Google did a great job in designing the Eclipse LogCat viewer except for the unfortunate bug that they have ignored for so long. On Jun 22, 11:11 am, Kostya Vasilyev kmans...@gmail.com wrote: Don, I can recommend running adblogcat from the OS's command line window. This way, it's always around, you can make it as large as you want, and can do filtering by piping through grep or find, if necessary. -- Kostya 22.06.2010 22:02, DonFrench пишет: I useLogCata lot when debugging but it is an ir ritation that it frequently has to be reset to get the latest log output. I am only aware of two ways to get the log output when this happens: 1) Go to the DDMS perspective and then pull down the menu in the Devices view and select reset adb, and 2) Exit Eclipse and restart it. Some of the time Reset adb works but often it does not and I have to exit and restart Eclipse. So, first, am I doing something wrong that causes LogCatto stop functioning? And second, is there another way to refresh the log other than the two methods I mentioned? And third, is this a bug in the Android Eclipse plug-in? If it is, why doesn't Google fix it? -- Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: LogCat
We are well aware of the issues with the logcat panel in DDMS. We hope to get around to see sooner rather than later but we've got a lot of stuff on our plate unfortunately. Xav On Wed, Jun 23, 2010 at 5:06 PM, DonFrench dcfre...@gmail.com wrote: Thanks but I really prefer to view LogCat in Eclipse because it is so much easier to find what you want. In Eclipse, for example, user- generated log output is split into individual tabs based on the tags you set. Also, in the main log tab everything is color coded. To find the stack trace associated with a Force Close, for example, you just scroll up until you see a block of red output. Google did a great job in designing the Eclipse LogCat viewer except for the unfortunate bug that they have ignored for so long. On Jun 22, 11:11 am, Kostya Vasilyev kmans...@gmail.com wrote: Don, I can recommend running adblogcat from the OS's command line window. This way, it's always around, you can make it as large as you want, and can do filtering by piping through grep or find, if necessary. -- Kostya 22.06.2010 22:02, DonFrench пишет: I useLogCata lot when debugging but it is an ir ritation that it frequently has to be reset to get the latest log output. I am only aware of two ways to get the log output when this happens: 1) Go to the DDMS perspective and then pull down the menu in the Devices view and select reset adb, and 2) Exit Eclipse and restart it. Some of the time Reset adb works but often it does not and I have to exit and restart Eclipse. So, first, am I doing something wrong that causes LogCatto stop functioning? And second, is there another way to refresh the log other than the two methods I mentioned? And third, is this a bug in the Android Eclipse plug-in? If it is, why doesn't Google fix it? -- Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Re: LogCat
Spoken like a petulant child - fix it yourself if you think you can do better... On 24 Jun 2010, at 01:06, DonFrench wrote: Thanks but I really prefer to view LogCat in Eclipse because it is so much easier to find what you want. In Eclipse, for example, user- generated log output is split into individual tabs based on the tags you set. Also, in the main log tab everything is color coded. To find the stack trace associated with a Force Close, for example, you just scroll up until you see a block of red output. Google did a great job in designing the Eclipse LogCat viewer except for the unfortunate bug that they have ignored for so long. On Jun 22, 11:11 am, Kostya Vasilyev kmans...@gmail.com wrote: Don, I can recommend running adblogcat from the OS's command line window. This way, it's always around, you can make it as large as you want, and can do filtering by piping through grep or find, if necessary. -- Kostya 22.06.2010 22:02, DonFrench пишет: I useLogCata lot when debugging but it is an ir ritation that it frequently has to be reset to get the latest log output. I am only aware of two ways to get the log output when this happens: 1) Go to the DDMS perspective and then pull down the menu in the Devices view and select reset adb, and 2) Exit Eclipse and restart it. Some of the time Reset adb works but often it does not and I have to exit and restart Eclipse. So, first, am I doing something wrong that causes LogCatto stop functioning? And second, is there another way to refresh the log other than the two methods I mentioned? And third, is this a bug in the Android Eclipse plug-in? If it is, why doesn't Google fix it? -- Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: onHandleIntent(Intent) method does not get called
Hi -- You know, that was one of the first things I had thought of, so I put a call to super.onHandleIntent() in my class code. However, I got a NullPointerException from IntentService.onStart(), which is called from IntentService.onStartCommand(), which is from my class's onStartCommand() I tried it again, and played with the arguments to no avail. I assume that I use my incoming arguments and pass them to the super.onStartCommand(), correct? Thanks again for your help On Jun 23, 7:47 am, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jun 23, 2010 at 10:37 AM, appsgrrl bettyoch...@gmail.com wrote: Thanks for replying. I also have a logging printout in the onStartCommand() method, and that does show as being called. If onStartCommand() is called, doesn't that mean my startService() from my Activity has indeed started my IntentService? Yes. However, be sure you are chaining to the superclass in onStartCommand() -- otherwise, you will block IntentService from dispatching your Intent to onHandleIntent() via the background thread. Who ultimately calls onHandleIntent()? IntentService does. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] apps
What would be awesome if somehow make your SD card into virtual memory Raul Martinez Message sent from HTC EVO 4G On Jun 23, 2010 6:31 PM, ravendev jzimm1...@gmail.com wrote: hi my name is josh i am new to the droid world. i have just rooted my motorola droid. any suggestions on apps good for rooted droids. -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Application crashing
Hello everybody. Thanks for the suggestions. I guess the problem is I am learning Java as well and at the same time I am learning Android. So it's sort of hard for me to follow the conventions and the syntax. But I do try to look into the existing questions related to the topic. I will certainly try to look more in depth in future to avoid redundant posts. Thanks everyone On Jun 23, 12:21 pm, Justin Anderson janderson@gmail.com wrote: One other thing to mention... These groups are not only great for posting questions but also for searching through them to find other posts with the same problem or question that may already have an answer. In particular, your question is one that has been answered many times over and a quick search for Force Close or Crash probably would have given you several posts with the same answers that Mark and Simon gave. Not only does it prevent the group from getting bloated with duplicate questions, it can also help improve your development time because you don't have to constantly wait for responses to your questions. Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Jun 23, 2010 at 11:41 AM, Mark Murphy mmur...@commonsware.comwrote: On Wed, Jun 23, 2010 at 1:28 PM, Varun Khanduja varunkhand...@gmail.com wrote: I am trying to make a small To do list application. The application keeps crashing on and saying, the application closed and please try again. The message also has force close option. Here is the code, does anyone has an idea what's wrong? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace associated with your crash, so you can see where in your code the problem occurs. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Date picker problem
It worked now. Thank you very much everyone. :) On Jun 22, 8:37 pm, Temitope Akinwande takinwa...@gmail.com wrote: Looking through your code, I do not see where you are using R.id.display, however I see R.id.dateDisplay If the problem is with R.id.dateDisplay, do you have any layout defined that has the id dateDisplay? Check in your res/layout folder -Tope On Tue, Jun 22, 2010 at 3:57 PM, Varun Khanduja varunkhand...@gmail.com wrote: Thank you everyone. I resolved most of the issues with all the help from all the group members. I have one last issue: R. id. display cannot be resolved. Couldn't find anything online to help. Any help would be appreciated. /*** * Excerpted from Hello, Android!, * published by The Pragmatic Bookshelf. * Copyrights apply to this code. It may not be used to create training material, * courses, books, articles, and the like. Contact us if you are in doubt. * We make no guarantees that this code is fit for any purpose. * Visithttp://www.pragmaticprogrammer.com/titles/ebandfor more book information. ***/ package org.example.sudoku; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import java.util.Calendar; import android.app.DatePickerDialog; import android.app.Dialog; import android.widget.Button; import android.widget.DatePicker; import android.widget.TextView; import android.widget.Toast; public class sudoku extends Activity implements OnClickListener { private TextView mDateDisplay; private Button mPickDate; private int mYear; private int mMonth; private int mDay; static final int DATE_DIALOG_ID = 0; �...@override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // capture our View elements mDateDisplay = (TextView) findViewById(R.id.dateDisplay); mPickDate = (Button) findViewById(R.id.pickDate); // add a click listener to the button mPickDate.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { showDialog(DATE_DIALOG_ID); } }); // get the current date final Calendar c = Calendar.getInstance(); mYear = c.get(Calendar.YEAR); mMonth = c.get(Calendar.MONTH); mDay = c.get(Calendar.DAY_OF_MONTH); // display the current date updateDisplay(); // Set up click listeners for all the buttons View continueButton = findViewById(R.id.continue_button); continueButton.setOnClickListener(this); View newButton = findViewById(R.id.new_button); newButton.setOnClickListener(this); View aboutButton = findViewById(R.id.about_button); aboutButton.setOnClickListener(this); View exitButton = findViewById(R.id.exit_button); exitButton.setOnClickListener(this); } /** Called when the activity is first created. */ @Override protected Dialog onCreateDialog(int id) { switch (id) { case DATE_DIALOG_ID: return new DatePickerDialog(this, mDateSetListener, mYear, mMonth, mDay); } return null; } // updates the date we display in the TextView private void updateDisplay() { mDateDisplay.setText( new StringBuilder() // Month is 0 based so add 1 .append(mMonth + 1).append(-) .append(mDay).append(-) .append(mYear).append( )); } // the callback received when the user sets the date in the dialog private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() { public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { mYear = year; mMonth = monthOfYear; mDay = dayOfMonth; updateDisplay(); } }; // ... public void onClick(View v) { switch (v.getId()) { case R.id.about_button: Intent i = new Intent(this, About.class); startActivity(i); break; // More buttons go here (if any) ... } } } On Jun 22, 8:56 am, DonFrench dcfre...@gmail.com wrote: Well you can't have two onCreate methods -- that much is certain. So fix that first and then work on the other problems. On Jun 21, 9:13 pm, Varun Khanduja varunkhand...@gmail.com wrote: Thank you. I resolved some of the issues and the number of errors are down to 3. /*** * Excerpted from Hello, Android!, * published by The