Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6101929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:33:21+00:00 2026-05-23T13:33:21+00:00

I am using Google Analytics for Android but after turning on StrictMode I get

  • 0

I am using Google Analytics for Android but after turning on StrictMode I get a lot of message like this:

 StrictMode policy violation; ~duration=349 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=23 violation=2
 at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:745)
 at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1345)
 at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1235)
 at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1189)
 at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1309)
 at com.google.android.apps.analytics.PersistentEventStore.peekEvents(Unknown Source)
 at com.google.android.apps.analytics.PersistentEventStore.peekEvents(Unknown Source)
 at com.google.android.apps.analytics.GoogleAnalyticsTracker.dispatch(Unknown Source)
 at com.google.android.apps.analytics.GoogleAnalyticsTracker$1.run(Unknown Source)
 at android.os.Handler.handleCallback(Handler.java:587)
 at android.os.Handler.dispatchMessage(Handler.java:92)
 at android.os.Looper.loop(Looper.java:123)
 at android.app.ActivityThread.main(ActivityThread.java:3647)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:507)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
 at dalvik.system.NativeStart.main(Native Method)

Can I ignore that?
I also tried to put tracker.trackingPageView(…) into AsyncTask – same Result.

Here are my settings for StrictMode:

    StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
    .detectDiskReads()
    .detectDiskWrites()
    .detectNetwork()
    .penaltyLog()
    .build());

    StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
        .detectLeakedSqlLiteObjects()
    .penaltyLog()
    .penaltyDeath()
    .build());

I would really appreciate any help – thanks in advance!
Mike

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:33:21+00:00Added an answer on May 23, 2026 at 1:33 pm

    Check out the iosched app for their AnalyticsUtils.java which does some asynctask magic around track calls. There is however this in the constructor:

        // Unfortunately this needs to be synchronous.
        mTracker.start(UACODE, 300, mApplicationContext);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using google analytics to track the user in my android application, but in
Currently using Google Analytics as a supplement to our paid tracking software, but neither
I would like to gather usage statistics for my iPhone app using Google Analytics
We are using Google Analytics for our site, but since it uses client script
I've been trying to get Google Analytics to work in PhoneGap 1.2.0 over Android
So Im using a single google analytics code for multiple domains. But now the
I am using Google Analytics for Android to track events, page views on an
Possible Duplicate: How to get Google Analytics data using OAuth? I'm struggling with it
I'm trying to track specific actions using Google Analytics, but I don't want to
I'm trying to integrate Google Analytics into my Android project using the information on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.