I have created a main screen to have 3 buttons. And one of them is to open another page that displays data from my database in a textview. It works perfectly on the emulator on my laptop but when I copy the files to my Nexus 7 that button crashes the application. All other buttons work fine.
here's the code, very basic:
viewFlare = (Button)findViewById(R.id.bViewFlare);
viewFlare.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent openViewFlare = new Intent("com.example.project.SQLFLAREVIEW");
startActivity(openViewFlare);
}
});
it calls this page:
public class SQLFlareView extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.sqlflareview);
TextView textView = (TextView) findViewById(R.id.tvSQLFlareinfo);
Calms info = new Calms(this);
info.open();
//System.out.print("THIS IS THIS OPEN");
String data = info.getFlareData();
//System.out.print("ABOUT TO CLOSE");
info.close();
textView.setText(data);
}
}
If anyone would have any ideas I would be very appreciative, I have banged my head about this problem for a while.
Thanks in advance