use of org.qii.weiciyuan.bean.GeoBean in project weiciyuan by qii.
the class SendWeiboService method onStartCommand.
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
int lastNotificationId = intent.getIntExtra("lastNotificationId", -1);
String token = intent.getStringExtra("token");
AccountBean account = (AccountBean) intent.getParcelableExtra("account");
String picPath = intent.getStringExtra("picPath");
String content = intent.getStringExtra("content");
GeoBean geoBean = (GeoBean) intent.getParcelableExtra("geo");
StatusDraftBean statusDraftBean = (StatusDraftBean) intent.getParcelableExtra("draft");
WeiboSendTask task = new WeiboSendTask(lastNotificationId, token, account, picPath, content, geoBean, statusDraftBean);
task.executeOnExecutor(MyAsyncTask.THREAD_POOL_EXECUTOR);
tasksResult.put(task, false);
return START_REDELIVER_INTENT;
}
use of org.qii.weiciyuan.bean.GeoBean in project weiciyuan by qii.
the class WriteWeiboActivity method updateWithNewLocation.
private void updateWithNewLocation(Location result) {
haveGPS.setVisibility(View.VISIBLE);
geoBean = new GeoBean();
geoBean.setLatitude(result.getLatitude());
geoBean.setLongitude(result.getLongitude());
if (Utility.isTaskStopped(locationTask)) {
locationTask = new GetGoogleLocationInfo(geoBean);
locationTask.executeOnExecutor(MyAsyncTask.THREAD_POOL_EXECUTOR);
}
((LocationManager) WriteWeiboActivity.this.getSystemService(Context.LOCATION_SERVICE)).removeUpdates(locationListener);
}
Aggregations