Data sharing between android applications

3

I created an application that works as a calendar, where you can register contacts with a few more fields in relation to the calendars that are pre-installed on the device.

My question is, if it is possible to share the data registered with other applications, for example whatsapp use the name of the registered contact (the register of these contacts has a telephone field)? If so, how?

    
asked by anonymous 28.10.2017 / 17:37

1 answer

4

You can share your data with other installed apps by using ACTION_SEND when you creates Intent .

You can do it this way:

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, getResources().getText(R.string.send_to)));

You can read more at Simple Sending Data to Other Apps and < a href="https://faq.whatsapp.com/en/android/28000012"> WhatsApp FAQ

You can also add a menu item to the share using Adding an Easy Share Action

    
31.10.2017 / 05:38