Следуя здесь, сохраните данные в объект objectId
через приложение для Android и получение errmsg com.parse.ParseRequest$ParseRequestException:
(без точки с запятой). Я подтвердил, что objectId такой, как показано на панели синтаксического анализа. Может кто-нибудь, пожалуйста, помогите мне понять, что я делаю неправильно? Спасибо
final String parseRequest = "Request";
final String parseRequestDriverLocation = "driverLocation";
private void saveDriverLocation(String objectId, Location driverLocation) {
Log.i("saveDriverLocation", "objectId=" + objectId + ", driverLocation=" + driverLocation.toString());
ParseGeoPoint locationDriverParse = new ParseGeoPoint(driverLocation.getLatitude(), driverLocation.getLongitude());
ParseObject acceptedRequest = ParseObject.createWithoutData(parseRequest, objectId);
Log.i("saveDriverLocation", "acceptedRequest=" + acceptedRequest.toString() + "\nlocationDriverParse=" + locationDriverParse.toString());
acceptedRequest.put(parseRequestDriverLocation, locationDriverParse);
acceptedRequest.saveInBackground(new SaveCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
Log.i("saveDriverLocation", "driver location saved successfully");
} else {
Log.i("saveDriverLocation", "saving driver location failed... " + e.toString());
}
}
});
}
Логкат:
I/saveDriverLocation: objectId=Ddm73yXhPC, driverLocation=Location[gps 41.677770,-80.385998 acc=20 et=+1d7h59m59s883ms alt=18.0 {Bundle[mParcelledData.dataSize=40]}]
I/saveDriverLocation: acceptedRequest=com.parse.ParseObject@ddeb183
locationDriverParse=ParseGeoPoint[41.677770,-80.385998]
I/saveDriverLocation: saving driver location failed... com.parse.ParseRequest$ParseRequestException: