android - Getting result of an Activity synchronously -
i'd start activity , result synchronously (i own both activities). context.startactivityforresult asynchronous. and, instrumentation.startactivitysync works intra-process. need work startactivitysync, across processes.
is there api ? if not, of android's ipc mechanism work in synchronous fashion...or @ least can mimic work synchronously ?
no there isn't. nor instrumentation idea. either put code in onactivityresult, or (if on non-main thread) wait on semaphore after calling startactivity , release semaphore in onactivityresult. process result after semaphore released.
Comments
Post a Comment