Re: [android-developers] Where can I find the Android Cloud to Device Messaging API?

2010-05-20 Thread Michael Elsdörfer
It's part of the Google-addons: http://code.google.com/android/c2dm/index.html On 05/20/2010 08:53 PM, rtreffer wrote: So Android 2.2 is out, we've got a new SDK, and a promising new feature Android Cloud to Device Messaging. But I just can't find any traces of this in the API diff. Did

[android-developers] Re: Avoid restarting http request on orientation change

2010-04-18 Thread Michael Elsdörfer
Depending on your specific needs, a service might make sense, but for simple cases, it's not strictly necessary. You can instead use Activity.onRetainNonConfigurationInstance(), which allows you to pass live Java objects to the new Activity instance - i.e., for example an AsyncTask object. Just

[android-developers] To save resources, should services use the android:process attribute?

2010-04-12 Thread Michael Elsdörfer
I have a service that runs continuously. I opted to run the service in a separate process, communicating through IPC with the client activities, thinking this will help conserve memory. If the user is done interacting, Android could shut down the entire client side process. However, the protocol

[android-developers] Re: How to detect correctly APN changes

2010-02-10 Thread Michael Elsdörfer
Maybe try your luck with ACTION_ANY_DATA_CONNECTION_STATE_CHANGED: http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/telephony/java/com/android/internal/telephony/TelephonyIntents.javaq=ANY_DATA_STATEsa=Ncd=2ct=rcl=64 It's not advertised in the public SDK, but Sipdroid seems to use it.

[android-developers] Re: Are processes kept alive when nothing is being done?

2010-02-09 Thread Michael Elsdörfer
http://developer.android.com/guide/topics/fundamentals.html#proclifeKeeping it around has no negative impact on the user. It would be possible though that a broken application still has active threads around which are eating CPU cycles, correct? Michael -- You received this message because

[android-developers] Animations with transparent background broken on Milestone/Droid?

2010-02-07 Thread Michael Elsdörfer
I'm using the stock android.R.anim.fade_in animation to fade in a textview. Here's the code to reproduce: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Animation fadeInAnim =

[android-developers] Re: RatingBar size issues on high-density screens (Droid, Nexus One)

2010-02-06 Thread Michael Elsdörfer
I had trouble with this too. The solution is to use support-screens to enable anyDensity=true. Simply setting targetSdkVersion to something = 4 also works, since this makes anyDensity=true the default. I would have assumed that the SDK that you build against automatically is considered the

[android-developers] Re: Managing translations updates

2009-11-28 Thread Michael Elsdörfer
I've written a simple script to convert from and to gettext .po files: http://github.com/miracle2k/android2po -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To

[android-developers] Managing translations updates

2009-11-22 Thread Michael Elsdörfer
Once thing I've asked myself for a while now: How would one manage continuous updates to translations? I.e., when releasing a new version, you wouldn't want your translators having to manually copy and paste existing translations from the previous versions, or worse, re-translate everything. Even

[android-developers] Re: My app runs fine on ADP1, but crashes the Motorola Droid?

