eclipse - Sending integer output to another activity -
suppose, have added 2 integers in activity. want arithmetical operations , want show output in activity clicking button. should do?
n.b. : want take values in numbers(decimal) can take values dynamically , added button also.
you can add key bundle object , send bundle intent.
code while sending intent.
intent intent = new intent(context, sendmessage.class); intent.putextra("result", 10); intent.startactivity();
code while receiving intent
bundle extras = getintent().getextras(); string receivedvalue; if (extras != null) { receivedvalue= extras.getstring("result"); }
Comments
Post a Comment