Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3422] Android module in application's main thread?

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2016-04-06T14:35:11.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterRainer Schleevoigt
AssigneeShak Hossain
Created2016-03-29T11:55:59.000+0000
Updated2016-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?

Comments

  1. Sharif AbuDarda 2016-03-30

    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

JSON Source