Having trouble with permissions. The error I get is this:
Not allowed to start service Intent { comp=
{com.commonsware.android.service/
com.commonsware.android.service.WeatherPlusService} } without
permission private to package
I installed the WeatherPlus app from Mark Murphy's dev book. I'm
trying to call his weather service from a different app. I think I
have an issue with permissions, not really sure how they work. I
thought that you could just make your own, and then check against it.
With that in mind, listed below is the client manifest, followed by
the service manifest. I called my permission "mypermission". thanks
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.punchcut.isender1"
android:versionCode="1"
android:versionName="1.0">
<permission
android:name = "com.commonsware.android.service.mypermission"
android:label = "" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/icon" android:label="@string/
app_name">
<uses-permission
android:name="com.commonsware.android.service.mypermission" />
<activity android:name=".ISender1"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-permission
android:name="android.permission.ACCESS_BACKGROUND_SERVICE" />
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.commonsware.android.service">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:label="@string/app_name">
<activity android:name=".WeatherPlus" android:label="@string/
app_name">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".WeatherPlusService">
<uses-permission
android:name="com.commonsware.android.service.mypermission"/>
</service>
</application>
</manifest>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---