Skip to content

addObserver issue fix: using context rather than activity in LocationServices#71

Open
vivekvardhanadepu wants to merge 1 commit into
Richou:masterfrom
vivekvardhanadepu:addObserver
Open

addObserver issue fix: using context rather than activity in LocationServices#71
vivekvardhanadepu wants to merge 1 commit into
Richou:masterfrom
vivekvardhanadepu:addObserver

Conversation

@vivekvardhanadepu

Copy link
Copy Markdown

fixes #67

@vatsal-gadhiya-searce

Copy link
Copy Markdown

@Richou Can we merge this please?

@anees17861

Copy link
Copy Markdown

@vivekvardhanadepu This doesn't address the actual issue properly. As suggested in the error, it needs to be called in main thread.
Instead of using reactContext try surrounding the location api with

new Handler(Looper.getMainLooper()).post(() -> {

})

This should make the call on main thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Method addObserver must be called on the main thread

3 participants