Profile

Cover photo
Jim Jeffers
Works at Sumo Creations LLC
Attended HPI d.school
Lives in Portland, OR
250 followers|7,338 views
AboutPostsPhotosYouTube

Stream

Jim Jeffers

Bug Reports  - 
 
Hey there,

I have an AsyncTask that now hangs when I update my app to use Google Play services 7.8.0. The code was working without issue when my app was using 7.5.0. Any idea what might cause this to occur?

  private class QueryDataTask extends AsyncTask<Void, Void, DataReadResult> {
       @Override
        protected void onPreExecute() {
            super.onPreExecute();
            Log.d(TAG, "Executing query task");
        }

        protected DataReadResult doInBackground(Void... params) {
            Calendar date = new GregorianCalendar();
            date.set(Calendar.HOUR_OF_DAY, 0);
            date.set(Calendar.MINUTE, 0);
            date.set(Calendar.SECOND, 0);
            date.set(Calendar.MILLISECOND, 0);
            date.add(Calendar.DAY_OF_MONTH, 1);
            date.add(Calendar.SECOND, -1);
            long endTime = date.getTimeInMillis();

            date.add(Calendar.DAY_OF_MONTH, -15);
            long startTime = date.getTimeInMillis();

            DataReadRequest readRequest = new DataReadRequest.Builder()
              .aggregate(DataType.TYPE_STEP_COUNT_DELTA, DataType.AGGREGATE_STEP_COUNT_DELTA)
              .bucketByTime(1, TimeUnit.DAYS)
              .setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS)
              .build();
              
            Log.d(TAG, "Sending Google Fit Task");
            return Fitness.HistoryApi.readData(mClient, readRequest).await(1, TimeUnit.MINUTES);
        }

       @Override
        protected void onPostExecute(DataReadResult dataReadResult) {
            Log.d(TAG, "Post Execute Google Fit Task");
        }
    }
1
Ian Lake's profile photoJim Jeffers's profile photo
4 comments
 
+Ian Lake Using setResultCallback() resolved the issue.
Add a comment...
In his circles
141 people
Have him in circles
250 people
Kishore Dharmarajan's profile photo
Bill Cumming's profile photo
With Company - Significantly Different's profile photo
Kevin Johnston's profile photo
Chris Irish's profile photo
James Britt's profile photo
Ted Cook's profile photo
Jessica Stape's profile photo
Andrew Dekker's profile photo

Jim Jeffers

Shared publicly  - 
1
Add a comment...
People
In his circles
141 people
Have him in circles
250 people
Kishore Dharmarajan's profile photo
Bill Cumming's profile photo
With Company - Significantly Different's profile photo
Kevin Johnston's profile photo
Chris Irish's profile photo
James Britt's profile photo
Ted Cook's profile photo
Jessica Stape's profile photo
Andrew Dekker's profile photo
Education
  • HPI d.school
    Design Thinking, 2010 - 2011
  • University of Queensland
    Masters of Interaction Design, 2009 - 2010
  • Arizona State University
    Bachelors of Business / Marketing & Minor in Communications, 2002 - 2006
Basic Information
Gender
Male
Work
Occupation
Designing & Programming
Employment
  • Sumo Creations LLC
    Lead Creative, 2006 - present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Portland, OR
Previously
Berlin, Germany - Brisbane, Australia - Phoenix, AZ - Chicago, IL
Links