0

Playing with an Android Phonegap Build app using Google JavaScript Client Library. Developing the app in Dreamweaver, using the Dreamweaver Phonegap Build functionality.

Basing my code on this:

https://developers.google.com/api-client-library/javascript/start/start-js

The only difference between that and my code is that I'm using my own client ID and API Key, created using Google Developers Console.

I have created a browser version of this app that works correctly, displaying the picture and display name of the logged in Google user after getting the user's consent.

Trying to port the app to Android, I created new credentials (client ID and API key) for Android in the same project in the Google Developers Console.

Successfully installed the app on my Nexus 7 (running Android 4.4.2) using the QR Code and Google Goggles.

However, the app just displays a blank screen rather than the expected "Authorize" button.

I enabled developer options on the Nexus, enabled USB debugging, attached the Nexus to my MacBook Pro via USB and used the Android Debug Bridge "logcat" command in the Terminal to try to see what was happening when the app loaded. Below is part of what I got. Any help interpreting will be much appreciated. (My app package name, appearing on the first line of the logcat output, is org.irthlingz.jsgapitest041314.)

W/PackageManager(  505): Unknown permission android.permission.RECORD_VIDEO in package org.irthlingz.jsgapitest041314
W/PackageManager(  505): Not granting permission android.permission.MANAGE_DOCUMENTS to package com.google.android.youtube (protectionLevel=18 flags=0x98bec5)
W/PackageManager(  505): Not granting permission android.permission.READ_DREAM_STATE to package com.google.android.gsf (protectionLevel=2 flags=0x40883e45)
W/PackageManager(  505): Unknown permission com.chrome.permission.DEVICE_EXTRAS in package com.android.chrome
W/PackageManager(  505): Unknown permission com.sec.enterprise.knox.MDM_CONTENT_PROVIDER in package com.android.chrome
I/ActivityManager(  505): Force stopping com.android.chrome appid=10038 user=0: pkg removed
W/ContextImpl( 3291): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1479 android.content.ContextWrapper.startService:494 android.content.ContextWrapper.startService:494 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2419 
I/ActivityManager(  505): Delay finish: com.google.android.gms/.app.receiver.SystemBroadcastReceiver
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.apps.plus/.service.PackagesMediaMonitor
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.partnersetup/.RlzPingBroadcastReceiver
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.android.musicfx/.Compatibility$Receiver
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.gms/.app.receiver.SystemBroadcastReceiver
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.gms/.wallet.receiver.PackageAddedBroadcastReceiver
I/ActivityManager(  505): Resuming delayed broadcast
D/BackupManagerService(  505): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.android.chrome flg=0x4000010 (has extras) }
D/BackupManagerService(  505): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.android.chrome flg=0x4000010 (has extras) }
V/BackupManagerService(  505): removePackageParticipantsLocked: uid=10038 #1
V/BackupManagerService(  505): addPackageParticipantsLocked: #1
I/ActivityManager(  505): Delay finish: com.google.android.gms/.app.receiver.SystemBroadcastReceiver
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.apps.magazines/com.google.apps.dots.android.app.receiver.FirstInstallNotificationReceiver
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.apps.plus/.service.PackagesMediaMonitor
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.googlequicksearchbox/com.google.android.search.core.summons.icing.InternalIcingCorporaProvider$CorporaChangedReceiver
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Delay finish: com.google.android.googlequicksearchbox/.GelStubAppWatcher
I/ActivityManager(  505): Resuming delayed broadcast
I/ActivityManager(  505): Waited long enough for: ServiceRecord{42f89d30 u0 com.android.providers.downloads/.DownloadService}
user1147171
  • 1,213
  • 3
  • 14
  • 22
  • see this , may be it helps u http://stackoverflow.com/questions/8854012/unknown-permission-while-developing-with-c2dm – Rohit Apr 15 '14 at 04:54
  • Thanks, Rohit, but the solution there had to do with the Android Virtual Device (AVD) Manager. I'm not using a virtual device, I'm using an actual hardware device. So I believe that solution is not relevant to my question. (But please correct me if I'm wrong!) – user1147171 Apr 15 '14 at 05:07

0 Answers0