RE: [android-developers] General Newbie Question on app development

2017-01-31 Thread James Carter
That answered it.  Thanks!

From: android-developers@googlegroups.com 
[mailto:android-developers@googlegroups.com] On Behalf Of Marina Cuello
Sent: Tuesday, January 31, 2017 12:00 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] General Newbie Question on app development

If you're asking about how to simulate on your computer an Android device with 
your required sensors,  you can check what sensors are available on this 
documentation page: https://developer.android.com/studio/run/emulator.html

Marina

On Tue, Jan 31, 2017 at 3:24 PM, 
mailto:jcar...@leupold.com>> wrote:
How do I develop an Android app on a PC which requires hardware used on the 
phone (e.g., GPS, magnetometer, etc.)?

Thanks


--
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to 
android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/0fceab36-00aa-4153-9918-384ad9c1f48a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google 
Groups "Android Developers" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/android-developers/hCT5tRgmeHw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to 
android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CACaNmX09bbXHas96gUG3tJy3MLaSgJV3--UOq1QE2v6cpJ5rOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
___

Notice to recipient: This e-mail and any attachments are for
the sole use of the intended recipient(s) and may be a
communication subject to export control restrictions or that
otherwise contains proprietary and confidential information.
Any unauthorized review, use, disclosure, or distribution is
strictly prohibited. If you are not the intended recipient(s),
please contact the sender by reply e-mail and destroy all
copies of the original message.
Thank you. 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/3cd73db893d94fa7b34bcc7ac0e104a8%40Exch2013-02.Leupold.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Posts from new users not passing through moderation?

2013-02-20 Thread Mark Carter
I posted a new topic here a couple of weeks ago using a new google account. 
Unfortunately it never appeared here :(

Can anyone confirm the moderation queue is being actively processed?

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: If hdpi and xhdpi drawables defined, which drawable is used as base for an mdpi device?

2012-10-21 Thread Mark Carter
So I ran some tests on Gingerbread with drawables only defined for hdpi and 
xhdpi.

Both ldpi devices and mdpi devices used the hdpi drawables.

Wouldn't it be better for mdpi to use xhdpi because wouldn't you get better 
quality by just halving the xhdpi resolution?

BTW, currently xhdpi and hdpi collectively cover about 80% of devices:

http://developer.android.com/about/dashboards/index.html

On Friday, October 19, 2012 12:29:14 AM UTC+11, RichardC wrote:
>
> I think none of the above but you should read:
>
> http://developer.android.com/guide/topics/resources/providing-resources.html#BestMatch
>
> and also this is very easy to test just use different coloured bitmaps in 
> each qualified folder.
>
> On Thursday, October 18, 2012 1:53:40 PM UTC+1, Mark Carter wrote:
>>
>> If I define a drawable in hdpi and xhdpi but not mdpi, will Android (on 
>> an mdpi device) take the xhdpi drawable and scale it down by a factor of 
>> two or will it use the nearest defined density (hdpi) drawable?
>
>

-- 
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] Will there be a new density beyond xhdpi to support 440dpi screens as found in the new HTC J Butterfly?

2012-10-19 Thread Mark Carter
ldpi ~120dpi
mdpi ~160dpi
hdpi ~240dpi
xhdpi ~320dpi
xxhdpi would then be for 400dpi or 480dpi (depending how you continue the 
sequence)?


-- 
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] If hdpi and xhdpi drawables defined, which drawable is used as base for an mdpi device?

2012-10-18 Thread Mark Carter
If I define a drawable in hdpi and xhdpi but not mdpi, will Android (on an 
mdpi device) take the xhdpi drawable and scale it down by a factor of two 
or will it use the nearest defined density (hdpi) drawable?

-- 
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] Anyone have a Honeycomb or Ice Cream Sandwich device with Voice Recognition installed?

2012-08-08 Thread Mark Carter
I'm hoping that someone will be kind enough to launch the Voice Recognition 
system settings and report back what activity is started (by looking at the 
logs).

I started an SO question:

http://stackoverflow.com/questions/11860229/how-to-display-voice-recognition-settings-screen-programmatically

and I intend to maintain the answer for future android releases, in a 
similar way to what I do here:

http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-android/4377116#4377116

Any help much appreciated!

-- 
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] Intent to launch Voice Recognition Settings Activity?

2012-08-08 Thread Mark Carter
I know for pre-Honeycomb devices you need:

intent.setClassName("com.google.android.voicesearch", 
"com.google.android.voicesearch.VoiceSearchPreferences");

and for Jelly Bean:

intent.setClassName("com.google.android.googlequicksearchbox", 
"com.google.android.voicesearch.VoiceSearchPreferences");

but does anyone have an HC or ICS device handy to check the logs to see 
what they use?

-- 
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: Recommendations on Screenshot formats?

2012-07-21 Thread Mark Carter
One year on, now we have xhdpi devices and tvdpi (or whatever it is called 
for the Nexus 7), what is the recommended screenshot size to use?

One thing I don't like with the Galaxy Nexus screenshots, is that they 
include the soft (back, home, multitasking) buttons - so the user ends up 
seeing those in the screenshot and again the real soft buttons on their 
screen.

On Tuesday, 28 June 2011 18:54:07 UTC+8, MarcoAndroid wrote:
>
> Yup it's now a day later, images are looking fine now on my N1 in the 
> market. So 320x480 seems the way to go. 
>
> On 27 jun, 21:12, MarcoAndroid  wrote: 
> > Actually, just noticed that my screenshots of uploaded 480x800 format 
> > look in my phone'smarketexactly the same as the previews in the dev 
> > console, cropped with left say 20pixels cut off. Seems you can use 
> > that as a real indication on how they will look like... 
> > 
> > BTW just uploaded a 320x480 and indeed in the preview it now is fully 
> > shown, no cropping. Let's see what themarketshows now on my phone 
> > (N1). Nothing yet, waiting for the update of the images to appear... 
> > 
> > On 27 jun, 20:33, MarcoAndroid  wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Reading this onehttp://
> groups.google.com/group/android-developers/browse_thread/threa... 
> > > it seems 320x480 is the size to go for, forget the others... 
> > 
> > > On 21 jun, 17:07, Santiago Lema  wrote: 
> > 
> > > > Hello, 
> > 
> > > >  I just published my first Android port (from my iOS app) and I am 
> > > > really puzzled as to how I should handle screenshots? 
> > 
> > > > Letting aside that the jpeg quality is awful and the inability to 
> > > > provide localized screenshots, I'll ask just one simple question. 
> > 
> > > > - What is the recommended size to upload screenshots so they look 
> nice 
> > > > on all devices? 
> > 
> > > > I uploaded 800x480 PNG 24 bits screenshots, hoping a higher quality 
> > > > source would yield decent results but I was sorely disappointed. Not 
> > > > only the jpeg quality setting is awful but the androidmarketseems 
> tocropmy screenshots to a 1.5 ratio (like 320x480) at what seems to be 
> > > > random positions? 
> > 
> > > > If I upload screenshots in several formats will themarketuse the 
> > > > appropriate ones for each phone ? Or will it scale each one 
> miserably 
> > > > just like it does for the ones I uploaded and display them in their 
> > > > full ugliness on all devices ? 
> > 
> > > > PS: If anyone cares, I have just written a long rant about issues 
> when 
> > > > publishing to the AndroidMarketissues which details thescreenshot 
> > > > issues too:http://www.smallte.ch/blog-read_en_15001.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Carter
Do you just mean the density configuration in general?  Surely Donut did
not specifically know about xhdpi (which was only introduced in
Gingerbread)?

On 27 May 2012 10:53, Dianne Hackborn  wrote:

> There is no need to here, previous versions of the platform (down to API
> 4) know about the density configuration and will pick the correct density
> for you.
>
>
> On Sat, May 26, 2012 at 9:20 AM, Mark Murphy wrote:
>
>> On Sat, May 26, 2012 at 12:12 PM, Mark Carter wrote:
>> > When min level is pre-Donut, I remember there is a common approach to
>> use
>> > drawable-ldpi-v4, drawable-hdpi-v4, drawable-nodpi-v4 (as well as
>> > "drawable") for similar reasons.
>> >
>> > If I have an app with ONLY xhdpi resources and set the minimum level to
>> 8,
>> > then I notice the drawable-xhdpi resources are still picked up (as
>> opposed
>> > to throwing some kind of resource not found exception) on Froyo.  This
>> is
>> > convenient but not particularly bulletproof IMHO, not least because the
>> > Froyo device will have no idea what scaling xhdpi implies.
>>
>> :: smacks forehead ::
>>
>> My apologies. I misread your question. I thought you were saying that
>> your minSdkVersion *was* 9, not was *less than* 9. With a
>> minSdkVersion of less than 9, using -v9 for resources you only want
>> used on 9 and higher is perfectly reasonable.
>>
>> > Now, I haven't tested this, but I suppose that using drawable-xhdpi-v9
>> will
>> > stop froyo from seeing those resources at all and so give
>> > better-than-nothing runtime exceptions (which in most cases would show
>> up
>> > pretty quickly).
>>
>> Correct.
>>
>> --
>> Mark Murphy (a Commons Guy)
>> http://commonsware.com | http://github.com/commonsguy
>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>
>> Android Training in DC: http://marakana.com/training/android/
>>
>> --
>> 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
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Carter
When min level is pre-Donut, I remember there is a common approach to use 
drawable-ldpi-v4, drawable-hdpi-v4, drawable-nodpi-v4 (as well as 
"drawable") for similar reasons.