2009-11-22 Thread Michael Elsdörfer
You can find a number of reports from people who see their Droids crash in regular intervals (https://supportforums.motorola.com/thread/ 16278); users like to attribute such problems to whatever app they recently used/installed, but it really sounds like a problem with the system in general.

[android-developers] ADC II Package Rename Content Providers

2009-08-31 Thread Michael Elsdörfer
This is slightly confusing me right now. If I have a content provider, should it's authority be renamed also? I would have thought it makes sense, allowing both versions to run next to each other cleanly. But then I seem to be experiencing strange errors if both versions do run hat the same

[android-developers] LocationManager API too limited?

2009-08-22 Thread Michael Elsdörfer
...or maybe I am just missing something? I have a service and would like that service to keep up with the user's current location. I don't have any particular requirements in terms of accuracy etc. So I am looping over the list of all providers, and registering a listener for each. I thought

[android-developers] Changing the More icon drawable

2009-08-01 Thread Michael Elsdörfer
Is it correct that there is no way to change the actual icon of the automatically created more menu item? I can see there is a android:moreIcon option for Themes, but I can't get it to work, and it looks like the MenuBuilder class actually has the internal theme names hardcoded.

[android-developers] Re: Separating Widget from main Application

2009-07-30 Thread Michael Elsdörfer
Make sure this doesn't just happen when you launch from Eclipse - this is actually a pretty useful feature for development. Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post

[android-developers] Re: onStart() not called when a service is restarted after, being killed?

2009-07-26 Thread Michael Elsdörfer
After having a look at the source code, I would think that this is supposed to work. See sendServiceArgsLocked (http://www.google.com/codesearch/p? hl=ensa=Ncd=1ct=rc#uX1GffpyOZk/services/java/com/android/server/am/ ActivityManagerService.javal=8950) which are later converted to onStart() calls

[android-developers] Re: Protocol Buffers (protobuf)

2009-07-25 Thread Michael Elsdörfer
I can confirm that Class.forName() works, though it's not the fastest thing in the world (about 3 seconds for 10 message classes). I sort of do feel like I need to init *all* of them in order to be safe. Maybe I can find some clever way to do this in the background while the user is still

[android-developers] onStart() not called when a service is restarted after, being killed?

2009-07-25 Thread Michael Elsdörfer
I have a service that needs to hold a persistent TCP connection, think IM. I'm reluctant to use setForeground() - the service being down temporarily isn't that big a deal, and I am assume I can trust that I'll be run again once memory is available, correct? The problem here is this. The service

[android-developers] Re: Protocol Buffers (protobuf)

2009-07-24 Thread Michael Elsdörfer
Ah, I've now run into this issue also, it seems. Strangely, it works just fine for the most part, except for random, unreproducable cases, where it starts to hang somewhere inside getDeclaredMethods(). easiest way to do this is to call Class.forName(String className) early in the app start

[android-developers] Re: In-place upgrade of app, outside of Market

2009-06-09 Thread Michael Elsdörfer
Or the other way around: Downloaded it first from an 3rd party source and then trying to buy it from the Android Market... this is a more likely scenario. I'm not sure if the user needs to uninstall first. No, Market seems to only care about package names. The app may appear as not

[android-developers] Re: Debug Appwidget using Eclipse/ADT

2009-06-07 Thread Michael Elsdörfer
It worked for me at some point, but mostly it doesn't either. However, you can use the Dev Tools app that is installed in the emulator to explicitly set your package as the one that should be debugged. Michael --~--~-~--~~~---~--~~ You received this message

[android-developers] Re: Widget developer tired of Doesn't launch comments

2009-06-04 Thread Michael Elsdörfer
Can I hide the app icon from launcher after first launch? Try PackageManager.setComponentEnabledSetting(): http://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting(android.content.ComponentName,%20int,%20int) This does work for services,

[android-developers] Call Activity from Widget, have only one instance. I am confused.

2009-05-30 Thread Michael Elsdörfer
I've read through the Application Fundamentals three times today (and I had done so before), but I still can't quite wrap my ahead around the task concept. Or I guess I thought I understood it, but usually, the results I am seeing don't match up to what I would expect to happen (maybe a tool to

[android-developers] Re: What is the difference between thread and service?

2009-05-27 Thread Michael Elsdörfer
From what I under understand, your application having a service running is basically just holding a (service) object that tells Android not to kill your process. The service onStart methods etc. still run in your main thread and are subject to Application not responding. You could have a

[android-developers] Maximum size of onSaveInstanceState bundle

2009-05-27 Thread Michael Elsdörfer
I have an activity that loads a bitmap from a database when it starts up. Due to the nature of the app, should the activity be killed and recreated at a later point, I cannot guarantee that the bitmap in the database is still the same one. Should I save the bitmap to the bundle to be able to

[android-developers] Widget process lifetime: Why not stop the service?

2009-05-23 Thread Michael Elsdörfer
I'm writing a widget that needs to update rather infrequently (say multiple hours). Following the source examples out there, it seems the common solution is to use a service to prepare the updates. However, after I am done, my process is still running on service level, it looks like it's not

[android-developers] Re: Widget process lifetime: Why not stop the service?

2009-05-23 Thread Michael Elsdörfer
Don't use a service; use the alarm manager to schedule your wakeup/work. Currently I'm actually using the widget framework's update mechanism. From what I understand, a service must be used in any case to avoid ANR when processing the request might take a bit longer. The widget example

[android-developers] AppWidgets: Reusing RemoteViews instance leaks memory?

2009-05-21 Thread Michael Elsdörfer
I'm writing a widget. Currently, I'm have a simple ImageView, and calling RemoteViews.setImageViewBitmap(). I'm using a service to do the updates. I thought it might be a good idea to reuse an existing RemoteViews instance, so I'm only querying it the first time around, and subsequently simply

[android-developers] AppWidgets: Dynamic value for updatePeriodMillis?

2009-05-16 Thread Michael Elsdörfer
The developer blog suggests that one might ask the user for a custom widget update interval: Consider updating as infrequently as possible, or letting your users pick a custom update frequency. http://android-developers.blogspot.com/2009/04/introducing-home-screen-widgets-and.html It's not

[android-developers] Re: NEW Gesture Recognition Application!

2009-04-30 Thread Michael Elsdörfer
check out our blog and demonstration video and comment to let us know what you think. I don't like having to click on a button (Call, SMS etc) after drawing the gesture. Instead, I'd like to see the app doing that by itself depending on where the gesture was defined. Apart from that,

[android-developers] Using Widget.TextView.ListSeparator

2009-04-26 Thread Michael Elsdörfer
I need to separate to content areas in my application, and I thought I would use the OS built-in style for better integration, style-wise. The separator used by the ListView seemed to fit. So I had a custom style resource like this, inheriting from Widget.TextView.ListSeparator: style

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

2009-04-13 Thread Michael Elsdörfer
Are you unaware of the recent Scrabble issue on the iPhone? You are probably referring to Scrabulous on Facebook. As far as I am aware, this also was mainly a trademark issue. Hasbro has claimed copyright on the game itself, but of course, that doesn't really mean much. I don't think you

[android-developers] Re: SDKs comparison with the iPhone

2009-04-13 Thread Michael Elsdörfer
it would be done on a discussion list, which would fit in with many open source projects I've worked on where pre-release versions are circulated and then developers say Yay or Nay to whether it's good enough to call a production release, I'm not sure what Open Source projects work like

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

2009-04-07 Thread Michael Elsdörfer
Having seen the demo video of your game I can see why they would appear to have a reasonable basis for their case. You'd added some fancy features, but the basic game play is the same right down to the block shapes. I don't think so. I'm no layer either, of course, but I thought the

[android-developers] market://details not working?

2009-03-30 Thread Michael Elsdörfer
Apparently, I supposed to be able to open the Market page of my app by querying an intent with an URL like: market://details?id=app_id where app_id seems to be the package name: http://www.google.com/support/forum/p/Android+Market/thread?tid=5c8501d73226fad8hl=en However, while this seems to

[android-developers] market://details not working?

2009-03-30 Thread Michael Elsdörfer
Apparently, I'm supposed to be able to open my app in the Android market by querying an Intent with an URL like: market://details?id=app_id app_id seems to be the package name, e.g. say com.NamcoNetworks.PacMan See for example: