Quantcast
Channel: Questions in topic: "manifest"
Viewing all articles
Browse latest Browse all 330

How to handle an intent from another Android App in Unity?

$
0
0
I have an Android app, in which I send a message via a `Intent.Action_SEND` filter. I've tried many things but I always get the error: `No Activity found to handle Intent`. What am I doing wrong?

Android app code, proven to work on another Android app: Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.setPackage(appName); sendIntent.putExtra("TABSINT_DATA_JSON_STRING", data); sendIntent.setType("text/plain"); sendIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); activityContext.startActivity(sendIntent);

I created a Receiver.java script in Unity to handle the intent: package com.company.pkg; import ...; public class Receiver extends Activity { @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); String action = intent.getAction(); Log.d(TAG,"Java Receiver intent action: "+action); } }

I added the .Receiver activity in my AndroidManifest.xml
` ... ... `

@Antique @Zyosoft @Onizuka101 @angusmf

Viewing all articles
Browse latest Browse all 330

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>