3

I have published app which main task is forwarding intents to other apps. Some users started getting strange error when sending anything to google+ app:

 java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SEND typ=image/jpeg flg=0x3000000 cmp=com.google.android.apps.plus/.phone.PostActivity (has extras) } from ProcessRecord{409b7828 14815:com.andmadesoft.share/10128} (pid=14815, uid=10128) requires null
at android.os.Parcel.readException(Parcel.java:1322)
at android.os.Parcel.readException(Parcel.java:1276)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1351)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1374)
at android.app.Activity.startActivityForResult(Activity.java:2833)
at android.app.Activity.startActivity(Activity.java:2959)
at com.andmadesoft.share.intents.iri.OrdinaryIntentInfo.sendIntent(OrdinaryIntentInfo.java:42)
at com.andmadesoft.share.ShareIntentResolver.resolveIntent(ShareIntentResolver.java:132)
at com.andmadesoft.share.ShareIntentResolver.sendchecked(ShareIntentResolver.java:105)
at com.andmadesoft.share.ShareIntentResolver.access$3(ShareIntentResolver.java:99)
at com.andmadesoft.share.ShareIntentResolver$4.onClick(ShareIntentResolver.java:86)
at android.view.View.performClick(View.java:2538)
at android.view.View$PerformClick.run(View.java:9152)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)

I can not reproduce the error on any of my test phones. Hope anyone can help me with this error.

Sending code part at ShareIntentResolver activity:

...
Context cont;

protected void onCreate(Bundle savedInstanceState, CharSequence title, Intent target, ArrayList<Intent> extraIntents) {
        super.onCreate(savedInstanceState);
        cont = this;
...

private void resolveIntent(IntentInfo ii){
        ii.sendIntent(cont);  // error is got here
}

IntentInfo class:

public void sendIntent(Context context) {
        context.startActivity(intent); //intent is just any intent that I am forwarding
}
user1218971
  • 46
  • 1
  • 4
  • I think you are not declaring some permission in AndroidManifest.xml file. Check it first... – Krishna Suthar Apr 19 '12 at 07:05
  • Seems that no permissions are needed to send Intent with Action SEND. In addition this code actually works on all of my friends phones, so AndroidManifest.xml file is correct I suppose. – user1218971 Apr 19 '12 at 07:12
  • In the market-publisher (where you got this stacktrace) you can see what phones/android version they got. Maybe some security thing has changed. If you post those phones/version, we might know more. – Ion Aalbers Apr 19 '12 at 07:22
  • Just try these two permissions - `` `` `` I'm not sure with this. But, i've used this one. I've already answered [here](http://stackoverflow.com/a/9273051/940096) Refer that also. – Praveenkumar Apr 19 '12 at 07:23
  • Can you share the code by which you are sharing ? – Dharmendra Apr 19 '12 at 07:24
  • SpK, think those permissions is concerned about email sending but my problem is a bit different - app fails when shareing to google+ not to gmail – user1218971 Apr 19 '12 at 07:42

0 Answers0