If I have an app with ONLY xhdpi resources and set the minimum level to 8, 
then I notice the drawable-xhdpi resources are still picked up (as opposed 
to throwing some kind of resource not found exception) on Froyo.  This is 
convenient but not particularly bulletproof IMHO, not least because the 
Froyo device will have no idea what scaling xhdpi implies.

Now, I haven't tested this, but I suppose that using drawable-xhdpi-v9 will 
stop froyo from seeing those resources at all and so give 
better-than-nothing runtime exceptions (which in most cases would show up 
pretty quickly).

Compile-time warnings (Lint) may be more appropriate though - I'll have to 
investigate how it handles this particular scenario. 

On Saturday, 26 May 2012 23:16:13 UTC+8, Mark Murphy (a Commons Guy) wrote:
>
> On Sat, May 26, 2012 at 11:05 AM, Mark Carter wrote: 
> > When using android:minSdkVersion less than 9, is it (or should it be) 
> > standard practice to use "drawable-xhdpi-v9" instead of 
> "drawable-xhdpi"? 
>
> It is not standard practice, nor would I recommend it. You use a -vNN 
> resource set when you need *different* resources for a given API level 
> (or higher). 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> Android Training in DC: http://marakana.com/training/android/ 
>

-- 
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] drawable-xhdpi-v9 ?

2012-05-26 Thread Mark Carter
When using android:minSdkVersion less than 9, is it (or should it be) 
standard practice to use "drawable-xhdpi-v9" instead of "drawable-xhdpi"?

-- 
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] Error reports where none of the stacktrace elements relate to your code?

2012-05-11 Thread Mark Carter
Thanks for the feedback.

Thankfully the user provided a message "force crash on keyboard input". So 
maybe he's using a keyboard which does something dodgy to the compose text. 
 The app has over half a million users, and this is the only example of 
this crash that I know of. So I'm not worried, just curious.

On Friday, 11 May 2012 19:30:11 UTC+8, JTeagle wrote:
>
> >Subject: [android-developers] Error reports where none of the stacktrace 
> >elements 
> >relate to your code? 
> >For example, in the Developer Console, I got this: 
>
> >Does this indicate a bug in the SDK? 
>
> Unfortunately, not necessarily. Consider a situation where you set some 
> undesirable data into a View-derived object. At that time it might have 
> not 
> checked it and dutifully stored it; when it came to render time, it then 
> tries to use the data and falls over. At the point where it falls over it 
> would appear to be entirely within the system - but the worst the SDK 
> could 
> be accused of here is not sanity checking the data for possible faults. 
>
> It appears that this came simply from starting your app and it trying to 
> display the contents of the layout, correct? Does the content of your 
> layout 
> have anything unusual in it? (If it's not too long a layout, paste it 
> here.) 
>
> If it was triggered by some action you took from another activity [that 
> started the one that failed] or if this activity did show and then this 
> error triggered from some action you took on this activity, then let us 
> know. 
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Getting Acquired: Selling Apps and Games to a Business/Investor

2012-03-28 Thread Mark Carter
>  Does Google currently facilitate the transfer of acquired apps/games 
from one developer account to another? 

Earlier this month I emailed Google to transfer my paid app from my 
personal Google account to my Google Apps for Business account. I was 
expecting it to take days or weeks so thought there would be no harm 
emailing them just before bedtime. Woke up the next morning to find the app 
had been transferred in less than two hours and that it had been 
"unpublished" (presumably because there was some subtle change required by 
me to some pricing - can't remember exactly). So I lost almost half a 
day's - yeah, I like a good sleep - sales but not a big deal in the grand 
scheme of things.

Also, devs need to be aware of this:

http://stackoverflow.com/questions/7802062/any-problems-regarding-lvl-when-moving-apps-from-one-google-account-to-another
 

On Wednesday, March 28, 2012 9:30:39 PM UTC+8, Rob Jackson wrote:
>
> I'm working on an article about app developers selling their apps/games to 
> larger companies for Phandroid.com and hoping some developers here may be 
> able to offer some insight. If you have any experience, insight, stories to 
> share, or people to refer, please respond here or shoot me an E-Mail at rob 
> (at) phandroid (.) com
>
> Some specific questions I have:
>
>- Does Google currently facilitate the transfer of acquired apps/games 
>from one developer account to another?
>- If so, what are the requirements?
>- If not, is this something Google may plan for the future?
>- Does Google recommend any "best practices" for Android Developers so 
>that they may one day sell their app with minimal complications? Perhaps 
>creating a separate dev account for each account, or signing each app with 
>a different key, or any other practices?
>- Can a developer change the signing key of an app upon request or 
>through any automated means?
>
>
> I'm guessing the process is rudimentary and relegated to the huge 
> companies buying big name apps like Draw Something, but curious to hear 
> your thoughts. I'm still hoping Google will implement some simpler 
> Developer features like Github-style organization/team management so 
> multiple developers can administer an application in the Market/Play.
>
> Thanks for your help!
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to detect screen rotation through 180 degrees from landscape to landscape orientation?

2012-03-28 Thread Mark Carter
In my case, I need to for the camera (otherwise the image will appear 
upside down).

Some apps (like Paper Camera) get around this by not allowing the screen to 
rotate, and so the SurfaceView (used by the Camera) is more like a window 
(through the device).

At risk of this post going off on a tangent, the "window" strategy makes 
sense. In other words, when the user rotates the screen, leave the 
SurfaceView as it is and only reposition/redraw the controls. I imagine 
this is quite hard (because you would be effectively drawing the controls 
upside down), and so not worth the effort.

Other reasons for caring about which side the screen is up, include 
anything that uses the orientation sensor, such as games.

On Thursday, March 29, 2012 2:06:51 PM UTC+8, Zsolt Vasvari wrote:
>
> Just curious, why do you care which side of the screen is up? 
>
> On Thursday, March 29, 2012 9:57:14 AM UTC+8, Mark Carter wrote:
>>
>> I've seen a few other questions similar to this but no answers.
>>
>> Rotating from portrait to landscape (either direction) and back again, we 
>> get the helpful call to onConfigurationChanged().
>>
>> However, when rotating from landscape to landscape (through 180 degrees) 
>> onConfigurationChanged() is not called.
>>
>> I've seen mention of using OrientationEventListener but this seems flakey 
>> to me because you can rotate quickly around without triggering a display 
>> orientation change.
>>
>> I've tried adding a layout change listener, but with no success.
>>
>> So the question is, how to reliably detect such a change in landscape 
>> orientation?
>>
>> Note: I also posted this on SO: 
>> http://stackoverflow.com/questions/9909037/how-to-detect-screen-rotation-through-180-degrees-from-landscape-to-landscape-or
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to detect screen rotation through 180 degrees from landscape to landscape orientation?

2012-03-28 Thread Mark Carter


I've seen a few other questions similar to this but no answers.

Rotating from portrait to landscape (either direction) and back again, we 
get the helpful call to onConfigurationChanged().

However, when rotating from landscape to landscape (through 180 degrees) 
onConfigurationChanged() is not called.

I've seen mention of using OrientationEventListener but this seems flakey 
to me because you can rotate quickly around without triggering a display 
orientation change.

I've tried adding a layout change listener, but with no success.

So the question is, how to reliably detect such a change in landscape 
orientation?

Note: I also posted this on SO: 
http://stackoverflow.com/questions/9909037/how-to-detect-screen-rotation-through-180-degrees-from-landscape-to-landscape-or

-- 
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] Installation 64-bit Windows 7 [SOLVED]

2012-03-17 Thread Mark Carter
I *always* run Eclipse as Administrator these days, because of such 
problems I have experienced in the past.

On Sunday, 18 March 2012 06:56:48 UTC+8, Bob Plantz wrote:
>
> Thanks to the help posted here, I finally solved the problem by running 
> Eclipse as administrator and installing the SDK that way. As pointed out, 
> this means I have to run as administrator to do updates, etc. Similar to 
> using sudo in my Ubuntu.
>
> --Bob
>
>
>

-- 
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] ArrayIndexOutOfBoundsException when calling Dialog.show()

2012-03-17 Thread Mark Carter
I'm seeing this on a Samsung Galaxy S II (GT-I9100G).

I'm building against level 14, targeting level 10 (min level 3).

I assume it's something to do with themes but have no idea where to start. 
I'm pretty sure it's not happening on all Galaxy SIIs otherwise I would be 
getting a lot more reports.

Or maybe the activity has been destroyed by the time this code is called - 
would that cause it?

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setIcon(R.drawable.app_icon);
builder.setTitle("my title");
builder.setMessage("my message");
builder.setPositiveButton(R.string.ok, null);
builder.show();

java.lang.ArrayIndexOutOfBoundsException: null
 at android.content.res.TypedArray.getInt(TypedArray.java:248)
 at android.widget.ScrollView.(ScrollView.java:173)
 at android.widget.ScrollView.(ScrollView.java:161)
 at java.lang.reflect.Constructor.constructNative(Constructor.java:-2)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
 at android.view.LayoutInflater.createView(LayoutInflater.java:505)
 at 
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
 at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
 at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
 at 
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:215)
 at 
com.android.internal.app.AlertController.installContent(AlertController.java:215)
 at android.app.AlertDialog.onCreate(AlertDialog.java:251)
 at android.app.Dialog.dispatchOnCreate(Dialog.java:307)
 at android.app.Dialog.show(Dialog.java:225)
 at android.app.AlertDialog$Builder.show(AlertDialog.java:823)

-- 
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: SQLite Collate UNICODE - not case sensitive in ICS??

2012-03-16 Thread Mark Carter
SQLite was upgraded from 3.6.22 to 3.7.4 for the first Honeycomb release:

http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-android/4377116#4377116
 

So you may want to verify the problem exists in SDK 3.0, but not in 2.3.3.

-- 
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: Galaxy Nexus is not properly implementing getExternalStorageDirectory; can anyone confirm?

2012-03-15 Thread Mark Carter
Even disconnecting from USB often does not work...

On 16 March 2012 09:34, Zsolt Vasvari  wrote:

> Yes, it;s broken on the Galaxy Nexus.  Files simply don't show up even if
> I hit refresh.  Very annoying.
>
>
>
> On Thursday, March 15, 2012 3:27:31 PM UTC+8, Mark Carter wrote:
>>
>> One thing (and it's really annoying) I have noticed on the Galaxy Nexus
>> is that when viewing its files from Windows 7, I am not seeing the latest
>> file/directory structure. I guess this is something related to MTP. I
>> usually end up using AirDroid instead.
>>
>> Anyway, to the point, so it could be that it seems the directory does not
>> exist, but actually it does.
>>
>> On Thursday, 15 March 2012 13:28:21 UTC+8, Dusk Jockeys Android Apps
>> wrote:
>>>
>>> As Kostya said, are you sure that your app/dir directory doesnt
>>> already exist? Because if so you would expect a value of false to be
>>> returned.
>>> Can you first check to see if the directory x exists before running
>>> mkdirs(x)?
>>>
>>> On Mar 15, 5:06 am, GJTorikian  wrote:
>>> > I wrote a reply to this, but I guess it was censored. I
>>> > was complaining about manufacturer fragmentation, again.
>>> >
>>> > If I have a directory like this: mnt/sdcard/app/dir
>>> >
>>> > mkdirs("app/dir") fails; mkdirs("app") followed by mkdirs("app/dir")
>>> works.
>>> > This is extremely unusual.
>>> >
>>> >
>>> >
>>> > On Saturday, March 10, 2012 10:53:37 PM UTC+1, Kostya Vasilyev wrote:
>>> >
>>> > >  I just tried this on my Galaxy Nexus with official 4.0.2, and it
>>> > > definitely works, with and without the training slash.
>>> >
>>> > > mkdirs returns false if the directory already exists - are you sure
>>> yours
>>> > > don't?
>>> >
>>> > > Also, does your app have the permission to write to external
>>> storage?
>>> > > IIRC, some really older platform versions used to enable this
>>> permission if
>>> > > it wasn't declared.
>>> >
>>> > > -- K
>>> >
>>> > > On 03/10/2012 11:38 PM, GJTorikian wrote:
>>> >
>>> > > It seems that that's entirely the problem. When I try to perform a
>>> > > mkdirs() operation, I get a return of false.
>>> >
>>> > >  So, for the structure of: /mnt/sdcard/myapp/
>>> >
>>> > >  new File("/mnt/sdcard/myapp/").**mkdirs() fails--but again, only
>>> for this
>>> > > device, it seems.- Hide quoted text -
>>> >
>>> > - Show quoted text -
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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: Galaxy Nexus is not properly implementing getExternalStorageDirectory; can anyone confirm?

2012-03-15 Thread Mark Carter
Sure, although I'm not going to update my app to call the Media Scanner,
because it has nothing to do with Media. The problem is, your average user
will see "Galaxy Nexus" in their Windows Explorer and assume it behaves
like a regular USB drive.

In fact, I don't understand this at all.  If MTP is supposed to be for
media only then why is the whole file system exposed?  At least, why expose
the parts of a file system that are nothing to do with media. Better still,
shouldn't the media be presented in a more media-friendly way: e.g a flat
hierarchy with Music, Videos, Photos etc?

On 15 March 2012 21:19, Kostya Vasilyev  wrote:

> Well, apps are supposed to call Media Scanner to update the media database.
>
> My point was that the media scanner, being an OS component, could keep
> track of file system changes on its own.
>
> But it doesn't -- oh well :)
>
> -- K
>
> 15.03.2012 17:16, Mark Carter пишет:
>
>  It would be nice if there was at least some kind of developer tool/option
>> that sits in between the app and the filesystem and takes care of
>> refreshing/notifying changes etc...
>>
>
> --
> Kostya Vasilyev
>
>
> --
> 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<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: Galaxy Nexus is not properly implementing getExternalStorageDirectory; can anyone confirm?

2012-03-15 Thread Mark Carter
It would be nice if there was at least some kind of developer tool/option
that sits in between the app and the filesystem and takes care of
refreshing/notifying changes etc...

2012/3/15 Kostya Vasilyev 

> 15 марта 2012 г. 11:27 пользователь Mark Carter
>  написал:
> > One thing (and it's really annoying) I have noticed on the Galaxy Nexus
> is
> > that when viewing its files from Windows 7, I am not seeing the latest
> > file/directory structure. I guess this is something related to MTP. I
> > usually end up using AirDroid instead.
>
> Right, a file or directory won't be visible until seen by the Media
> Scanner.
>
> Starting with 4.0 (IIRC), this applies to all files, not just images, as
> before.
>
> > Anyway, to the point, so it could be that it seems the directory does not
> > exist, but actually it does.
>
> If you were checking the directory for existence from the computer,
> that could easily give a false negative.
>
> A side note: it seems really weird to make 3-rd party applications
> responsible for the internal consistency of OS data (bringing the MTP
> database in sync with the file system).
>
> -- Kostya
>
> --
> 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: Galaxy Nexus is not properly implementing getExternalStorageDirectory; can anyone confirm?

2012-03-15 Thread Mark Carter
One thing (and it's really annoying) I have noticed on the Galaxy Nexus is 
that when viewing its files from Windows 7, I am not seeing the latest 
file/directory structure. I guess this is something related to MTP. I 
usually end up using AirDroid instead.

Anyway, to the point, so it could be that it seems the directory does not 
exist, but actually it does.

On Thursday, 15 March 2012 13:28:21 UTC+8, Dusk Jockeys Android Apps wrote:
>
> As Kostya said, are you sure that your app/dir directory doesnt 
> already exist? Because if so you would expect a value of false to be 
> returned. 
> Can you first check to see if the directory x exists before running 
> mkdirs(x)? 
>
> On Mar 15, 5:06 am, GJTorikian  wrote: 
> > I wrote a reply to this, but I guess it was censored. I 
> > was complaining about manufacturer fragmentation, again. 
> > 
> > If I have a directory like this: mnt/sdcard/app/dir 
> > 
> > mkdirs("app/dir") fails; mkdirs("app") followed by mkdirs("app/dir") 
> works. 
> > This is extremely unusual. 
> > 
> > 
> > 
> > On Saturday, March 10, 2012 10:53:37 PM UTC+1, Kostya Vasilyev wrote: 
> > 
> > >  I just tried this on my Galaxy Nexus with official 4.0.2, and it 
> > > definitely works, with and without the training slash. 
> > 
> > > mkdirs returns false if the directory already exists - are you sure 
> yours 
> > > don't? 
> > 
> > > Also, does your app have the permission to write to external storage? 
> > > IIRC, some really older platform versions used to enable this 
> permission if 
> > > it wasn't declared. 
> > 
> > > -- K 
> > 
> > > On 03/10/2012 11:38 PM, GJTorikian wrote: 
> > 
> > > It seems that that's entirely the problem. When I try to perform a 
> > > mkdirs() operation, I get a return of false. 
> > 
> > >  So, for the structure of: /mnt/sdcard/myapp/ 
> > 
> > >  new File("/mnt/sdcard/myapp/").mkdirs() fails--but again, only for 
> this 
> > > device, it seems.- Hide quoted text - 
> > 
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Implementing SharedUserId

2012-02-24 Thread Carter
And no, sharedUserId doesn't mean the apps share the same files.

On Feb 24, 12:31 am, "Michael ."  wrote:
> I'm really not understanding how to implement shareduserid
>
> My understanding is that:
>
> *By default, Android assigns each application its own unique user ID.
> However, if this attribute is set to the same value for two or more
> applications, they will all share the same ID — provided that they are
> also signed by the same certificate.*
>
> ok, so I understand I think theoretically how it should work at
> runtime with release apps. Both apps set the same shareduserid in
> their manifest files and are signed with the same certificate... and
> then I should be able to read the same files and properties with both
> apps.
>
> But I have not gotten to that stage yet..
>
> I'm still testing in the IDE... so this is what I've done:
>
>  - set shareduserid to same value in both apps manifests
>  - set debuggable to true in both apps manifests
>
> But I have problems even making an app run correctly...
>
> if I remove shareduserid.. my App A will run correctly... read and set
> some preferences... on startup
>
> but if I set a shareduserid... App A will pop up a logcat window with
> a lot of read in it.. seems there are problems writing files...
> setting properties... this kind of thing.
>
> Does anyone know what is going on? And what must I do to get App A to
> run corrrectly? (i.e. to run the same way it runs when the
> shareduserid is removed)

-- 
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: Implementing SharedUserId

2012-02-24 Thread Carter
You can't change the sharedUserId after the app is installed.  Once an
app is published on the Android Market, the sharedUserId also cannot
be changed.  It completely breaks.

If your apps are still under development, uninstall both apps.  Then
set the sharedUserId in the manifest and reinstall and you should be
set.

On Feb 24, 12:31 am, "Michael ."  wrote:
> I'm really not understanding how to implement shareduserid
>
> My understanding is that:
>
> *By default, Android assigns each application its own unique user ID.
> However, if this attribute is set to the same value for two or more
> applications, they will all share the same ID — provided that they are
> also signed by the same certificate.*
>
> ok, so I understand I think theoretically how it should work at
> runtime with release apps. Both apps set the same shareduserid in
> their manifest files and are signed with the same certificate... and
> then I should be able to read the same files and properties with both
> apps.
>
> But I have not gotten to that stage yet..
>
> I'm still testing in the IDE... so this is what I've done:
>
>  - set shareduserid to same value in both apps manifests
>  - set debuggable to true in both apps manifests
>
> But I have problems even making an app run correctly...
>
> if I remove shareduserid.. my App A will run correctly... read and set
> some preferences... on startup
>
> but if I set a shareduserid... App A will pop up a logcat window with
> a lot of read in it.. seems there are problems writing files...
> setting properties... this kind of thing.
>
> Does anyone know what is going on? And what must I do to get App A to
> run corrrectly? (i.e. to run the same way it runs when the
> shareduserid is removed)

-- 
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: In-App Billing Tracking By Android Market

2012-01-31 Thread Mark Carter
The preferred route would be to convert the paid app to use in-app billing 
and make it free. But this can only be done once the suggestion here has 
been implemented:

http://code.google.com/p/marketbilling/issues/detail?id=17#c7

Then you could ditch the free version altogether.

However, please note that non-paid app countries (e.g. China and Taiwan) 
cannot see free apps that use in-app billing.

-- 
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] Unpublish application

2012-01-31 Thread Mark Carter
It's worth mentioning that even after you unpublish an app, users can still 
leave comments and ratings.

-- 
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: Lots of "Cancelled by Google - Payment declined" from one person

2012-01-17 Thread Mark Carter
I've had one customer retry 45 times but that was because of a 
still-not-fixed problem with in-app billing: 
http://code.google.com/p/marketbilling/issues/detail?id=50

-- 
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: Any problems regarding LVL when moving apps from one Google account to another?

2012-01-16 Thread Mark Carter
Trevor Johns has answered this question here: 
http://stackoverflow.com/questions/7802062/any-problems-regarding-lvl-when-moving-apps-from-one-google-account-to-another

-- 
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: Logcat is broken every time phone is unplugged

2012-01-15 Thread Mark Carter
Eclipse Indigo SR1, Windows 7 Home Premium 64bit.

When I reconnect, I always have to reclick on the device in the Devices 
view (of the DDMS perspective).

However, in the latest version of ADT, I have a similar problem, where 
clearing the log output results in subsequent log messages not appearing at 
all. I need to click around a bit (on other filters) to get it to kick back 
in again.

-- 
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: download number 'adjustments', again

2011-12-13 Thread Mark Carter
Looks like it's fixed now.

-- 
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] Paid app availability on WiFi-only tablets?

2011-12-05 Thread Mark Carter
Please can someone with a WiFi-only tablet answer this question:

How does Android Market determine your "country" when deciding whether to 
make paid apps available to you or not?

As a side note (for those who don't already know), on GSM devices, this is 
done by your SIM card's country.

Is it according to your Wi-Fi network country (i.e. can be worked-around 
using a VPN)? Or is it based on the country through which your tablet was 
sold (workaround would require rooting)?

-- 
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: StackOverflowError when calling SQLiteDatabase.openDatabase()

2011-10-17 Thread Mark Carter
Absolutely agreed (already) - but the stacktrace does not show the root (at 
least not in the Android Developer Console Application Error Reports because 
it seems to only show the first 130 calls).

The interesting question is how/why is openDatabase() recursively calling 
itself?

-- 
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: StackOverflowError when calling SQLiteDatabase.openDatabase()

2011-10-17 Thread Mark Carter
I presume the reason you don't see my code is because it's fallen off the 
list due to the 100+ openDatabase() calls.

Good thinking about the UncaughtExceptionHandler (because I do use one) but 
I just checked and I don't call anything which might lead to an 
openDatabase() call. Even if I did, wouldn't there be something in between 
the openDatabase() calls in the stacktrace?

-- 
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: StackOverflowError when calling SQLiteDatabase.openDatabase()

2011-10-17 Thread Mark Carter
Can anyone explain the stacktrace to me?

It looks like openDatabase() is calling itself in a never-ending loop (line 
975) and then this throws a StackOverflowError which is caught in the 
openDatabase(line 916) method and then logged. Is that right? But then why 
does the stacktrace stop 
at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:132) ?

Another thing: I don't see in the source where openDatabase() is recursively 
calling itself.

-- 
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] StackOverflowError when calling SQLiteDatabase.openDatabase()

2011-10-17 Thread Mark Carter
I just received this crash report from a user running SGS2 
(10|GT-I9100|GINGERBREAD.ZNKG5.ownhereSGS2.v1.2.4):

java.lang.StackOverflowError
at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:132)
at java.lang.StringBuffer.append(StringBuffer.java:278)
at java.io.StringWriter.write(StringWriter.java:134)
at java.io.PrintWriter.doWrite(PrintWriter.java:690)
at java.io.PrintWriter.write(PrintWriter.java:665)
at java.io.PrintWriter.write(PrintWriter.java:640)
at java.io.PrintWriter.write(PrintWriter.java:708)
at java.io.PrintWriter.print(PrintWriter.java:468)
at java.io.PrintWriter.println(PrintWriter.java:602)
at java.lang.Throwable.printStackTrace(Throwable.java:299)
at android.util.Log.getStackTraceString(Log.java:307)
at android.util.Log.e(Log.java:241)
at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:916)
at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:975)
at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:975)
...113 more lines identical to the above line...
at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:975)
at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:...

He said it happened shortly after an automatic Flash Player 11 update.

All I can think of is some weird behaviour due to low memory.

Any other ideas?

-- 
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] Any problems regarding LVL when moving apps from one Google account to another?

2011-10-14 Thread Mark Carter
I tried asking this question over on Android Discuss but unfortunately 
didn't get any reply:

http://groups.google.com/group/android-discuss/browse_thread/thread/5598e3682828d3db

To summarize: LVL signs responses with your public key (as given in the Edit 
Profile of your Developer account). So what happens when you move an app 
from one account to another?

If LVL uses the new public key then the existing app installations will all 
fail their LVL checks!

Has anyone got experience of moving an LVL (or in-app billing) app to a 
different Google account? 

-- 
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: Freemium Model with In-App Purchases

2011-08-29 Thread Mark Carter
Does it only matter if you link to your app's details Market page or is it
also a problem linking to your "Other apps..."?

On 29 August 2011 17:50, Andy  wrote:

> If you have a App in the Market it's madatory to make a adress public for
> billing.
>
>
> And yes, this aplies to links also, because my Button is simply a Link to
> the Android Market. In Android you can choose what to do with certain links.
> Like youtube links open the Youtube Browser, so Market links are opening the
> Market App.
>
> It's shame how patent claim where send to tiny small developers who are
> only using mechnismas that already exists since the Web was born.
>
>  --
> 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: Freemium Model with In-App Purchases

2011-08-27 Thread Mark Carter
Out of interest, how do they get the dev's address?

-- 
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] Regular expressions and ICU4C

2011-08-25 Thread Mark Carter
I have read that Android uses ICU4C to support regular expressions.

Does this mean that the java.util.regex.Pattern class uses ICU4C under the 
hood? If so, why does \U0002A700-\U0002B73F (or similar \U expressions) not 
work?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to prematurely stop a long-running SQLite query?

2011-08-22 Thread Mark Carter
Has support for this been introduced recently? I have a feeling a while back 
I saw something in the change log (maybe 3.0?) but can't seem to find it 
again...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Help: BOOT_COMPLETED has started acting weird in 2.3+

2011-08-12 Thread Carter
I bet a number of instances are due to HTC devices with Fast Boot
enabled in the Settings.  BOOT_COMPLETED isn't broadcast when Fast
Boot is enabled.

HTC added Fast Boot to the Evo 4G with the Gingerbread update.  I
think the Thunderbolt also has this feature.

Try asking your users to turn Fast Boot off.

On Aug 12, 11:45 pm, keyeslabs  wrote:
> I'm looking for ideas on this one, as I've been unable to reproduce no
> matter how hard I try in any of my local evironements.  
>
> As users are getting upgraded to 2.3+, a small but significant number are
> reporting that my app (Screebl) is failing to start on phone reboot.  The
> app has had a receiver for BOOT_COMPLETED for a long time now, and it seems
> to be something new to 2.3 that is causing it to fail for some users.
>
> What I know:
> - The app does not allow users to move to SD, so that isn't the problem.
> - It works for the majority of users.
> - It happens on stock and custom roms.
>
> My best working theory is that the new "smart" battery saver and
> optimization features in 2.3 are deciding the receiver is taking too long to
> boot and throttling it somehow, but I haven't been able to validate this.
>  If this is indeed the problem, is there any way to deal with the startup of
> a service in a more friendly way?  The service is threaded properly, and
> notifications are registered to make the service less likely to be killed.
>  The onStart method is reading preferences, registering to receive about a
> half-dozen broadcast events (screen on/off, dock events, etc.), and then
> starting a thread.  That's about it.
>
> Any ideas on how I can nail this one down?

-- 
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: Failed to register input channel?

2011-08-12 Thread Mark Carter
I'm getting this too (also only on SDK level 10) - anyone find any 
workarounds?

-- 
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] How to detect which market the app was installed from

2011-08-08 Thread Mark Carter
That's the main reason why I put it in the manifest. Because when I make a
build, I am changing the version number, version name, whatsnew text and
other stuff anyway and so also having the Market type there means it's not
easily missed.

On 9 August 2011 12:00, Nikolay Elenkov  wrote:

> On Tue, Aug 9, 2011 at 11:32 AM, TreKing  wrote:
> > On Mon, Aug 8, 2011 at 9:13 PM, Nikolay Elenkov <
> nikolay.elen...@gmail.com>
> > wrote:
> >>
> >> You need to have two different builds: one for the Android
> Market, another
> >> for the Amazon App Store. Use a library projects for the core and two
> app
> >> projects with different string resources for the rating/app link URL's.
> >
> > You don't even have to go that far. One static flag is all you need.
>
> If the Market URL is the only difference between the two builds, a flag
> could be sufficient, yes. That leaves the possibility of human error
> though: you can forget to flip the flag, and upload the wrong binary.
> And with my latest update to the Amazon market being 'reviewed'
> for about a week now, despite being a minor update, I'd like to
> avoid that as much as possible.
>
> --
> 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] How to detect which market the app was installed from

2011-08-08 Thread Mark Carter
I make the specify things like this in the manifest and then read that from 
the code:



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How do we get Google's attention regarding the problems around randomly sorting comments in the Android Market?

2011-07-31 Thread Mark Carter
I would recommend this:

For the initially-shown 3 comments: use the 3 most "helpful" comments 
related to the most recent release. If there are less than 3 such comments, 
then regress into earlier releases.

For the "Read All Comments" show all the comments in reverse chronological 
order (as before).

-- 
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: Problems with Orders Inbox?

2011-07-26 Thread Mark Carter
They've just fixed this in the last hour or so:

http://www.google.com/support/androidmarket/developer/bin/static.py?page=known_issues.cs

-- 
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: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-07-22 Thread Mark Carter
One thing I don't understand...

In advanced mode, why is there a "reactivate" button next to old
versions that can never be "reactivated" (because they have a lower
version code than the "active" APK)?

On 22 July 2011 19:19, Marcin Orlowski  wrote:
> On 22 July 2011 10:11, gjs  wrote:
>
>> I was sort of hoping it might also be applicable to supporting
>> different apk's for different languages/internationalization/
>> localization but perhaps that is just too many permutations to split
>> the filtering.
>
> Assets usually takes much more space than your translation files, so IMHO
> users won't really benefit from such split based on languages.
>
> Wish ADT helps with split-build though.
>
> Regards,
> Marcin Orlowski
>
> Tray Agenda - keep you daily schedule handy...
> Date In Tray - current date at glance...
> WebnetMobile on Facebook and Twitter
>
> --
> 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: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-07-21 Thread Mark Carter
Awesome, thanks very much to the Android Market team:

http://android-developers.blogspot.com/2011/07/multiple-apk-support-in-android-market.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Merchant account -> payouts -> fees history -> third column?

2011-07-19 Thread Mark Carter
The values look very odd for the last 3 to 4 months. If anything, they now 
look like they represent the actual 30% that Google takes.

-- 
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: Problems with Orders Inbox?

2011-07-18 Thread Mark Carter
Yep, I've been getting that too. It happens for failed operator billings (as 
opposed to credit card billings).

I just archive it and so transfer the problem to my Archive folder!

I sent a message about this to the Google Checkout team a couple of days ago 
- no reply yet...

-- 
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: LVL behavior on client side license validity check for free apps

2011-07-18 Thread Mark Carter
What about if you submit an APK as a paid app and then later reduce the 
price to zero?

Admittedly, this would break down as soon as you want to update the APK, but 
I'd be interested to know nonetheless.

-- 
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] How long is a paid app considered refundable?

2011-07-17 Thread Mark Carter
On a related note, a paid app is dev-refundable forever which makes me a 
little nervous...  Suppose your Google Account was compromised. The hacker 
could then go through refunding all of your sales, if they were so inclined.

-- 
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  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

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  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"  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 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: Google removed 10 mallware apps - I'm affected. Please help

2011-06-14 Thread Mark Carter
Were the apps remotely removed from your users' devices? If not, then once
you have republished (as Zsolt suggested), you can use House Ads to drive
your pulled-app customers to your republished apps.

On 15 June 2011 13:40, Zsolt Vasvari  wrote:

> > What Google has to do is to create a separate Tags input field in the
> > market admin panel, give it some limit and then let the developers
> > compete. This is the fair way.
>
> In your case, 2/3 of your app description was keywords -- so you were
> by far one of the worst violators.  Perhaps one of your competitors
> reported you for stealing from them and Google acted on it.  I have no
> idea.
>
> Is there anything stopping you from creating a new account, paying the
> $25 again and republishing your app?  It's not ideal, but since you
> have a free app, it's not like you have to migrate the users.  If your
> app is good, and I believe it was, your rank would rise fairly quickly.
>
> --
> 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: Fonts on Android, how are they manage by the OS?

2011-06-09 Thread Mark Carter
Are we talking about two different things here? Font support and locale (?) 
support?

I can understand why a US-only device would not need to ship with support 
for locales like Japanese and Thai, but there is a stronger argument to 
include Japanese and Thai fonts (space permitting) because they are useful 
to translator apps and the browser etc.

Is there any way to programmatically check whether a unicode char is 
displayable? A negative check would allow us to then fall back on a ttf file 
in the assets (which I think is a better way than just forcing the assets 
file in the first place).

-- 
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] IncompatibleClassChangeError

2011-06-07 Thread Mark Carter
java.lang.IncompatibleClassChangeError: java.util.concurrent.TimeUnit$4
at java.util.regex.Matcher.ensureMatch(Matcher.java:637)
at java.util.regex.Matcher.start(Matcher.java:457)
at java.util.regex.Matcher.start(Matcher.java:543)
at java.util.regex.Matcher.appendReplacement(Matcher.java:145)
at java.util.regex.Matcher.replaceAll(Matcher.java:344)
at java.lang.String.replaceAll(String.java:2004)

Got this on a customer's ViewPad7 (SDK 8).

Any ideas?

-- 
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: How to add a Greek description of my App in android market

2011-06-06 Thread Mark Carter
The Android Market is fully (ish) functional in PRC, it's just that it
doesn't support paid apps. One year ago, Traditional Chinese app
descriptions were supported but no Traditional Chinese country (e.g. Taiwan,
Hong Kong) had paid-app support. So, it would not be unreasonable to include
Simplified Chinese support.

Most Android handsets I come across in China, do have Android Market pre
installed. So there's a license fee going on there (probably). I think it's
safe to say there are millions of Simplified Chinese Android Market users
out there who cannot read the app descriptions.

On 7 June 2011 09:37, Zsolt Vasvari  wrote:

