Ask Your Question

Revision history [back]

You can declare the Mat static and access it directly from the other activity or you can send the Mat using intents and serializable/parcelable. Parcelable is much faster: here's an example: http://stackoverflow.com/questions/2906925/android-how-do-i-pass-an-object-from-one-activity-to-another

If you want, you can even use an external library like Greenrobot's Eventbus that can you can use to post the Mat on the event bus and access that object from the event bus from ANY activity, service, fragment, etc. Here's more info about EventBus: https://github.com/greenrobot/EventBus

You can declare the Mat static and access it directly from the other activity or you can send the Mat using intents and serializable/parcelable. Parcelable is much faster: faster; here's an example: http://stackoverflow.com/questions/2906925/android-how-do-i-pass-an-object-from-one-activity-to-another

If you want, you can even use an external library like Greenrobot's Eventbus that can you can use to post the Mat on the event bus and access that object from the event bus from ANY activity, service, fragment, etc. Here's more info about EventBus: https://github.com/greenrobot/EventBus