0
我正在閱讀Android Wear手錶的GPS數據,然後使用Fitness.HistoryAPI插入Google健身數據存儲。但一些記錄被拒絕,5015個錯誤,這顯然意味着: `INCONSISTENT_PACKAGE_NAMESpurious Google Fit 5015錯誤?
狀態代碼表示該應用程序試圖對一個數據源,不應用程序的包name.`
所以匹配插入數據dataSource不是自定義的,並且所有記錄中的所有數據源都是相同的,但只有一些被拒絕。
下面看到一些日誌記錄信息:...
V: Data Source DataSource{raw:Application{com.google.android.gms::null}:Device{Sony:SmartWatch 3:15e991d4::3:2}::DataType{com.google.location.sample[latitude(f), longitude(f), accuracy(f), altitude(f)]}}: device Device{Sony:SmartWatch 3:15e991d4::3:2} and type: com.google.location.sample
V: Data source for LOCATION_SAMPLE found! Registering.
V: DataPoint: Time=1466284820248, Source=DataSource{raw:Application{com.google.android.gms::null}:Device{Sony:SmartWatch 3:15e991d4::3:2}::DataType{com.google.location.sample[latitude(f), longitude(f), accuracy(f), altitude(f)]}}
V: latitude = 37.28372
V: longitude = -122.024345
V: accuracy = 50.0
V: altitude = unset
V: Recording...
V: DataPoint: Time=1466284823387, Source=DataSource{derived:Application{com.google.android.gms::null}:Device{Sony:SmartWatch 3:15e991d4::3:2}:default:DataType{com.google.activity.sample[activity(i), confidence(f)]}}
V: activity = 3
V: confidence = 100.0
V: Recording...
V: DataPoint: Time=1466284826561, Source=DataSource{raw:Application{com.google.android.gms::null}:Device{Sony:SmartWatch 3:15e991d4::3:2}::DataType{com.google.location.sample[latitude(f), longitude(f), accuracy(f), altitude(f)]}}
V: latitude = 37.28377
V: longitude = -122.02438
V: accuracy = 31.0
V: altitude = 73.0
V: Recording...
V: DataPoint: Time=1466284861826, Source=DataSource{derived:Application{com.google.android.gms::null}:Device{Sony:SmartWatch 3:15e991d4::3:2}:default:DataType{com.google.activity.sample[activity(i), confidence(f)]}}
V: activity = 3
V: confidence = 100.0
V: Recording...
D: Data sets number of points: Speed 0, Location 2, Activity 2
D: Failed to insert data type com.google.activity.sample for reason 5015 null
D: Checking inserted fitness data for com.google.location.sample in this period 1466284820000-1466284881000
D: Failed to insert data type com.google.location.sample for reason 5015 null
D: Successfully inserted Session Sat, Jun 18; 2:20PM: Period 1
D: Found 1 data points for data type com.google.location.sample
V: Timestamp Latitude Longitude Altitude Accuracy
V: 1466284826561 37.283772 -122.024384 73.000000 31.000000
所以有發現了兩個位置記錄,都與同一dataSourcem但顯然其中一人被拒絕(因爲你可以看到查詢只找到一個5015錯誤後的位置記錄)。
有什麼想法?