I have my app checking for the latest version of the Google Play Services at runtime. If the Google Play Services need to be updated the Play Store is opened in a new activity and after 20 seconds the main activity is closed. The problem is when I reopen my app after the Play Services update it crashes. If I wait for about 30 seconds the app opens fine. It has something to do with the admob ads. If I comment out the admob code the app doesn't crash. I've tried to add the permission it says it needs in the manifest but that doesn't help. I've also tried to catch the security exception and that doesn't help either. How do I solve this? I have a screenshot but it won't let me post it on here...
The log says:
04-30 22:18:22.882: E/AndroidRuntime(6010): FATAL EXCEPTION: AdWorker #1
04-30 22:18:22.882: E/AndroidRuntime(6010): java.lang.SecurityException: attempting to read gservices without permission: Neither user 10004 nor current process has com.google.android.providers.gsf.permission.READ_GSERVICES.
04-30 22:18:22.882: E/AndroidRuntime(6010): at android.os.Parcel.readException(Parcel.java:1425)
04-30 22:18:22.882: E/AndroidRuntime(6010): at android.os.Parcel.readException(Parcel.java:1379)
04-30 22:18:22.882: E/AndroidRuntime(6010): at xs.a(SourceFile:133)
04-30 22:18:22.882: E/AndroidRuntime(6010): at xo.a(SourceFile:133)
04-30 22:18:22.882: E/AndroidRuntime(6010): at xo.a(SourceFile:118)
04-30 22:18:22.882: E/AndroidRuntime(6010): at ud.d(SourceFile:88)
04-30 22:18:22.882: E/AndroidRuntime(6010): at ud.b(SourceFile:129)
04-30 22:18:22.882: E/AndroidRuntime(6010): at ua.a(SourceFile:239)
04-30 22:18:22.882: E/AndroidRuntime(6010): at ua.a(SourceFile:176)
04-30 22:18:22.882: E/AndroidRuntime(6010): at aas.a(SourceFile:118)
04-30 22:18:22.882: E/AndroidRuntime(6010): at abz.run(SourceFile:14)
04-30 22:18:22.882: E/AndroidRuntime(6010): at acb.run(SourceFile:30)
04-30 22:18:22.882: E/AndroidRuntime(6010): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
04-30 22:18:22.882: E/AndroidRuntime(6010): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
04-30 22:18:22.882: E/AndroidRuntime(6010): at java.lang.Thread.run(Thread.java:856)
Thanks for any help...