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

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -