I have an twitter application.And also it will connect thriugh
bluetooth by programatically.Now I want to send my data into another
screen.How can I send my data.please help me
Thankyou
public void loadHomeTimeline() {
try {
ArrayList<Status> statii = twitter.getHomeTimeline();
adapter = new StatusListAdapter(this, statii);
adapter.getFirstId();
} catch (TwitterException e) {
throw new RuntimeException("Unable to load home timeline", e);
}
case R.id.send_btn:
if (addresses == null){
// no device is connected
Toast.makeText(MainScreen.this, "No
connected device found!\n
\nData not sent.", Toast.LENGTH_SHORT).show();
}
else if (addresses.length == 1){
// no need to ask just send data to the
connected device
sa.loadHomeTimeline();
sendData(addresses[0], dt);
}
else {
// several connected devices, we need
to show a dialog and ask
where to send the data
showDialog(DIALOG_DEVICES);
}
break;
private void sendData(String address,String m ){
Intent intent = new Intent(MainScreen.this,
AmarinoService.class);
intent.setAction(AmarinoIntent.ACTION_SEND);
intent.putExtra(AmarinoIntent.EXTRA_DEVICE_ADDRESS, address);
//intent.putExtra(AmarinoIntent.EXTRA_FLAG, selectedFlag);
intent.putExtra(AmarinoIntent.EXTRA_DATA_TYPE,
AmarinoIntent.STRING_EXTRA);
intent.putExtra(AmarinoIntent.EXTRA_DATA, m);
MainScreen.this.startService(intent);
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en