I saw on http://developer.android.com/guide/topics/security/security.html
that my app can declare a permission:

<manifest xmlns:android="http://schemas.android.com/apk/res/android";
    package="com.me.app.myapp" >

    <permission
android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY"
        android:label="@string/permlab_deadlyActivity"
        android:description="@string/permdesc_deadlyActivity"
        android:permissionGroup="android.permission-group.COST_MONEY"
        android:protectionLevel="dangerous" />
</manifest>

So if another app "Foo" need to invoke the deadly activity, it would
declare the following in its Manifest:

<uses-permission
android:name="com.me.app.myapp.permission.DEADLY_ACTIVITY" />

However, what if com.me.app.myapp is not yet installed on the device?

[a] I tested with "adb install", and Foo was installed on the device
without incident. The only thing I see is "W/PackageManager(   62):
Unknown permission com.me.app.myapp.permission.DEADLY_ACTIVITY in
package com.foo.Foo"

[b] if I upload Foo into Android Market, but the user has not yet
installed "myapp", will he be able to see Foo in market?

[c] if the answer to [b] is yes (I really hope so, or else it will be
a major bummer ...) what message will the user see regarding
com.me.app.myapp.permission.DEADLY_ACTIVITY? Since the description of
this permission is declared only in "myapp", without "myapp"
installed, will the user just see the name of the permission, which
probably doesn't mean much?

If [c] is true, would this be a weakness to the Android permission
system/Android Market? As long as I can fool the user to install my
app first, I would be able to gain permissions that the user would not
have otherwise granted me (had he known the true nature of such
permissions).

Thanks!

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

Reply via email to