Parse.com | Trying to get a list of subscribed channels leading to app crash, any help/ideas?



To show the user a list of his channels I did this:



package za.hseldo.client;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.parse.ParseInstallation;

public class Aansteekbord extends Activity {

Object[] myChannels;

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aansteekbord);

myChannels = ParseInstallation.getCurrentInstallation().getList("channels").toArray();
LinearLayout layout = (LinearLayout) findViewById(R.id.layoutA);

for (int i = 0; i < myChannels.length - 1; i++) {
TextView tempView = new TextView(getBaseContext());
tempView.setText(myChannels[i].toString());
layout.addView(tempView);
}
}
}


I get an error at line 18. This is only an example, I have found the same in other areas, that the ParseInstallation.getCurrentInstallation().getList("channels") doesn's work. The documentation provides that code? Any thoughts?


No comments:

Post a Comment