Anybody knows how to open and send a data to another application?
I have a String that I want to send it and I used an ACTION.MAIN and putExtra for send the string:
String smth = "Test";
Intent intents = new Intent(Intent.ACTION_MAIN);
intents.setComponent(new ComponentName("com.package.address","com.package.address.HelloGlassActivity"));
intents.putExtra("STRING", smth);
mContext.startActivity(intents);
I declared the intent in Android manifest another project (Application):
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
After I declare the intent in Android Manifest, I call the intent in one of my activity:
Intent intent = getIntent();
String tester = intent.getStringExtra("STRING");
Unfortunately when I run the first app, I couldn't open the second application. Anybody knows what I have missed?