I am trying to share data from my app to other app like sms or any other app. I have a app where I need to send or share some data to apps like sms or fb messenger. Using this link through I can open up the app and add data into text box using this code:
Intent sendIntent = new Intent();
sendIntent.setPackage("com.sms or fb");
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(sendIntent);
Using this app I can open up the other app and add value in text area my question is is there any way by which I can trigger click or send event to send automatic message to other app like sms facebook. If so how I have seen google app where I used my voice to send hi to my whatsapp contact so this method is there google app can send message and trigger event using my voice. My question is how can I trigger the event send using my android code. If rooted system is out there I can also use that.
None of the answer is even close to what I want to solve no answer deserves bounty.