tags:

views:

37

answers:

1

I am trying to develop an app and I want it to bring in data from a mySQL database. But from some reading I have done on different sites, I am realizing that it is probably not going to happen. But I am curious to know, how do apps like PhoneFlix and others view that dynamic data on the application? Does it somehow just bring it in through http? If so, how would I go about doing that? Does anyone know of any good sites that will point me in the right direction? Thanks

ezekielweb

A: 

Well, first of all, android provides sqlite, not mysql. :)

You can create a thread that does whatever you want it to and it can communicate with the front activity with Bundle when you implement Handler in your activity.

such as below...

private void do_what_i_want() {

new Thread() {

public void run() {

 Bundle b = new Bundle();
 b.putString("whatyouwant", value);

 Message m = new Message();
 m.setData(bundle);
 handler.sendMessage(msg);

}

}.start

}

private Handler handler = new Handler() {

@Override

public void handleMessage(Message msg) {

super.handleMessage(msg);

Bundle b = msg.getData();

String whatyouwant = b.getString("whatyouwant");

["you can refresh your view here"]

}

}

hope I'm on the right track... :p

optimystery
But will that communicate an already existing web site sql database? I want to have the same information available through the device and through a desktop web browser. Is that possible. Thanks for the response.
ezekielweb
with the proper implementation.. sure! :)
optimystery