我创建了这个类,但我无法获得成功存储在 stackmob 中后应该生成的弹出消息。
public class TaskActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
csuper.onCreate(savedInstanceState);
//setContentView(R.layout.TaskActivity;
setContentView(R.layout.activity_task);
StackMobAndroid.init(getApplicationContext(), 0, "010686ac-9fb2-4c70-bbec-c2d92ccdc39d");
Task myTask = new Task("Learn even more about StackMob", new Date(0));
myTask.save(new StackMobModelCallback() {
@Override
public void success() {
// the call succeeded
// Toast.makeText(this, "No camera on this device",0).show();
Toast msg = Toast.makeText(TaskActivity.this,
"i have done it", Toast.LENGTH_LONG);
msg.show();
}
@Override
public void failure(StackMobException e) {
// the call failed
}
});
}