> The Android Market doesn't support PRC, so the lack of simplified
> Chinese is somewhat acceptable.
>
> Of course, the PhD's on the Android Market team don't realize that a
> significant portion of Singapore's population speaks Mandarid written
> using simplified characters, so even if you don't support the People's
> Republic, a large percentage of one of the richest countries in the
> world is not catered for.
>
>
>
> On Jun 7, 9:17 am, Mark Carter  wrote:
> > Simplified Chinese is not even supported - that's 1.3 billion people
> unable
> > to read app descriptions.
> >
> > If you have a language that is not supported but most (or a large
> > percentage) of your users speak, then I would tag on the translation to
> the
> > end of (or instead of) the english app description (since that is
> probably
> > what those users will see).
> >
> > Ideal, I know :(
>
> --
> 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: How to add a Greek description of my App in android market

2011-06-06 Thread Mark Carter
Simplified Chinese is not even supported - that's 1.3 billion people unable 
to read app descriptions.

If you have a language that is not supported but most (or a large 
percentage) of your users speak, then I would tag on the translation to the 
end of (or instead of) the english app description (since that is probably 
what those users will see).

Ideal, I know :(

-- 
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  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_STORAGE>Get
> 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 for the feedback.

On 31 May 2011 16:58, String  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

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

2011-05-31 Thread Mark Carter
I have an app which includes a app widget but only as a relatively minor 
portion of the total functionality. A significant minority of my users use 
it.

I notice that when setting installLocation to "auto", the widgets will 
disappear as soon as the user moves the app to the SD card. When the app is 
in internal memory (whatever the value of installLocation set in the 
Manifest), the widgets function fine.

This is somewhat described in the docs: 
http://developer.android.com/guide/appendix/install-location.html

The question is, the docs explicitly say apps, such as mine (e.g. using 
widgets), SHOULD NOT set the installLocation in this way. Is that simply 
because of the above behaviour (in which case "SHOULD NOT" sounds too 
strong), or should I take it to imply that there may be changes made further 
down the line which cause greater problems?

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

-- 
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: Moving from free app to a paid model

2011-05-30 Thread Mark Carter
I'm not sure, but isn't it possible to directly access the shared prefs of 
one app from another (by the same developer/publisher)?

-- 
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: Purchases "stuck" again in Google Checkout

2011-05-24 Thread Mark Carter
I've only contacted them a few times but always got a worthwhile response.
Maybe I was lucky, or maybe you were unlucky, I don't know.

Completely opposite to my Android Market support experience, which I'm not
sure actually exists!

Here's the response I got to a related question I asked them a few months
ago:

===

Hello Mark,

Thank you for your email.

Android market orders which the users place a second time for the same app
are final. The 15min refund window on the Android market is only available
for the first time the user purchases an application. The only exception
for this would be a system issue due to which either the order does not
get passed on to the payment system successfully or if the users card gets
declined the second time the order is placed.

While the 15min window for refund remains for all purchases, the actual
countdown starts when the download manager of the Android device actually
starts the download process successfully. So if the application software
did not start downloading, the 15min refund window gets revoked and does
not take into account the amount of time taken for the download manager to
just acquire and download the software.

So it appears that the user was not able to initiate the download of the
app because of which the order did not get charged automatically after the
stipulated 15mins. If you wish to, you can go ahead and issue a refund for
this order or cancel it altogether and request the user to place a new
order. If not, you will need to wait till the user successfully downloads
your application for the order to get charged.

Please visit
https://checkout.google.com/support/sell/bin/answer.py?answer=134379 for
specific instructions on how to refund an order in the Google Checkout
Merchant Center. Remember, if you refund an order, Google will send a
refund notification email to the buyer.

While this is how the Google Checkout payment system works with the
Android marketplace orders, the developer account dashboard will add the
user request to the total number of downloads which are shown in your
developer account. They will be shown under long installs.

Sincerely,

===

On 25 May 2011 10:53, Zsolt Vasvari  wrote:

> > I'd recommend contacting Google Checkout support - which, in my
> experience,
> > is generally very good.
>
> Really?  Do you live in an alternate universe or something?  I've
> never had a single good expeirnce with them.  When I did hear back, it
> was a BS response.
>
> --
> 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: Purchases "stuck" again in Google Checkout

2011-05-24 Thread Mark Carter
Same here: about a quarter of my sales are in the limbo state after more 
than 24 hours. i.e. neither charged nor declined.

I'd recommend contacting Google Checkout support - which, in my experience, 
is generally very good.

-- 
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: How do you counter repeated bogus reviews from competitors?

2011-04-25 Thread Mark Carter
Idle thought:

Instead of comments simply being shown in reverse chronological order, I'd
like to see them ranked according to factors like:

* Which version commenter had installed when posting comment
* Spam/abuse rating for commenter (would like to see this have a big
influence!)
* How similar the commenter's device & firmware is to yours
* How similar the commenter's environment (e.g. locale, country) is to yours
* When comment was posted

-- 
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: "Live Wallpaper", "Menu button" etc in different languages

2011-04-24 Thread Mark Carter
I asked the same question here about 18 months ago:

https://groups.google.com/forum/#!topic/android-developers/siCqOHHlrac

but sadly got no answers :(

I had an idea of using a statistical approach by parsing through all strings 
xml files on all the apps on a device and listing the most common 
translations for each language. Don't think I'll have time to implement it 
though :(

-- 
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: Is there a min SDK level for "android.hardware.telephony" feature?

2011-04-23 Thread Mark Carter
I've experienced this with the following devices:

Motorola Milestone (7), Spice Mi-310 (8), HTC Desire (7), Samsung Galaxy
Apollo (7), T-Mobile myTouch 3G Slide (7), ZTE Racer (7), Nokia N90 (10),
Taiwan Mobile T2 (7), Samsung Galaxy 5 (7), HTC Legend (7)

I expect some more devices will pop up over the next few days.

Side note - Nokia N90!?

To summarise, I think there are too many devices to hardcode these special
cases. The sim card check may be enough though I'm still open to other
suggestions...

Actually, the main reason I'm checking for this is to know whether or not to
show a list of SMS messages. So maybe a better approach would be to do a
quick check for what the SMS content provider returns. Won't be good enough
to check for the presence of messages (i.e. no messages won't prove
anything) but maybe there is something else to check for in this regard to
discover whether SMS messages are applicable to the device?

2011/4/23 Mark Murphy 

> On Fri, Apr 22, 2011 at 11:46 PM, Zsolt Vasvari 
> wrote:
> >> However, I notice this does not work (returns false) for some devices
> that
> >> definitely do have telephony (e.g. HTC Legend and Motorola Milestone).
> In
> >> both cases, they are running SDK 7, so I wonder whether this particular
> >> feature is an SDK 8+ thing?
> >
> > I'd say these devices simply have a firmware bug or something
> > returning the wrong value.
>
> Agreed. I don't remember the Legend, but the Milestone would have
> shipped with an earlier version of Android than 2.1, then got OTA
> upgraded (or the equivalent). It may be that Motorola missed whatever
> corner of the firmware has the value that gets returned here. For the
> Milestone specifically, you might consider asking your question on the
> MOTODEV support boards.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android 3.0 Programming Books: http://commonsware.com/books
>
> --
> 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: Is there a min SDK level for "android.hardware.telephony" feature?

2011-04-22 Thread Mark Carter
>From what I have seen so far, TelephonyManager is never null (even for 
devices without telephony), so that check is no good.

Maybe (for SDK level 7 and where the telephony feature value is missing) 
check TelephonyManager.getSimState() for TelephonyManager.SIM_STATE_READY 
instead? This is not perfect because the user may simply be using their 
phone without a sim card (and so may still want to access old SMS messages) 
but I think it's a fairly unlikely scenario...

Any better ideas!?

-- 
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: Is there a min SDK level for "android.hardware.telephony" feature?

2011-04-21 Thread Mark Carter
Anyone know of a more brut-force check for the presence of telephony?

For example, maybe check Context.getSystemService(Context.TELEPHONY_SERVICE)
for null?

-- 
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: Is there a min SDK level for "android.hardware.telephony" feature?

2011-04-21 Thread Mark Carter
Interesting:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_TELEPHONY
suggests
that the telephony feature is since API level 7. Which makes it confusing
why the check is not working on API level 7.

I didn't see the (much more convenient) hasSystemFeature() method before,
but I doubt that is causing the problem...

On 21 April 2011 18:58:58 UTC+8, Mark Carter  wrote:

> That last link was broken:
> http://developer.android.com/search.html#q="android.hardware.telephony"&t=0<http://developer.android.com/search.html#q=>
>
> <http://developer.android.com/search.html#q=>This next link shows it's
> definitely the correct feature:
> http://developer.android.com/guide/practices/optimizing-for-3.0.html#Telephony
>
> On 21 April 2011 18:55, String  wrote:
>
>> Do you mean android.telephony (no "hardware.", as was pointed out)? The
>> docs say since API level 1, but having the feature string wrong could be
>> your problem.
>>
>> 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

Re: [android-developers] Re: Is there a min SDK level for "android.hardware.telephony" feature?

2011-04-21 Thread Mark Carter
That last link was broken:
http://developer.android.com/search.html#q="android.hardware.telephony"&t=0

This next link shows it's
definitely the correct feature:
http://developer.android.com/guide/practices/optimizing-for-3.0.html#Telephony

On 21 April 2011 18:55, String  wrote:

> Do you mean android.telephony (no "hardware.", as was pointed out)? The
> docs say since API level 1, but having the feature string wrong could be
> your problem.
>
> 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

Re: [android-developers] Re: Is there a min SDK level for "android.hardware.telephony" feature?

2011-04-21 Thread Mark Carter
http://developer.android.com/search.html#q="android.hardware.telephony";

On 21 April 2011 18:34, lbendlin  wrote:

> there is no such thing as telephony in the android.hardware section
>
>
> http://developer.android.com/reference/android/hardware/package-summary.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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] Is there a min SDK level for "android.hardware.telephony" feature?

2011-04-20 Thread Mark Carter
I have an app that uses (but does not require) telephony.

So (as described by Mark Murphy here: 
http://commonsware.com/blog/2011/02/25/xoom-permissions-android-market.html) 
I add the following line to the manifest:



and then check for the feature at runtime using:

private static boolean hasFeature(String feature, Context context) {
FeatureInfo[] featureInfos = 
context.getPackageManager().getSystemAvailableFeatures();
for (FeatureInfo fi : featureInfos) {
if (feature.equals(fi.name)) {
return true;
}
}
return false;
}

However, I notice this does not work (returns false) for some devices that 
definitely do have telephony (e.g. HTC Legend and Motorola Milestone). In 
both cases, they are running SDK 7, so I wonder whether this particular 
feature is an SDK 8+ thing?

-- 
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] Google Translate's new TTS feature

2011-04-18 Thread Mark Carter
Thanks very much Nikolay.

I found this response from a Googler which might be useful:

https://groups.google.com/d/msg/google-ajax-search-api/MDIY-N4cPmk/DOzSLcXfe2sJ

On 18 April 2011 12:38, Nikolay Elenkov  wrote:

> On Mon, Apr 18, 2011 at 1:29 PM, Mark Carter 
> wrote:
> > The latest version of the Google Translate app appears to use some online
> > TTS service (instead of Android's built-in system).
> > Does anyone know how it does this and whether the service is available to
> > 3rd party apps?
>
> It's been available unofficially for a while now. Try searching for
> 'unoffical google text to speech api'. I don't know if it's OK to use
> it though.
> I've been considering integrating it, if/when it is announced.
>
> --
> 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] Google Translate's new TTS feature

2011-04-17 Thread Mark Carter
The latest version of the Google Translate app appears to use some online 
TTS service (instead of Android's built-in system).

Does anyone know how it does this and whether the service is available to 
3rd party apps?

-- 
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: Prices on Market App vs. Market Website

2011-04-16 Thread Mark Carter
I'm not sure how it can possibly work. AFAICT, the currency is determined by 
the country of the sim card (for Android smartphones). But what happens if 
(like I do) you have two Android smartphones with different country sims? 
 What currency should the website show then?

-- 
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] WifiLock and WakeLock regarding large downloads

2011-03-28 Thread Mark Carter
>From what I gather, WifiLock and WakeLock work completely independently and 
if you are downloading a large file over Wifi then you will need to acquire 
both locks??

Ideally, you would want something like this:

1. Acquire partial WakeLock
2. Preparing to download large file, check whether on Wifi or not.
3. If on Wifi, then acquire WifiLock. If not, then prevent device switching 
to Wifi (is this possible?)
4. Start download
5. When download has finished, release all locks.

Is this correct?

-- 
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: Specifying textAppearance using a custom attribute

2011-03-27 Thread Mark Carter
I found out the problem: The LayoutInflater had been retrieved from the 
Application context and not an Activity context and so the theme had not 
been applied...

-- 
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] Specifying textAppearance using a custom attribute

2011-03-27 Thread Mark Carter
If I specify the style directly, everything works fine:



where styles.xml has:


...


However, I want to use a custom attribute so that the actual style used is 
specified by the theme. So in attrs.xml:



and in styles.xml:


@style/MyTextAppearance
...


and then use:



but this does not work (i.e. as if the textAppearance attribute is being 
ignored).

-- 
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] ListView sometimes not calling onScrollStateChanged() when stop scrolling

2011-03-25 Thread Mark Carter
Normally this works fine - when scrolling stops, onScrollStateChanged() is 
called with SCROLL_STATE_IDLE.

However, sometimes it just isn't called. This can be observed from one touch 
to the next (i.e. it's not an implementation detail).

This is a problem, because I use the scroll state to determine when to 
pause/resume intensive background thread work.

Anyone got a workaround?

-- 
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] Adding EditText custom context menu items *before* system defaults

2011-03-23 Thread Mark Carter
Yep, that's my current workaround - seems to work OK...

On 23 March 2011 23:57, TreKing  wrote:

> On Wed, Mar 23, 2011 at 2:37 AM, Mark Carter wrote:
>
>> Is there any way to override this?
>
>
> Could you remove them, add yours, then re-add the defaults?
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>
>  --
> 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] Adding EditText custom context menu items *before* system defaults

2011-03-23 Thread Mark Carter
I'm trying to added a context menu item *before* the standard Select all, 
Select text etc menu items.

>From what I can see, those standard items use CATEGORY_CONTAINER for 
ordering.

Whatever category I specify in the order field of the add() method, the 
custom menu items always appear *after *the standard ones.

Is there any way to override this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: SQLite "attach database" not working in Honeycomb

2011-03-14 Thread Mark Carter
A workaround has been posted on the Stackoverflow link.

I've filed a bug report here: 
http://code.google.com/p/android/issues/detail?id=15499

-- 
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] SQLite "attach database" not working in Honeycomb

2011-03-14 Thread Mark Carter
My app makes extensive use of this:

sqldb.execSQL("ATTACH DATABASE ? AS mydb", new String[] { dbFile.getPath() 
});

where the dbFile is stored on External Storage.

The Honeycomb emulator confirms the File.exists() but when I query the 
database, it's as if the database hasn't been attached at all.

Also SQLiteDatabase.getAttachedDbs() only returns <"main", ":memory:"> - 
i.e. a single-item list.

The code works fine in 1.5 through to 2.3.

And I'm not the only one experiencing this: 
http://stackoverflow.com/questions/5108964/attached-databases-in-honeycomb

-- 
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] Reasoning behind disabling certain ProGuard optimizations?

2011-03-13 Thread Mark Carter
When using Proguard I was getting a VerifyError on SDK 3 when trying to 
access the Version.SDK_INT field.

With proguard disabled, everything worked fine because I was using the 
standard approach of using a wrapper class to prevent VerifyErrors:

public static int getSdkInt() {
int sdkInt = getSdkIntSafely(); if (sdkInt < 4) { return sdkInt; } else { 
return VersionSdkIntWrapperForDonut.getValue(); } } private static int 
getSdkIntSafely() { try { return Integer.parseInt(VERSION.SDK); } catch 
(Throwable t) { return -1; } }  
private static class VersionSdkIntWrapperForDonut {
private static int getValue() {
return VERSION.SDK_INT;
}
}
However, it appears that (using the default Android Proguard config), the 
wrapper class was being "optimized" in such a way that this technique no 
longer worked.

My current workaround is to specify -dontoptimize which works fine.

Is there a more specific flag to use?

-- 
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: Difference between SQLite on HTC Hero (1.5) and Nexus One (FR72)?

2011-03-11 Thread Mark Carter
For those interested...

Using the emulators:

   - Android 1.5 (Cupcake): 3.5.9
   - Android 1.6 (Donut): 3.5.9
   - Android 2.1 (Eclair): 3.5.9
   - Android 2.2 (Froyo): 3.6.22
   - Android 2.3 (Gingerbread): 3.6.22
   - Android 3.0 (Honeycomb): 3.7.4

-- 
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] Binding to a service from within a ContentProvider - when to unbind?

2011-03-11 Thread Mark Carter
Thanks Dianne. I couldn't find any information on the lifecycle of a 
ContentProvider in the docs.

I've just ran a few tests and from what I can see, the ContentProvider is 
created when the process for the app is created (either because of some 
Activity being started or Service etc).

Now, if the ContentProvider is keeping the Service alive by not unbinding, 
then doesn't that mean the process is running at a higher ranking than it 
would otherwise?

How would you recommend to handle the bindings/unbindings:

1. onCreate()/shutdown()
2. lazily bind in first call to, say, query() and unbind in shutdown()
3. Use a CursorFactory to bind/unbind as necessary - i.e. bind when the 
first cursor is created, unbind when the last cursor is closed.
4. something else?

-- 
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] Binding to a service from within a ContentProvider - when to unbind?

2011-03-10 Thread Mark Carter
ContentProviders are instantiated at system startup and remain "alive" until 
the system shuts down.

I have a ContentProvider that binds to one of my (local) services (which is 
most likely not already running) and so would like to unbind at some 
appropriate time. If unbindService is not called then the Service will 
remain running until the system shuts down. I assume this is bad.

When the service stops, appropriate db connections are closed.

The question is, when to call unbindService()? 

My initial thoughts are to wrap any returned Cursors to monitor when all 
returned Cursors have been closed.

-- 
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] Dynamically including a custom view defined in another app

2011-03-10 Thread Mark Carter
How about TabActivity? Doesn't that do something similar to what I'm talking
about (i.e. using a portion of the screen to show something
created/controlled by (potentially) another app)?

On 11 March 2011 00:25, Mark Murphy  wrote:

> On Thu, Mar 10, 2011 at 11:44 AM, Mark Carter 
> wrote:
> > Suppose I have one app who's functionality can be accessed entirely
> through
> > a single custom view (which does not take up the whole screen, because it
> > needs to be displayed with something else).
> > Now suppose I have another app which wants to be able to show that custom
> > view within one of its own activities.  Both apps are mine.
> > What is the best way to do this?
>
> You can't. At best, you can load resources from the other app, but not
> Java code.
>
> > Would Fragments be a possibility for this?
>
> No, sorry.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Training Worldwide: http://commonsware.com/training
>
> --
> 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] Dynamically including a custom view defined in another app

2011-03-10 Thread Mark Carter
Suppose I have one app who's functionality can be accessed entirely through 
a single custom view (which does not take up the whole screen, because it 
needs to be displayed with something else).

Now suppose I have another app which wants to be able to show that custom 
view within one of its own activities.  Both apps are mine.

What is the best way to do this?

Would Fragments be a possibility for this?

Note - I don't want to statically include all the code/resources from the 
other app.

-- 
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] LVL RuntimeException: Unsupp.Type7

2011-03-06 Thread Mark Carter
Anyone seen this before?

FATAL EXCEPTION: Thread-32
java.lang.RuntimeException: Unsupp.Type7
at com.google.common.io.protocol.ProtoBuf.parse(ProtoBuf.java:448)
at com.google.common.io.protocol.ProtoBuf.parse(ProtoBuf.java:443)
at com.google.common.io.protocol.ProtoBuf.parse(ProtoBuf.java:349)
at 
com.android.vending.api.RequestDispatcher.performRequestsOverNetwork(RequestDispatcher.java:252)
at 
com.android.vending.api.RequestDispatcher.performRequests(RequestDispatcher.java:204)
at 
com.android.vending.api.RequestManager.doRequestsOverNetwork(RequestManager.java:236)
at 
com.android.vending.api.RequestManager.doRequests(RequestManager.java:222)
at 
com.android.vending.licensing.LicensingService$AsynchLicenseChecker.doRequest(LicensingService.java:74)
at 
com.android.vending.AsynchRequestRunner$RequestRunnable.run(AsynchRequestRunner.java:37)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
at java.lang.Thread.run(Thread.java:1096)
at 
com.android.vending.AsynchRequestRunner$VendingThreadFactory$VendingFactoryThread.run(AsynchRequestRunner.java:118)

-- 
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: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-03-03 Thread Mark Carter
I just cleared my Market data/cache again and that app is still not 
visible...

-- 
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: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-03-03 Thread Mark Carter
Well, I was pretty stunned just now when I read that post from Dianne.
Partly because I didn't know about it before. Partly because I didn't
believe it. But mostly because of a huge can of nasty worms it could open,
should it be true.

So, I just tried it with one of my not-so-important apps on the Market.

* Originally published at min-level 3 and checked I could see it on my Nexus
One running 2.2.2 (level 8) - which I could.
* Next, I rebuilt the APK using min level 9, (and building using SDK 9)
* Then I published the new APK over the old one
* Finally, I cleared the data for the Market app and checked whether the app
was there (by querying my publisher name) and it wasn't. My other apps were.

So, I guess that indicates, that it's not true...

On 3 March 2011 22:55, Kostya Vasilyev  wrote:

>  03.03.2011 18:12, TreKing пишет:
>
> On Thu, Mar 3, 2011 at 6:33 AM, Mark Carter wrote:
>
>> Therefore, in an ideal world (!), I would like the 1.5/1.6 users to use
>> the existing, well-tested version and the other users will get the newer
>> stuff.
>
>
>  This is particularly problematic for paid apps. If you increase the min
>> SDK level and then a lower SDK user reflashes his device, he will no longer
>> be able to install your app.  He won't even see it on the Market. That will
>> then lead to support emails along with the cumbersome directions on how to
>> install a legacy APK manually.
>
>
> http://groups.google.com/group/android-developers/msg/b6b513af1a351c95
>
>
> Yes, this is at least something. Two problems though:
>
> - It's not quite clear if that can be relied on (the Market team is
> separate from Dianne's frameworks team, and they can change this
> undocumented behavior at any time and without notice).
>
> - It's difficult to update the .apk built for an older Android version.
>
> I think it would be great if it was possible to upload and manage multiple
> APKs for the same package / signature.
>
> Then the developer could easily update the version targeting 1.5 / 1.6
> should the need arise. Or have a separate version for 3.0 and up (using the
> native fragment implementation) and a version for 1.6+ (using the upoming
> fragment compatibility library, or no fragments at all).
>
> -- Kostya
>
>
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
> --
> 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
>
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-03-03 Thread Mark Carter
That's an interesting idea: at each entry point, have a layer that delegates
according to the SDK level.

My app has a reasonably complex architecture involving multiple entry-point
activities (although only one launcher icon), a few services, a content
provider and some widgets. Inter-app communication is also supported.

There are indeed many ways around all this - and I think I like yours the
most - but there are limitations to this:

1. Legacy users will keep on getting the updates even though those updates
are only designed to affect later codebases. At best, it will be a pointless
download for them. At worst, it will introduce a bug rendering the app
useless.

2. You would still have to test the app on older SDK levels (because of
point 1)

3. What about resources? I guess the res folder would have to have distinct
copies for each SDK range

4. Permissions? A later version may require an additional permission which
is not needed at all by the legacy code (and vice-versa).

5. IntentFilter & ContentProvider entries in the manifest. Those would have
to expose entries for all sdk-ranges which could get messy.

I like the thought of having an APK which I know works on SDK level 3&4 etc.
I know that it will work for years to come because it hasn't been changed.
There is a lot of reassurance in that.

As an app becomes more and more complex, the potential for introducing a bug
increases and so it makes sense to keep the APK a simple as possible.

On 3 March 2011 19:55, Streets Of Boston  wrote:

> I don't know how your app declares your activities, if they are public to
> be used by any other component/app installed on the phone.
> Let's assume your activities are all private, then there is a way to
> deliver 2 apps in one APK. You could do this by creating two separate
> code-paths for the 2 types of apps.
>
>
> Set you min-sdk-version to the minimum (e,g 4 for 1.6) and
> target-sdk-version for 11 (Honeycomb).
>
> Create a brand new 'Launcher' activity (you can make this one invisible).
> This activity will examine what the OS version is and it will start up the
> old root-activity of your app for 1.6 phones or start up a new activity
> tailored to Honeycomb for 3.0 devives.
>
> You can either write brand-new code for every new activity for 3.0 devices,
> keeping it entirely separate (e.g. a sub-package) from your original 1.6
> code.
> If you decide to re-use code (utilities, data-object, even fragments (see
> posts by Dianna that talks about providing a Fragment library for pre 3.0
> devices)), make absolutely sure that this code won't blow up on 1.6 devices.
>
>
>
>  --
> 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: One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-03-03 Thread Mark Carter
Thanks Rob but what I'm thinking about goes beyond an alternative UI.

At the moment my app supports 1.5+ and has reached a very good level of
stability. The sort of changes I have in mind for a Honeycomb version would
probably be combined with a complete rewrite.

If I do a complete rewrite then it really doesn't make sense to support
anything below 2.1 (since the current percentage of devices in that bracket
is very small, and will only get smaller).

Therefore, in an ideal world (!), I would like the 1.5/1.6 users to use the
existing, well-tested version and the other users will get the newer stuff.

I think we're going to see a need for this more and more as we progress
through SDK levels. For a given app, the dev will gradually increase the min
SDK level because it's just not worth all the extra testing involved.

>From the 1.5/1.6 user perspective, he will see less and less apps in the
Android Market. In fact, the only apps he will see are ones that were
abandoned completely by the dev. The good apps (still being maintained) will
not be available at all because of this inability to specify multiple APKs.

This is particularly problematic for paid apps. If you increase the min SDK
level and then a lower SDK user reflashes his device, he will no longer be
able to install your app.  He won't even see it on the Market. That will
then lead to support emails along with the cumbersome directions on how to
install a legacy APK manually.

The biggest problem however, is that the current single-APK approach is
significantly affecting dev up-take of Honeycomb features.  Certainly in my
case, and probably many others.

On 3 March 2011 14:39, Rob  wrote:

> having one apk to rule them all is a tricky thing to manage. i just
> recently launched with normal, large, and xlarge layouts along with
> landscape for large and xlarge. it is not easy, it takes a ton of
> regression testing, but is totally worth it.
>
> there are some people that are developing seperate apps for tablet. i
> wouldn't recommend it, personally. maybe if you pull out all business
> logic and throw it in a library it may be easier but there would be a
> ton of redundant work. abstract out the work of building out the
> views, and that will allow you to manage each resolution re-using the
> same techniques.
>
>
> one tip is to have a very easily accessible flag that allows you to
> differentiate which device you're running on.
>
> //check to see if we have a tablet, large or phone, and then set the
> global flag
>int screenLayout =
> getResources().getConfiguration().screenLayout;
>model.isTablet = ((screenLayout &
> Configuration.SCREENLAYOUT_SIZE_MASK) ==
> Configuration.SCREENLAYOUT_SIZE_XLARGE);
>
>//if isTablet is false, check to see if we have a Large
> device, else
> we have a phone
>if(model.isTablet == false){
>model.isLarge = ((screenLayout &
> Configuration.SCREENLAYOUT_SIZE_MASK) ==
> Configuration.SCREENLAYOUT_SIZE_LARGE);
>if(model.isLarge){
>model.deviceSize = "Large";
>}else{
>model.deviceSize = "Phone";
>}
>}else{
>model.deviceSize = "Tablet";
>model.isLarge = false;
>}
>
> throw in a isLandscape if that matters as well.
>
> public boolean isLandscape(Context context) {
>int orientation =
> context.getResources().getConfiguration().orientation;
>return (orientation == Configuration.ORIENTATION_LANDSCAPE);
>    }
>
> by using these flags on simple singleton model, you can easily build
> out the appropriate view for any scenarioexcept for small. just
> add a new flag for that ;)
>
> -rob
>
> On Mar 2, 11:51 pm, Mark Carter  wrote:
> > One of the main reasons I have not started any Honeycomb-specific
> > development is because of the extra complexity it would bring to my
> existing
> > codebase.
> >
> > If it were possible to upload multiple APKs (targeting different SDK
> level
> > ranges) for the same app, I would be much more likely to take advantage
> of
> > features of the latest SDK releases.
> >
> > I know it's possible to do all this using various approaches like
> reflection
> > but I don't want to risk introducing bugs to those running on older
> levels.
> > Also why should "old" users receive all the updates that are just fixing
> > Honeycomb-issues?
> >
> > If I could develop a Honeycomb (and later) APK (and upload that 

[android-developers] One app, multiple APKs targeting different SDK levels would be good for adding Honeycomb functionality

2011-03-02 Thread Mark Carter
One of the main reasons I have not started any Honeycomb-specific 
development is because of the extra complexity it would bring to my existing 
codebase.

If it were possible to upload multiple APKs (targeting different SDK level 
ranges) for the same app, I would be much more likely to take advantage of 
features of the latest SDK releases.

I know it's possible to do all this using various approaches like reflection 
but I don't want to risk introducing bugs to those running on older levels. 
Also why should "old" users receive all the updates that are just fixing 
Honeycomb-issues?

If I could develop a Honeycomb (and later) APK (and upload that alongside 
the existing APK) then that would solve these problems.

BTW, for me, having a completely separate app for Honeycomb, is not an 
option.

Is this something that has been discussed much before? Is it ever likely to 
happen? 

-- 
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] Handling list item click events within the ListAdapter - good or bad practice?

2011-02-22 Thread Mark Carter
Yes, entirely different types of data.

But really, the key question is more about varying types within an adapter, 
rather than the switching in/out of adapters. Sorry for the confusion.

-- 
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] Handling list item click events within the ListAdapter - good or bad practice?

2011-02-22 Thread Mark Carter
As a specific example, I have an adapter where the final item is "More 
results...". Clicking on that will fetch more results...

The underlying data knows whether there are more results and specifies the 
queries to get those results. It is also capable of running those queries 
(although maybe it shouldn't be?). Also, it knows how to adapt itself to 
include any new results.

-- 
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

  1   2   3   4   >