-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application #1
Comments
There needs a context that which type is activity when you create VideoPlayer,because Dialog needs it ,if you used a application type context , the BadTokenException occoured . |
What did I miss here ? import android.support.v7.app.AppCompatActivity; import me.domain.naivorplayertest.R; /**
// Glide.with(this)
} |
Oh,i 'm sorry, it's a bug ,thanks for your feedback, and i do suggest you choose other videoplayer ,this only has a beauteful UI more than Exoplayer2 , and beause of myself reason , this project has given up , and it is not performance ! |
`android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
at android.view.ViewRootImpl.setView(ViewRootImpl.java:566)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at com.naivor.player.surface.DialogHolder.showNotWifiDialog(DialogHolder.java:116)
at com.naivor.player.VideoPlayer.requestPrepareSourceData(VideoPlayer.java:1175)
at com.naivor.player.surface.ControlView.start(ControlView.java:501)
at com.naivor.player.surface.ControlView$ComponentListener.onClick(ControlView.java:880)
at android.view.View.performClick(View.java:4780)
`
The text was updated successfully, but these errors were encountered: