I try this to add some data to "global variables". Class "Conection" without window in void
for (int in = 7; in < arAll.length; in++) {
        if (arAll[in].toString().endsWith("/")) {
            ((MyApplication) this.getApplication()).setPath(arAll[in]
                    .toString());
        } else {
            ((MyApplication) this.getApplication()).setFile(arAll[in]
                    .toString());
        }
MyApplication getter's and setter's:
private ArrayList<String> file = new ArrayList<String>();
private ArrayList<String> path = new ArrayList<String>();
private ArrayList<String> all = new ArrayList<String>();
public void removeAll() {
    this.file.clear();
    this.path.clear();
    this.all.clear();
}
public int len() {
    return this.all.size();
}
public String getStrbyId (int i) {
    return this.all.get(i).toString();
}
public ArrayList<String> getFile() {
    return this.file;
}
public void setFile(String file) {
    this.file.add(file);
    setAll(file);
    Log.v("",file);
}
public ArrayList<String> getPath() {
    return this.path;
}
public void setPath(String path) {
    this.path.add(path);
    setAll(path);
    Log.v("",path);
}
public ArrayList<String> getAll() {
    Log.v("",String.valueOf(len()));
    return this.all;
}
private void setAll(String all) {
    this.all.add(all);
}
In manifest  <application android:name="MyApplication"
When I try to execute first void, I have an error.
 
     
    