android - Implement a share Intent -
android - Implement a share Intent -
i have created share intent implementation,this works fine normal, when click button of sharing nil happen...any ideas
public class radyo extends activity{ public void oncreate(bundle savedinstancestate){ super.oncreate(savedinstancestate); setcontentview(r.layout.radyo); sharingbutton.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { shareit(); } private void shareit() intent sharingintent = new intent(android.content.intent.action_send); sharingintent.settype("text/plain"); } }); } @override protected void ondestroy() { // todo auto-generated method stub super.ondestroy(); } }
you still need phone call startactivity()
private void shareit() { intent sharingintent = new intent(android.content.intent.action_send); sharingintent.putextra(intent.extra_text, "text share"); sharingintent.settype("text/plain"); startactivity(sharingintent); }
and maintain in mind if want send something, need pass off extras intent.
android image share
Comments
Post a Comment