Sunday, September 5, 2010

[android-developers] Re: Bug in minSdkVersion or what?

Hi, it's me again.

So I think I've found a very serious problem here... This has nothing
to do with supports screens or sdk versions. I have built an app just
for testing this kind of behaviour and I realized that the problem is
on uses permission (weird!).

My tests:

I published a very simple hello world app and decided just to change
the manifest file.

This was tested not just 4 times but I would say like up to 30 times
to make sure, in every way possible... spent the whole day testing
this since the CALL_PHONE permission is the most important feature in
my app. I even tried with a different developer account, different
projects, package name and most of the times had to wait for like 15 -
20 minutes after publishing the app to make sure it's really not
showing on the other devices.

Devices I've tested:

HTC Tattoo - Firmware version: 1.6 - Model HTC Tattoo A3232
Motorola Milestone (AKA Droid) - Firmware version: 2.0.1 - Model A853
HTC G1 - Firmware version: 2.01 - Model T-Mobile G1

1st attempt (VISIBLE ON ANDROID MARKET FOR ALL OF MY 3 ANDROID
DEVICES):

<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" /
>

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8" />

2nd attempt (VISIBLE ON ANDROID MARKET ONLY FOR HTC TATTOO):

<uses-permission android:name="android.permission.CALL_PHONE"/>

<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_UPDATES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" /
>

3rd attempt (VISIBLE ON ANDROID MARKET ONLY FOR HTC TATTOO):

<uses-permission android:name="android.permission.CALL_PHONE"/>

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8" />


4th attempt with a new project (VISIBLE ON ANDROID MARKET ONLY FOR HTC
TATTOO):

<uses-permission android:name="android.permission.CALL_PHONE" />

<uses-sdk android:minSdkVersion="4" />


In conclusion, I realized that there's got to be something wrong with
the CALL_PHONE permission. does anyone have an idea why is this
happening? is that only with me? how to deal with it? any workaround?

Many thanks,

- Gus

On Sep 4, 10:43 pm, Gustavo <gumat...@gmail.com> wrote:
> Thank you very much for all your help guys.
>
> I'm not at work today so tomorrow I'll try taking those redundant
> lines off my manifest file and upload the app to see if I'm finally
> able to get my app visible for all android versions (1.6 and later,
> because now it's only being shown to 1.6 androids).
>
> Thanks again for the great support!
>
> - Gus
>
> On Sep 4, 9:56 pm, Dianne Hackborn <hack...@android.com> wrote:
>
> > Okay, look at it another way: the documentation you are quoting says that
> > those control the different screen sizes you support.  And let's say it
> > states: "these attributes, and nothing else, determine the screen sizes you
> > support."  It doesn't say anything about what the values are if you don't
> > specify them.  That is covered *in the same document* only a couple
> > paragraphs down (in the sections that are clearly there to expand upon that
> > material) in the text I pointed to.
>
> > I mean...  there are a lot of places I could point to in the documentation
> > that are not so good or outright bad.  To have a problem with this
> > particular part...  I don't understand.
>
> > On Sat, Sep 4, 2010 at 4:11 PM, Indicator Veritatis <mej1...@yahoo.com>wrote:
>
> > > It is not "being uber-pedantic". And your example of guns killing
> > > bunnies is irrelevant. It would have been relevant if you had followed
> > > the wording of the citation a little more closely, and said,
> > > "this gun lets me specify whether the bunny will live or die". But of
> > > course, you did not say that, since that does not support your
> > > position.
>
> > > The truth is that as happens all too often, the online documentation
> > > says one thing in one place, and contradicts that one thing in another
> > > place.
>
> > > On Sep 4, 12:36 am, Dianne Hackborn <hack...@android.com> wrote:
> > > > Also on that page:
>
> > > > Default values for attributes
>
> > > > The default values for the <supports-screens> attributes differs,
> > > depending
> > > > on the value of
> > > > theandroid:minSdkVersion<
> > >http://developer.android.com/guide/topics/manifest/uses-sdk-element.html>
> > > > attribute
> > > > in the application's manifest, as well as on the value of
> > > > android:targetSdkVersion, if declared:
>
> > > >    - If android:minSdkVersion or android:targetSdkVersion is "3" (Android
> > > >    1.5) or lower, the default value for everything except
> > > android:normalScreens
> > > >    is false. If you are primarily targeting pre-Android 1.6 platforms but
> > > >    also want to support other densities/screen sizes, you need to set the
> > > >    appropriate attributes to true.
> > > >    - If android:minSdkVersion or android:targetSdkVersion is "4" (Android
> > > >    1.6) or higher, the default value for everything is true. If your
> > > >    application requires Android 1.6 features, but does not support these
> > > >    densities and/or screen sizes, you need to set the appropriate
> > > attributes
> > > >    to false.
> > > >    - Note that android:normalScreens always defaults to true.
>
> > > > But um yeah if you want to be uber-pedantic...  wait, no, not even in
> > > that
> > > > case.  "This gun lets me kill the bunny."  That doesn't imply to me that
> > > the
> > > > gun is the only way I have to kill the bunny. :)
>
> > > > On Fri, Sep 3, 2010 at 11:57 PM, Indicator Veritatis <mej1...@yahoo.com
> > > >wrote:
>
> > > > > I take your word for this, that it really is true. But I must point
> > > > > out: strictly speaking that contradicts
> > > > >http://developer.android.com/guide/practices/screens_support.html
> > > > > which reads in part:
>
> > > > > "The platform also provides a <supports-screens> manifest element,
> > > > > whose attributes android:largeScreens, android:normalScreens, and
> > > > > android:smallScreens let you specify what generalized screen sizes
> > > > > your application supports. "
>
> > > > > By the rules of English grammar, this means that this manifest element
> > > > > ALONE lets you specify it, minSdkVersion has NO part in it.
>
> > > > > On Sep 3, 5:14 pm, Dianne Hackborn <hack...@android.com> wrote:
> > > > > > On Fri, Sep 3, 2010 at 1:31 PM, Gustavo <gumat...@gmail.com> wrote:
> > > > > > > <supports-screens android:largeScreens="true"
> > > > > > > android:normalScreens="true" android:smallScreens="true"
> > > > > > > android:anyDensity="true" />
>
> > > > > > > <uses-sdk android:minSdkVersion="4" />
>
> > > > > > Note that these two lines are redundant.  Making the minSdkVersion 4
> > > > > implies
> > > > > > you support different screens.
>
> > > > > > --
> > > > > > 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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@googlegroups.com>
> > > <android-developers%2Bunsubscribe@googlegroups.com<android-developers%252Bunsubscribe@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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment