How to pass argument to Context in android -


i new android , times application works fine if pass

if use,

this context // gets error   

if use,

classname.this context // gets error         android.view.windowmanager$badtokenexception:    unable add window -- token    android.app.localactivitymanager$localactivityrecord@40537450 not valid; activity running?   

if use,

getapplicationcontext()  android.view.windowmanager$badtokenexception:  unable add window -- token null not application 

if use,

classname.this.getparent()   

i confused when use what.

please explain


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -