android - How to define Intent for call other applications? -


i got simple widget that's show label text. i'm trying give chance send text via sms, mail, tweet or set state message in gtalk.

how should build intents objects?

to give user choice of apps 'share' twitter, email, etc use this

    public static void launchnewshareintent(context c, string subject, string text, string dialogtitle){        intent shareintent = new intent(intent.action_send);        shareintent.putextra(intent.extra_subject, subject);        shareintent.putextra(intent.extra_text, text);        shareintent.settype("text/plain");        shareintent.setflags(intent.flag_activity_new_task);        c.startactivity(intent.createchooser(shareintent, dialogtitle)); } 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -