Julian Julian - 1 year ago 103
Android Question

Android Custom Listener

Today I meet with a question about custom listener. I have try to search and think for a long time, but I have not find answer. I'm come here for help. The question is that How to transfer data between Activities by Android Custom Listener?

Answer Source

Do not transfer data between activities through custom listener because only one activity is active. Android application shouldn't work like that.

Use Bundle to send data between activities instead.

Intent intent = new Intent(this, YourActivity.class);
intent.putExtra("key", yourValue);

Inside YourActivity:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download