Re: [android-developers] Re: App Widget considerations when enabling installLocation in manifest

2011-06-16 Thread Mark Carter
I plan to show this message when the app detects it has been moved to the SD 
card (i.e. the first time it runs after the event):

Android automatically disables homescreen widgets for apps that have been 
moved to the SD card. If you would like to use widgets, then please move 
this app back to internal memory.

There's a starting point. Feel free to improve it. If we can settle on 
something then maybe others can post translations here...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: App Widget considerations when enabling installLocation in manifest

2011-06-16 Thread Marcin Orlowski
You could also consider separating widget from main app. having two apks you
could allow sd card for main user and keep widget plugin app on main memory.
depending on what your widget shows it may be the way to go
On Jun 16, 2011 9:33 AM, Mark Carter mjc1...@googlemail.com wrote:
 I plan to show this message when the app detects it has been moved to the
SD
 card (i.e. the first time it runs after the event):

 Android automatically disables homescreen widgets for apps that have been

 moved to the SD card. If you would like to use widgets, then please move
 this app back to internal memory.

 There's a starting point. Feel free to improve it. If we can settle on
 something then maybe others can post translations here...

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: App Widget considerations when enabling installLocation in manifest

2011-06-16 Thread Mark Carter
Yes, I have considered that and may well end up taking that route. It's
messy though, whether it's a separate app in the Market or an APK downloaded
from my server (or even bundled as an asset in the main app).

Also the separation means you have to handle the scenario where the widget
app is an earlier version than the main app and vice versa. Much more
difficult to test unless the internal APIs (e.g. ContentProviders) are
particularly mature.

On 16 June 2011 17:24, Marcin Orlowski webnet.andr...@gmail.com wrote:

 You could also consider separating widget from main app. having two apks
 you could allow sd card for main user and keep widget plugin app on main
 memory. depending on what your widget shows it may be the way to go
 On Jun 16, 2011 9:33 AM, Mark Carter mjc1...@googlemail.com wrote:
  I plan to show this message when the app detects it has been moved to the
 SD
  card (i.e. the first time it runs after the event):
 
  Android automatically disables homescreen widgets for apps that have
 been
  moved to the SD card. If you would like to use widgets, then please move
  this app back to internal memory.
 
  There's a starting point. Feel free to improve it. If we can settle on
  something then maybe others can post translations here...
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: App Widget considerations when enabling installLocation in manifest

2011-06-16 Thread String
Here's mine, being used in several apps now:

[app name]'s widgets are currently disabled because it has been installed to 
SD card. To re-enable widgets, click App settings  Move to phone, then 
restart [app name].

Similar to yours, but I wanted to give (novice) users more explicit 
instructions on how to move the app off the SD card. Though there's a danger 
there too, because not all phones label that button the same way. Hopefully 
they'll get the gist.

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

Re: [android-developers] Re: App Widget considerations when enabling installLocation in manifest

2011-06-16 Thread Mark Carter
I wanted to make clear this was an Android limitation rather than something
specific to the app.

I'm guessing most users would have manually moved the app to SD so they know
where to go. But maybe that's not right if the installLocation is auto?

Maybe it's enough to include a button (in the dialog) that takes them to the
App details screen (i.e. where the Move to SD card button is) although I'm
not sure how this is done in 3.0+ (and it may not work for future SDK
levels).

On 16 June 2011 20:04, String sterling.ud...@googlemail.com wrote:

 Here's mine, being used in several apps now:

 [app name]'s widgets are currently disabled because it has been installed
 to SD card. To re-enable widgets, click App settings  Move to phone, then
 restart [app name].

 Similar to yours, but I wanted to give (novice) users more explicit
 instructions on how to move the app off the SD card. Though there's a danger
 there too, because not all phones label that button the same way. Hopefully
 they'll get the gist.

 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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: App Widget considerations when enabling installLocation in manifest

2011-05-31 Thread String
Having been forced to enable install-to-SD for a couple of apps which 
feature widgets, this is a bit of a sore spot with me. I say forced 
because the average user doesn't understand the issues involved, only 
understands that you (the dev) haven't enabled install-to-SD, so they 
downrate you for it. Then other average users downrate you because 
their widgets disappeared. It's a no-win situation.

I think your reading of the docs is correct, that the only downside 
currently is that appwidgets do get removed if/when the app gets moved to 
SD. As to whether more serious problems may arise in the future, who can 
say? Probably nobody at this point, and those who might (the framework team) 
won't, because they basically aren't allowed to talk about future plans.

My preference would be for the system to ask the user before it moves an app 
with widgets to the SD card, or (at the very least) warns the user of these 
consequences if they move an app manually. Unfortunately, this change would 
have to be made at the system level, and somehow it doesn't seem likely.

As a workaround, I'm currently in the process of implementing a warning of 
my own in the app's main activity. It'll check to see if it's been installed 
to SD, and if it has, issue a warning of its own. That's suboptimal - 
there's no guarantee the user will open the main activity in a timely manner 
to see this warning - but it's better than nothing, and will hopefully 
reduce the 1* Market comments.

As it stands, I can stomach informing users that it's either 
 run-from-sd-card OR show widgets but NOT both.


How are you planning to inform your users of this? Be aware that I already 
have it in my Market description, but most users don't read that.

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

Re: [android-developers] Re: App Widget considerations when enabling installLocation in manifest

2011-05-31 Thread Mark Carter
Thanks for the feedback.

On 31 May 2011 16:58, String sterling.ud...@googlemail.com wrote:

 As a workaround, I'm currently in the process of implementing a warning of
 my own in the app's main activity. It'll check to see if it's been installed
 to SD, and if it has, issue a warning of its own. That's suboptimal -
 there's no guarantee the user will open the main activity in a timely manner
 to see this warning - but it's better than nothing, and will hopefully
 reduce the 1* Market comments.

 As it stands, I can stomach informing users that it's either
 run-from-sd-card OR show widgets but NOT both.


 How are you planning to inform your users of this? Be aware that I already
 have it in my Market description, but most users don't read that.

 String


Yes, I was thinking of something similar. What is the best way to check the
app has been moved to SD?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
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: App Widget considerations when enabling installLocation in manifest

2011-05-31 Thread String
On Tuesday, May 31, 2011 10:08:19 AM UTC+1, Mark Carter wrote:

What is the best way to check the app has been moved to SD?


http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_EXTERNAL_STORAGE

http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_EXTERNAL_STORAGEGet
 
an instance of the ApplicationInfo object with code like this:

PackageManager pkgMgr = context.getPackageManager();
ApplicationInfo appInfo = pkgMgr.getApplicationInfo(your.package.name, 0);

It'd be nice to put code like this in the appwidget itself, so that if the 
user has one on their home screen, you could notify them more proactively. 
But annoyingly, the appwidget doesn't get notified that it's going away; 
no ACTION_APPWIDGET_DISABLED, no ACTION_APPWIDGET_DELETED, nothing. It just 
disappears... but any service you might have scheduled to update said 
appwidget *doesn't* get removed, it's left to run with no widget to update.

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

Re: [android-developers] Re: App Widget considerations when enabling installLocation in manifest

2011-05-31 Thread Mark Carter
Thanks.

I wonder if it's possible to listen for a Move to SD event (is there a
broadcast intent?). If it were, then the app could at that moment raise a
notification warning the user that widgets would no longer be available.

On 31 May 2011 17:28, String sterling.ud...@googlemail.com wrote:

 On Tuesday, May 31, 2011 10:08:19 AM UTC+1, Mark Carter wrote:

 What is the best way to check the app has been moved to SD?



 http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_EXTERNAL_STORAGE


 http://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_EXTERNAL_STORAGEGet
 an instance of the ApplicationInfo object with code like this:

 PackageManager pkgMgr = context.getPackageManager();
 ApplicationInfo appInfo = pkgMgr.getApplicationInfo(your.package.name,
 0);

 It'd be nice to put code like this in the appwidget itself, so that if the
 user has one on their home screen, you could notify them more proactively.
 But annoyingly, the appwidget doesn't get notified that it's going away;
 no ACTION_APPWIDGET_DISABLED, no ACTION_APPWIDGET_DELETED, nothing. It just
 disappears... but any service you might have scheduled to update said
 appwidget *doesn't* get removed, it's left to run with no widget to
 update.

 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

Re: [android-developers] Re: App Widget considerations when enabling installLocation in manifest

2011-05-31 Thread String
On Tuesday, May 31, 2011 10:51:30 AM UTC+1, Mark Carter wrote:

I wonder if it's possible to listen for a Move to SD event (is there a 
 broadcast intent?).


If there is, it's undocumented (or well hidden). The most likely looking 
Intent in the docs is android.intent.action.PACKAGE_CHANGED, and I've just 
confirmed that it doesn't get broadcast when an app is moved to SD.

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