[AC-3422] Android module in application's main thread?
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2016-04-06T14:35:11.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Rainer Schleevoigt |
Assignee | Shak Hossain |
Created | 2016-03-29T11:55:59.000+0000 |
Updated | 2016-04-06T14:35:11.000+0000 |
Description
The chromecast adapter must run in main thread. If I code:
~~~
@Kroll.method
public boolean startMediaRouter() {
Context context = TiApplication.getInstance().getApplicationContext();
mMediaRouter = createMediaRouter(context);
return true;
}
~~~
Then the system answered:
_Message: Uncaught Error: The media router service must only be accessed on the application's main thread._
How can I run a module in main thread?
Hello, I am not completely understanding your issue. You are using chromecast module. Could you explain a little more what you are trying to do. Please share full reproducible code about the issue that you are having. Also, Please provide a complete list of steps to follow for me to reproduce the issue in my environment. Also, Please attach the module itself in this ticket. Regards, Sharif