Getting all the information from Facebook SDK in Android - android

I'm using Facebook SDK in my Android App. What I need is to get all the information of the user including the Name, Email, Birthday, Location. But all I can get is the Name and Email. Is there any permission to get the Birthday and Location? I also look at this link but if not working for me https://developers.facebook.com/docs/reference/api/user/.
Here is my way of getting the information.
if(fb.isSessionValid()){
button.setImageResource(R.drawable.logout_button);
JSONObject obj = null;
URL img = null;
try {
String jsonUser = fb.request("me");
obj = Util.parseJson(jsonUser);
String id = obj.optString("id");
String name = obj.optString("name");
String bday = obj.optString("birthday");
String address = obj.optString("location");
String email = obj.optString("email");
((TextView) findViewById(R.id.txt)).setText("Welcome! "+name);
((TextView) findViewById(R.id.txtbday)).setText("Birthday: "+bday);
((TextView) findViewById(R.id.txtaddress)).setText("Address: "+address);
((TextView) findViewById(R.id.txtemail)).setText("Email: "+email);
img = new URL("http://graph.facebook.com/"+id+"/picture?type=normal");
Bitmap bmp = BitmapFactory.decodeStream(img.openConnection().getInputStream());
pic.setImageBitmap(bmp);
} catch (FacebookError e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
this is my authorized
fb.authorize(MainActivity.this,new String[] {"email", "user_location", "user_birthday","publish_stream"}, new DialogListener() {
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), ""+e, Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
public void onError(DialogError e) {
// TODO Auto-generated method stub
//Toast.makeText(getApplicationContext(), "Error", Toast.LENGTH_SHORT).show();
}
public void onComplete(Bundle values) {
// TODO Auto-generated method stub
Editor editor = sp.edit();
editor.putString("access_token", fb.getAccessToken());
editor.putLong("access_expires", fb.getAccessExpires());
editor.commit();
updateButtonImage();
}
public void onCancel() {
// TODO Auto-generated method stub
Toast.makeText(getApplicationContext(), "Cancel", Toast.LENGTH_SHORT).show();
}
});
}
}
this is what log says
11-14 14:05:40.399: E/Trace(1293): error opening trace file: No such file or directory (2)
11-14 14:05:41.699: D/dalvikvm(1293): GC_CONCURRENT freed 290K, 6% free 6173K/6535K, paused 71ms+76ms, total 201ms
11-14 14:05:42.509: I/Choreographer(1293): Skipped 82 frames! The application may be doing too much work on its main thread.
11-14 14:05:42.519: D/gralloc_goldfish(1293): Emulator without GPU emulation detected.
11-14 14:05:42.679: I/Choreographer(1293): Skipped 30 frames! The application may be doing too much work on its main thread.
I also got this one from my log cat
11-14 14:19:28.339: D/AndroidRuntime(1359): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
11-14 14:19:28.339: D/AndroidRuntime(1359): CheckJNI is ON
11-14 14:19:28.379: D/dalvikvm(1359): Trying to load lib libjavacore.so 0x0
11-14 14:19:28.389: D/dalvikvm(1359): Added shared lib libjavacore.so 0x0
11-14 14:19:28.409: D/dalvikvm(1359): Trying to load lib libnativehelper.so 0x0
11-14 14:19:28.409: D/dalvikvm(1359): Added shared lib libnativehelper.so 0x0
11-14 14:19:29.059: D/AndroidRuntime(1359): Calling main entry com.android.commands.pm.Pm
11-14 14:19:29.089: W/ActivityManager(146): No content provider found for permission revoke: file:///data/local/tmp/facebook.apk
11-14 14:19:29.119: W/ActivityManager(146): No content provider found for permission revoke: file:///data/local/tmp/facebook.apk
11-14 14:19:29.249: I/PackageManager(146): Removing non-system package:com.example.facebook
11-14 14:19:29.249: I/ActivityManager(146): Force stopping package com.example.facebook uid=10054
11-14 14:19:29.249: I/ActivityManager(146): Killing proc 1339:com.example.facebook/u0a54: force stop
11-14 14:19:29.249: W/ActivityManager(146): Force removing ActivityRecord{411f5b90 com.example.facebook/.MainActivity}: app died, no saved state
11-14 14:19:29.279: I/WindowState(146): WIN DEATH: Window{41263720 com.example.facebook/com.example.facebook.MainActivity paused=false}
11-14 14:19:29.429: I/Choreographer(263): Skipped 64 frames! The application may be doing too much work on its main thread.
11-14 14:19:29.429: I/PackageManager(146): Package com.example.facebook codePath changed from /data/app/com.example.facebook-1.apk to /data/app/com.example.facebook-2.apk; Retaining data and using new
11-14 14:19:29.479: W/InputMethodManagerService(146): Got RemoteException sending setActive(false) notification to pid 1339 uid 10054
11-14 14:19:29.559: I/PackageManager(146): Running dexopt on: com.example.facebook
11-14 14:19:30.549: D/dalvikvm(1369): DexOpt: load 142ms, verify+opt 469ms, 833796 bytes
11-14 14:19:30.569: W/PackageManager(146): Code path for pkg : com.example.facebook changing from /data/app/com.example.facebook-1.apk to /data/app/com.example.facebook-2.apk
11-14 14:19:30.569: W/PackageManager(146): Resource path for pkg : com.example.facebook changing from /data/app/com.example.facebook-1.apk to /data/app/com.example.facebook-2.apk
11-14 14:19:30.579: I/ActivityManager(146): Force stopping package com.example.facebook uid=10054
11-14 14:19:30.659: D/dalvikvm(146): GC_FOR_ALLOC freed 681K, 9% free 9626K/10567K, paused 81ms, total 81ms
11-14 14:19:30.759: D/PackageManager(146): New package installed in /data/app/com.example.facebook-2.apk
11-14 14:19:30.839: I/ActivityManager(146): Force stopping package com.example.facebook uid=10054
11-14 14:19:30.849: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 0ms
11-14 14:19:30.920: D/dalvikvm(330): WAIT_FOR_CONCURRENT_GC blocked 0ms
11-14 14:19:30.949: D/dalvikvm(263): GC_EXPLICIT freed 185K, 36% free 9272K/14471K, paused 7ms+14ms, total 92ms
11-14 14:19:31.009: D/dalvikvm(146): WAIT_FOR_CONCURRENT_GC blocked 0ms
11-14 14:19:31.059: I/InputReader(146): Reconfiguring input devices. changes=0x00000010
11-14 14:19:31.170: D/dalvikvm(146): GC_EXPLICIT freed 475K, 11% free 9461K/10567K, paused 38ms+10ms, total 163ms
11-14 14:19:31.189: D/PackageManager(146): generateServicesMap(android.accounts.AccountAuthenticator): 3 services unchanged
11-14 14:19:31.210: D/PackageManager(146): generateServicesMap(android.content.SyncAdapter): 5 services unchanged
11-14 14:19:31.219: D/BackupManagerService(146): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.facebook flg=0x8000010 (has extras) }
11-14 14:19:31.219: D/dalvikvm(330): GC_EXPLICIT freed 169K, 6% free 6320K/6663K, paused 5ms+6ms, total 293ms
11-14 14:19:31.259: D/PackageManager(146): generateServicesMap(android.accounts.AccountAuthenticator): 3 services unchanged
11-14 14:19:31.279: D/PackageManager(146): generateServicesMap(android.content.SyncAdapter): 5 services unchanged
11-14 14:19:31.299: D/BackupManagerService(146): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.facebook flg=0x8000010 (has extras) }
11-14 14:19:31.299: V/BackupManagerService(146): removePackageParticipantsLocked: uid=10054 #1
11-14 14:19:31.310: I/InputReader(146): Reconfiguring input devices. changes=0x00000010
11-14 14:19:31.429: V/BackupManagerService(146): addPackageParticipantsLocked: #1
11-14 14:19:31.699: I/Choreographer(263): Skipped 259 frames! The application may be doing too much work on its main thread.
11-14 14:19:31.909: I/Choreographer(263): Skipped 33 frames! The application may be doing too much work on its main thread.
11-14 14:19:32.179: D/dalvikvm(263): GC_CONCURRENT freed 1331K, 38% free 9017K/14471K, paused 29ms+9ms, total 116ms
11-14 14:19:32.179: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 62ms
11-14 14:19:32.179: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 80ms
11-14 14:19:32.439: D/dalvikvm(263): GC_CONCURRENT freed 415K, 34% free 9614K/14471K, paused 30ms+7ms, total 84ms
11-14 14:19:32.439: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 54ms
11-14 14:19:32.439: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 70ms
11-14 14:19:32.449: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 60ms
11-14 14:19:32.449: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 67ms
11-14 14:19:32.639: D/dalvikvm(263): GC_FOR_ALLOC freed 929K, 37% free 9199K/14471K, paused 41ms, total 47ms
11-14 14:19:32.649: I/dalvikvm-heap(263): Grow heap (frag case) to 10.257MB for 1286224-byte allocation
11-14 14:19:32.779: D/dalvikvm(263): GC_FOR_ALLOC freed 7K, 28% free 10448K/14471K, paused 128ms, total 134ms
11-14 14:19:32.920: D/dalvikvm(263): GC_CONCURRENT freed 1K, 27% free 10681K/14471K, paused 16ms+38ms, total 134ms
11-14 14:19:32.969: D/dalvikvm(146): WAIT_FOR_CONCURRENT_GC blocked 0ms
11-14 14:19:33.269: W/InputMethodManagerService(146): Found no subtypes in a system IME: com.android.inputmethod.pinyin
11-14 14:19:33.349: W/RecognitionManagerService(146): no available voice recognition services found
11-14 14:19:33.899: D/dalvikvm(263): GC_CONCURRENT freed 3879K, 43% free 8263K/14471K, paused 34ms+10ms, total 114ms
11-14 14:19:33.949: I/Choreographer(263): Skipped 303 frames! The application may be doing too much work on its main thread.
11-14 14:19:34.249: D/dalvikvm(263): GC_FOR_ALLOC freed 115K, 40% free 8702K/14471K, paused 50ms, total 51ms
11-14 14:19:34.369: D/dalvikvm(263): GC_FOR_ALLOC freed 327K, 38% free 8973K/14471K, paused 39ms, total 42ms
11-14 14:19:34.619: D/dalvikvm(263): GC_CONCURRENT freed 767K, 37% free 9191K/14471K, paused 39ms+6ms, total 94ms
11-14 14:19:34.619: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 44ms
11-14 14:19:34.619: D/dalvikvm(263): WAIT_FOR_CONCURRENT_GC blocked 47ms
11-14 14:19:34.789: D/dalvikvm(263): GC_FOR_ALLOC freed 232K, 37% free 9257K/14471K, paused 49ms, total 55ms
11-14 14:19:34.799: I/dalvikvm-heap(263): Grow heap (frag case) to 10.314MB for 1286224-byte allocation
11-14 14:19:34.879: D/dalvikvm(263): GC_FOR_ALLOC freed 3K, 28% free 10509K/14471K, paused 78ms, total 78ms
11-14 14:19:35.009: D/dalvikvm(263): GC_CONCURRENT freed 26K, 28% free 10510K/14471K, paused 27ms+7ms, total 132ms
11-14 14:19:35.149: D/dalvikvm(146): GC_EXPLICIT freed 520K, 10% free 9550K/10567K, paused 116ms+516ms, total 2113ms
11-14 14:19:35.159: D/AndroidRuntime(1359): Shutting down VM
11-14 14:19:35.179: D/dalvikvm(1359): GC_CONCURRENT freed 101K, 78% free 459K/2048K, paused 0ms+1ms, total 10ms
11-14 14:19:35.179: D/jdwp(1359): Got wake-up signal, bailing out of select
11-14 14:19:35.179: D/dalvikvm(1359): Debugger has detached; object registry had 1 entries
11-14 14:19:35.189: I/AndroidRuntime(1359): NOTE: attach of thread 'Binder_3' failed
11-14 14:19:35.759: D/AndroidRuntime(1377): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
11-14 14:19:35.759: D/AndroidRuntime(1377): CheckJNI is ON
11-14 14:19:35.799: D/dalvikvm(1377): Trying to load lib libjavacore.so 0x0
11-14 14:19:35.799: D/dalvikvm(1377): Added shared lib libjavacore.so 0x0
11-14 14:19:35.829: D/dalvikvm(1377): Trying to load lib libnativehelper.so 0x0
11-14 14:19:35.829: D/dalvikvm(1377): Added shared lib libnativehelper.so 0x0
11-14 14:19:36.509: D/AndroidRuntime(1377): Calling main entry com.android.commands.am.Am
11-14 14:19:36.529: I/ActivityManager(146): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.facebook/.MainActivity u=0} from pid 1377
11-14 14:19:36.539: W/WindowManager(146): Failure taking screenshot for (164x246) to layer 21020
11-14 14:19:36.579: D/AndroidRuntime(1377): Shutting down VM
11-14 14:19:36.590: D/dalvikvm(1377): GC_CONCURRENT freed 102K, 77% free 489K/2048K, paused 1ms+1ms, total 11ms
11-14 14:19:36.590: D/jdwp(1377): Got wake-up signal, bailing out of select
11-14 14:19:36.590: D/dalvikvm(1377): Debugger has detached; object registry had 1 entries
11-14 14:19:36.599: I/AndroidRuntime(1377): NOTE: attach of thread 'Binder_3' failed
11-14 14:19:36.609: D/dalvikvm(1387): Not late-enabling CheckJNI (already on)
11-14 14:19:36.630: I/ActivityManager(146): Start proc com.example.facebook for activity com.example.facebook/.MainActivity: pid=1387 uid=10054 gids={3003, 1028}
11-14 14:19:36.630: I/Choreographer(263): Skipped 46 frames! The application may be doing too much work on its main thread.
11-14 14:19:36.929: E/Trace(1387): error opening trace file: No such file or directory (2)
11-14 14:19:38.359: D/dalvikvm(1387): GC_CONCURRENT freed 284K, 6% free 6199K/6535K, paused 72ms+84ms, total 206ms
11-14 14:19:39.219: I/Choreographer(1387): Skipped 39 frames! The application may be doing too much work on its main thread.
11-14 14:19:39.239: D/gralloc_goldfish(1387): Emulator without GPU emulation detected.
11-14 14:19:39.279: I/ActivityManager(146): Displayed com.example.facebook/.MainActivity: +2s710ms
11-14 14:19:39.443: I/Choreographer(1387): Skipped 60 frames! The application may be doing too much work on its main thread.
11-14 14:19:39.449: I/Choreographer(263): Skipped 51 frames! The application may be doing too much work on its main thread.
11-14 14:19:39.459: I/Choreographer(146): Skipped 57 frames! The application may be doing too much work on its main thread.
11-14 14:19:39.551: I/Choreographer(146): Skipped 44 frames! The application may be doing too much work on its main thread.
11-14 14:19:39.679: I/Choreographer(146): Skipped 49 frames! The application may be doing too much work on its main thread.
11-14 14:19:39.759: I/Choreographer(146): Skipped 49 frames! The application may be doing too much work on its main thread.
11-14 14:19:39.852: I/Choreographer(146): Skipped 43 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.122: I/Choreographer(146): Skipped 43 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.239: I/Choreographer(146): Skipped 48 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.319: I/Choreographer(146): Skipped 44 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.391: I/Choreographer(146): Skipped 44 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.471: I/Choreographer(146): Skipped 43 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.568: I/Choreographer(146): Skipped 44 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.681: I/Choreographer(146): Skipped 43 frames! The application may be doing too much work on its main thread.
11-14 14:19:41.761: I/Choreographer(146): Skipped 44 frames! The application may be doing too much work on its main thread.
11-14 14:20:00.092: I/Choreographer(217): Skipped 43 frames! The application may be doing too much work on its main thread.
thanks for anyone can help.

First, You are choosing the wrong tags to make the query for getting the User's location.
If you are using the Graph API, then the tag in question is: location. The user_location that you have used, is a permission.
Second, and perhaps more importantly, you are choosing these permissions: {"email", "publish_stream"}
To get the User's birthday and his / her location you will also need these permissions:
For the User logged into your app: user_location. And for getting the logged in user's friends location: friends_location
Similarly, for the birthday, you will need these permissions: user_birthday for the logged in user and friends_birthday for the logged in user's friends.
Take a look at the list of available fields for querying and getting results here: https://developers.facebook.com/docs/reference/api/user/
And for a list of all permissions, take a look at this page: https://developers.facebook.com/docs/reference/login/#permissions
EDIT 2:
Removing the earlier FQL suggestion and providing an alternate.
String testURL = "https://graph.facebook.com/me?fields=name,birthday,email,location&access_token=YOUR_ACCESS_TOKEN";
try {
HttpClient hc = new DefaultHttpClient();
HttpGet get = new HttpGet(testURL);
HttpResponse rp = hc.execute(get);
if (rp.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String result = EntityUtils.toString(rp.getEntity());
JSONArray JAUserInfo = new JSONArray(result);
for (int i = 0; i < JAUserInfo.length(); i++) {
JSONObject JOUserInfo = JAUserInfo.getJSONObject(i);
Log.e("USER DETAILS", JOUserInfo.toString());
if (JOUserInfo.has("location") {
JSONObject JOLocation = JOUserInfo.optJSONObject("location");
String location = JOLocation.getString("name");
}
}
}
} catch (Exception e) {
// TODO: handle exception
}
NOTE: You need to provide an Access Token in this query. Without that, this will without doubt, fail. Just change the YOUR_ACCESS_TOKEN in the String testURL to your Access Token.

Related

what is updateColorViewInt()if drawable=null color and how to fix it

I am making an app when I started my app in emulator like bluestack then it show this logcat and finish it self
02-25 00:32:21.401 850-850/com.tricknearn.app D/dalvikvm: Late-enabling CheckJNI
02-25 00:32:21.601 850-850/com.tricknearn.app D/dalvikvm: GC_FOR_ALLOC freed 70K, 28% free 2690K/3728K, paused 20ms, total 40ms
02-25 00:32:21.651 850-850/com.tricknearn.app I/dalvikvm-heap: Grow heap (frag case) to 9.065MB for 6720012-byte allocation
02-25 00:32:21.661 850-859/com.tricknearn.app D/dalvikvm: GC_FOR_ALLOC freed <1K, 11% free 9252K/10292K, paused 10ms, total 10ms
02-25 00:32:21.671 850-853/com.tricknearn.app D/dalvikvm: GC_CONCURRENT freed <1K, 11% free 9252K/10292K, paused 0ms+0ms, total 0ms
02-25 00:32:22.011 850-850/com.tricknearn.app I/PGA: Attempting to create new SOCKET connectionn pid = 850, tid = 850
02-25 00:32:22.031 850-850/com.tricknearn.app I/PGA: New SOCKET connection: com.tricknearn.app (pid 850, tid 850)
02-25 00:32:23.261 850-850/com.tricknearn.app W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection
And when I start this app in mobile device it shows logcat :
02-25 00:38:10.804 17347-17347/com.tricknearn.app V/PhoneWindow: updateColorViewInt()if drawable=null color=-14057287
what does these means and how to fix these. I don't know about that I tried to find this but i did't get usefull information.Need help guys. Thanks in advance.
Output from your phone is correct. Last message means -> if drawable wasn't set then background have white color (-14057287 == white). In output i see only debug, info, verbose and one warning - you don't get any error. Dalvik send to you info that garbage collector works and your heap are growing. What are your question?

How can i install Adobe Air on Genymotion emulator

I'm trying to install Adobe Air (com.adobe.air) in a Genymotion emulator emulating a Galaxy S4 with android 4.4.4 and I am getting:
Failure [INSTALL_FAILED_INVALID_APK]
With adb logcat I can see:
D/AndroidRuntime( 2350):
D/AndroidRuntime( 2350): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 2350): CheckJNI is OFF
D/dalvikvm( 2350): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 2350): Added shared lib libjavacore.so 0x0
D/dalvikvm( 2350): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 2350): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 2350): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 2350): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 2350): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 2350): failed to load memtrack module: -2
D/AndroidRuntime( 2350): Calling main entry com.android.commands.pm.Pm
W/ActivityManager( 517): No content provider found for permission revoke: file:///data/local/tmp/Adobe.AIR.v16.0.0.259_www.revdl.com.apk
W/ActivityManager( 517): No content provider found for permission revoke: file:///data/local/tmp/Adobe.AIR.v16.0.0.259_www.revdl.com.apk
I/PackageManager( 517): Copying native libraries to /data/app-lib/vmdl1421280503
D/dalvikvm( 517): GC_FOR_ALLOC freed 1626K, 20% free 10767K/13324K, paused 12ms, total 12ms
D/dalvikvm( 517): GC_FOR_ALLOC freed 309K, 17% free 11063K/13324K, paused 9ms, total 9ms
D/dalvikvm( 517): GC_FOR_ALLOC freed 1138K, 17% free 11163K/13324K, paused 11ms, total 11ms
D/dalvikvm( 517): GC_FOR_ALLOC freed 1036K, 17% free 11173K/13324K, paused 11ms, total 12ms
D/dalvikvm( 517): GC_FOR_ALLOC freed 996K, 17% free 11171K/13324K, paused 9ms, total 10ms
D/dalvikvm( 517): GC_FOR_ALLOC freed 985K, 17% free 11176K/13324K, paused 11ms, total 12ms
D/dalvikvm( 517): GC_FOR_ALLOC freed 987K, 17% free 11184K/13324K, paused 9ms, total 9ms
D/xmlCheckExt( 517): <filter>
D/xmlCheckExt( 517): pkgName = org.mozilla.firefox
D/xmlCheckExt( 517): <filter>
D/xmlCheckExt( 517): pkgName = org.mozilla.firefox_beta
D/xmlCheckExt( 517): <filter>
D/xmlCheckExt( 517): pkgName = com.good.android.gfe
D/xmlCheckExt( 517): <filter>
D/xmlCheckExt( 517): pkgName = com.adobe.air
I/PackageManager( 517): Package with second ABI is in black list: 10079com.adobe.air
W/PackageManager( 517): Package couldn't be installed in /data/app/com.adobe.air-1.apk
D/dalvikvm( 517): GC_EXPLICIT freed 1038K, 17% free 11162K/13324K, paused 1ms+1ms, total 12ms
D/AndroidRuntime( 2350): Shutting down VM
I noted the following piece in the log:
D/xmlCheckExt( 517): pkgName = com.adobe.air
I/PackageManager( 517): Package with second ABI is in black list: 10079com.adobe.air
But when I try:
adb shell pm unblock com.adobe.air
I'm getting:
Package com.adobe.air new blocked state: true
How can I unblock / remove from the blacklist Adobe Air package?
I think that you could find the apk in the sdk folder. In mac is here:
/Applications/Research In Motion/blackberry-tablet-sdk-3.2.1/runtimes/air

ACRA report not found on own server

I have implemented ACRA using this
I have added code in my application, log is saying that report file is uploaded
here is the log :
05-04 11:38:02.890: D/dalvikvm(3171): GC_FOR_ALLOC freed 0K, 9% free 6508K/7111K, paused 18ms, total 18ms
05-04 11:38:02.900: D/ACRA(3171): About to start ReportSenderWorker from #handleException
05-04 11:38:02.900: D/ACRA(3171): Mark all pending reports as approved.
05-04 11:38:02.900: D/ACRA(3171): Looking for error files in /data/data/com.white.xspl.sonyjive/files
05-04 11:38:02.900: D/ACRA(3171): #checkAndSendReports - start
05-04 11:38:02.900: D/ACRA(3171): Looking for error files in /data/data/com.white.xspl.sonyjive/files
05-04 11:38:02.910: I/ACRA(3171): Sending file 1399183682000-approved.stacktrace
05-04 11:38:02.930: D/dalvikvm(3171): GC_FOR_ALLOC freed 83K, 9% free 6498K/7111K, paused 19ms, total 20ms
05-04 11:38:02.930: D/ACRA(3171): Waiting for Toast + worker...
05-04 11:38:02.970: D/dalvikvm(3171): GC_FOR_ALLOC freed 82K, 9% free 6484K/7111K, paused 20ms, total 20ms
05-04 11:38:03.000: D/dalvikvm(3171): GC_FOR_ALLOC freed 16K, 9% free 6531K/7111K, paused 20ms, total 20ms
05-04 11:38:03.000: I/dalvikvm-heap(3171): Grow heap (frag case) to 6.486MB for 65552-byte allocation
05-04 11:38:03.030: D/dalvikvm(3171): GC_FOR_ALLOC freed 76K, 10% free 6519K/7239K, paused 28ms, total 28ms
05-04 11:38:03.030: D/ACRA(3171): Connect to http://mylocal.ip/reportpath
05-04 11:38:03.120: D/dalvikvm(3171): GC_CONCURRENT freed 379K, 10% free 6535K/7239K, paused 23ms+2ms, total 52ms
05-04 11:38:03.120: D/dalvikvm(3171): WAIT_FOR_CONCURRENT_GC blocked 29ms
05-04 11:38:03.150: D/dalvikvm(3171): GC_FOR_ALLOC freed 77K, 11% free 6501K/7239K, paused 22ms, total 22ms
05-04 11:38:03.160: D/ACRA(3171): Sending request to http://mylocal.ip/reportpath
05-04 11:38:03.250: D/ACRA(3171): #checkAndSendReports - finish
05-04 11:38:03.350: D/ACRA(3171): Wait for Toast + worker ended. Kill Application ? true
Don't know what going wrong please help..
This is what i added in Manifest
<application
android:name=".MyAppication"
android:allowBackup="true"
android:icon="#drawable/appicon"
android:label="#string/app_name"
android:theme="#style/Theme.Sherlock" >
here is my Class
public class MyAppications extends Application {
#Override
public void onCreate() {
// The following line triggers the initialization of ACRA
super.onCreate();
ACRA.init(this);
}
}
I think you need to look at your server.
ACRA says that it has sent the error report to http://mylocal.ip/reportpath
What does the server that is listening at that address say in its logs?

Testing activesync with android virtual devices

I am trying to setup a android virtual device to test syncing with an activesync-server.
I followed these steps:
The problem is that syncing is not working at all, but there are no errors like connection errors ...
IMO the problem is that the virtual device only has a private IP, so the server never can send anything to it?
So I probably need some kind of forwarding, like here:
But I am not sure if that’s correct and I am also not sure which ports should be forwarded.
Here is the logcat, when I want to sync:
W/InputMethodManagerService( 148): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41302038 attribute=null
I/Choreographer( 274): Skipped 41 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 477): GC_CONCURRENT freed 396K, 6% free 8392K/8903K, paused 15ms+7ms, total 527ms
D/dalvikvm( 274): GC_CONCURRENT freed 360K, 11% free 9493K/10567K, paused 29ms+48ms, total 142ms
I/EAS ContactsSyncAdapterService( 477): Contact sync requested for test#example.com
D/dalvikvm( 148): GREF has increased to 601
D/dalvikvm( 477): WAIT_FOR_CONCURRENT_GC blocked 0ms
I/Choreographer( 274): Skipped 33 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 477): GC_EXPLICIT freed 333K, 7% free 8355K/8903K, paused 78ms+32ms, total 1269ms
I/EAS EmailSyncAdapterService( 477): performSync
I/EAS EmailSyncAdapterService( 477): Mail sync requested for test#example.com
D/dalvikvm( 460): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 460): GC_EXPLICIT freed 216K, 5% free 8483K/8839K, paused 145ms+94ms, total 914ms
D/dalvikvm( 148): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 148): GC_EXPLICIT freed 510K, 7% free 11338K/12167K, paused 8ms+35ms, total 323ms
D/dalvikvm( 274): GC_CONCURRENT freed 415K, 11% free 9486K/10567K, paused 25ms+28ms, total 125ms
E/Inbox[test#example.com]( 477): Uncaught exception in EasSyncServicejava.lang.ArrayIndexOutOfBoundsException: length=32; index=32
E/Inbox[test#example.com]( 477): Sync ended due to an exception.
D/dalvikvm( 477): GC_CONCURRENT freed 376K, 6% free 8420K/8903K, paused 5ms+18ms, total 66ms
I don't think this is a problem with your networking setup. It looks like you have an error in your Sync code, that is causing the process to stop:
E/Inboxtest#example.com: Uncaught exception in EasSyncServicejava.lang.ArrayIndexOutOfBoundsException: length=32; index=32
E/Inboxtest#example.com: Sync ended due to an exception.
>
Wrap this code in a try/catch block to understand what is happening better.

Unable to start service Intent { flg=0x4 cmp=mypackage/.AlarmReceiver (has extras) }: not found

Here my manifest? Is a manifest problem? Many many hours spent to discover the problem... is a service that starts a class by intent (using alarmmanager). If no a manifest problem, what's the problem?
Thanks for help!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mypackage"
android:versionCode="1"
android:versionName="1" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" android:name="CrashReports">
<service android:name="UnUsedService">
<intent-filter>
<action
android:name="org.gortcloud.startatboot.UnUsedService" />
</intent-filter>
</service>
<receiver android:name="AutoStart">
<intent-filter>
<action
android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<receiver android:name="AlarmReceiver" android:process=":remote"/>
<activity
android:name="com.example.mypackage.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:enabled="true" android:name=".SobService"/>
<activity android:name="Index"></activity>
<activity android:name="SendText"></activity>
</application>
</manifest>
logcat
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
D/dalvikvm( 149): GC_CONCURRENT freed 637K, 13% free 8307K/9479K, paused 25ms+12ms, total 142ms
D/AndroidRuntime(14611):
D/AndroidRuntime(14611): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(14611): CheckJNI is ON
D/dalvikvm(14611): Trying to load lib libjavacore.so 0x0
D/dalvikvm(14611): Added shared lib libjavacore.so 0x0
D/dalvikvm(14611): Trying to load lib libnativehelper.so 0x0
D/dalvikvm(14611): Added shared lib libnativehelper.so 0x0
D/AndroidRuntime(14611): Calling main entry com.android.commands.pm.Pm
W/ActivityManager( 149): No content provider found for permission revoke: file:///data/local/tmp/MainActivity.apk
D/dalvikvm( 2860): GC_CONCURRENT freed 457K, 14% free 5292K/6087K, paused 17ms+4ms, total 75ms
W/ActivityManager( 149): No content provider found for permission revoke: file:///data/local/tmp/MainActivity.apk
D/dalvikvm( 149): GC_CONCURRENT freed 614K, 12% free 8360K/9479K, paused 22ms+30ms, total 125ms
D/dalvikvm( 149): GC_FOR_ALLOC freed 282K, 13% free 8265K/9479K, paused 69ms, total 70ms
D/dalvikvm( 149): GC_FOR_ALLOC freed 234K, 13% free 8267K/9479K, paused 86ms, total 87ms
D/dalvikvm( 149): GC_FOR_ALLOC freed 239K, 13% free 8270K/9479K, paused 68ms, total 68ms
I/PackageManager( 149): Removing non-system package:org.gortcloud.perledisaggezza
I/ActivityManager( 149): Force stopping package org.gortcloud.perledisaggezza uid=10044
I/ActivityManager( 149): Killing proc 10610:org.gortcloud.perledisaggezza/u0a44: force stop
W/ActivityManager( 149): Force removing ActivityRecord{411fe0f0 org.gortcloud.perledisaggezza/.MainActivity}: app died, no saved state
W/InputDispatcher( 149): channel '412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
E/InputDispatcher( 149): channel '412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowState( 149): WIN DEATH: Window{412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity paused=false}
W/InputDispatcher( 149): Attempted to unregister already unregistered input channel '412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity (server)'
I/Choreographer( 149): Skipped 75 frames! The application may be doing too much work on its main thread.
I/WindowManager( 149): WINDOW DIED Window{412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity paused=false}
I/Choreographer( 258): Skipped 238 frames! The application may be doing too much work on its main thread.
I/PackageManager( 149): Package org.gortcloud.perledisaggezza codePath changed from /data/app/org.gortcloud.perledisaggezza-2.apk to /data/app/org.gortcloud.perledisaggezza-1.apk; Retaining data and using new
W/InputMethodManagerService( 149): Got RemoteException sending setActive(false) notification to pid 10610 uid 10044
I/PackageManager( 149): Running dexopt on: org.gortcloud.perledisaggezza
D/dalvikvm(14630): DexOpt: load 129ms, verify+opt 643ms, 962252 bytes
W/PackageManager( 149): Code path for pkg : org.gortcloud.perledisaggezza changing from /data/app/org.gortcloud.perledisaggezza-2.apk to /data/app/org.gortcloud.perledisaggezza-1.apk
W/PackageManager( 149): Resource path for pkg : org.gortcloud.perledisaggezza changing from /data/app/org.gortcloud.perledisaggezza-2.apk to /data/app/org.gortcloud.perledisaggezza-1.apk
D/dalvikvm( 149): GC_FOR_ALLOC freed 320K, 13% free 8281K/9479K, paused 72ms, total 73ms
I/ActivityManager( 149): Force stopping package org.gortcloud.perledisaggezza uid=10044
D/PackageManager( 149): New package installed in /data/app/org.gortcloud.perledisaggezza-1.apk
W/PackageManager( 149): Not granting permission android.permission.READ_LOGS to package org.gortcloud.perledisaggezza (protectionLevel=50 flags=0x8be46)
I/ActivityManager( 149): Force stopping package org.gortcloud.perledisaggezza uid=10044
D/dalvikvm( 204): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 258): WAIT_FOR_CONCURRENT_GC blocked 1ms
D/dalvikvm( 204): GC_EXPLICIT freed 216K, 62% free 5881K/15367K, paused 8ms+19ms, total 155ms
D/dalvikvm( 258): GC_EXPLICIT freed 409K, 39% free 7423K/12103K, paused 8ms+22ms, total 156ms
D/dalvikvm( 323): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 323): GC_EXPLICIT freed 177K, 10% free 5564K/6151K, paused 8ms+9ms, total 88ms
I/InputReader( 149): Reconfiguring input devices. changes=0x00000010
D/PackageManager( 149): generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
D/PackageManager( 149): generateServicesMap(android.content.SyncAdapter): 4 services unchanged
D/BackupManagerService( 149): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:org.gortcloud.perledisaggezza flg=0x8000010 (has extras) }
D/dalvikvm( 149): WAIT_FOR_CONCURRENT_GC blocked 0ms
I/AccountTypeManager( 367): Loaded meta-data for 1 account types, 0 accounts in 53ms(wall) 5ms(cpu)
D/dalvikvm( 149): GC_EXPLICIT freed 503K, 15% free 8140K/9479K, paused 65ms+21ms, total 204ms
I/InputReader( 149): Reconfiguring input devices. changes=0x00000010
D/PackageManager( 149): generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
D/PackageManager( 149): generateServicesMap(android.content.SyncAdapter): 4 services unchanged
D/BackupManagerService( 149): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:org.gortcloud.perledisaggezza flg=0x8000010 (has extras) }
V/BackupManagerService( 149): removePackageParticipantsLocked: uid=10044 #1
V/BackupManagerService( 149): addPackageParticipantsLocked: #1
W/InputMethodManagerService( 149): Found no subtypes in a system IME: com.android.inputmethod.pinyin
I/AccountTypeManager( 367): Loaded meta-data for 1 account types, 0 accounts in 11ms(wall) 7ms(cpu)
I/Choreographer( 258): Skipped 533 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 149): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 367): GC_CONCURRENT freed 403K, 12% free 5471K/6215K, paused 100ms+14ms, total 174ms
W/RecognitionManagerService( 149): no available voice recognition services found
D/dalvikvm( 149): GC_EXPLICIT freed 400K, 14% free 8170K/9479K, paused 27ms+47ms, total 266ms
D/AndroidRuntime(14611): Shutting down VM
D/dalvikvm(14611): GC_CONCURRENT freed 101K, 78% free 458K/2048K, paused 2ms+1ms, total 13ms
D/jdwp (14611): Got wake-up signal, bailing out of select
D/dalvikvm(14611): Debugger has detached; object registry had 1 entries
I/AndroidRuntime(14611): NOTE: attach of thread 'Binder_3' failed
D/AndroidRuntime(14647):
D/AndroidRuntime(14647): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(14647): CheckJNI is ON
D/dalvikvm(14647): Trying to load lib libjavacore.so 0x0
D/dalvikvm(14647): Added shared lib libjavacore.so 0x0
D/dalvikvm(14647): Trying to load lib libnativehelper.so 0x0
D/dalvikvm(14647): Added shared lib libnativehelper.so 0x0
D/AndroidRuntime(14647): Calling main entry com.android.commands.am.Am
I/ActivityManager( 149): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=org.gortcloud.perledisaggezza/.MainActivity u=0} from pid 14647
W/WindowManager( 149): Failure taking screenshot for (123x221) to layer 21025
D/AndroidRuntime(14647): Shutting down VM
D/dalvikvm(14647): GC_CONCURRENT freed 102K, 77% free 489K/2048K, paused 1ms+2ms, total 11ms
D/jdwp (14647): Got wake-up signal, bailing out of select
D/dalvikvm(14647): Debugger has detached; object registry had 1 entries
I/AndroidRuntime(14647): NOTE: attach of thread 'Binder_3' failed
D/dalvikvm( 258): GC_CONCURRENT freed 539K, 38% free 7520K/12103K, paused 16ms+127ms, total 360ms
D/dalvikvm(14658): Not late-enabling CheckJNI (already on)
I/ActivityManager( 149): Start proc org.gortcloud.perledisaggezza for activity org.gortcloud.perledisaggezza/.MainActivity: pid=14658 uid=10044 gids={3003, 1028}
E/Trace (14658): error opening trace file: No such file or directory (2)
I/Choreographer( 149): Skipped 35 frames! The application may be doing too much work on its main thread.
D/ACRA (14658): ACRA is enabled for org.gortcloud.perledisaggezza, intializing...
D/ACRA (14658): Using default Report Fields
D/ACRA (14658): Looking for error files in /data/data/org.gortcloud.perledisaggezza/files
D/dalvikvm(14658): GC_FOR_ALLOC freed 179K, 9% free 5372K/5895K, paused 31ms, total 32ms
I/dalvikvm-heap(14658): Grow heap (frag case) to 5.965MB for 457616-byte allocation
D/dalvikvm(14658): GC_CONCURRENT freed 1K, 9% free 5817K/6343K, paused 19ms+13ms, total 61ms
D/dalvikvm(14658): GC_CONCURRENT freed 48K, 6% free 6322K/6663K, paused 15ms+4ms, total 65ms
D/dalvikvm(14658): WAIT_FOR_CONCURRENT_GC blocked 18ms
D/dalvikvm(14658): GC_FOR_ALLOC freed 48K, 6% free 6464K/6855K, paused 41ms, total 41ms
I/dalvikvm-heap(14658): Grow heap (frag case) to 7.234MB for 668816-byte allocation
D/dalvikvm(14658): GC_FOR_ALLOC freed <1K, 6% free 7117K/7559K, paused 58ms, total 58ms
D/dalvikvm(14658): GC_CONCURRENT freed <1K, 6% free 7117K/7559K, paused 16ms+4ms, total 64ms
I/Choreographer(14658): Skipped 58 frames! The application may be doing too much work on its main thread.
I/Choreographer(14658): Skipped 233 frames! The application may be doing too much work on its main thread.
D/gralloc_goldfish(14658): Emulator without GPU emulation detected.
I/ActivityManager( 149): Displayed org.gortcloud.perledisaggezza/.MainActivity: +1s713ms
I/Choreographer( 149): Skipped 61 frames! The application may be doing too much work on its main thread.
I/Choreographer( 149): Skipped 43 frames! The application may be doing too much work on its main thread.
I/Choreographer(14658): Skipped 271 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 243): GC_CONCURRENT freed 384K, 13% free 5798K/6599K, paused 4ms+4ms, total 36ms
I/Choreographer(14658): Skipped 46 frames! The application may be doing too much work on its main thread.
I/Choreographer( 149): Skipped 36 frames! The application may be doing too much work on its main thread.
D/dalvikvm(14692): Not late-enabling CheckJNI (already on)
I/ActivityManager( 149): Start proc org.gortcloud.perledisaggezza:remote for broadcast org.gortcloud.perledisaggezza/.AlarmReceiver: pid=14692 uid=10044 gids={3003, 1028}
E/Trace (14692): error opening trace file: No such file or directory (2)
D/ACRA (14692): ACRA is enabled for org.gortcloud.perledisaggezza, intializing...
D/ACRA (14692): Using default Report Fields
D/ACRA (14692): Looking for error files in /data/data/org.gortcloud.perledisaggezza/files
D/gralloc_goldfish(14692): Emulator without GPU emulation detected.
UnUsedService (starts from my activity by:
startService(new Intent(this, UnUsedService.class));
UnUsedService
public class UnUsedService extends Service {
//private PendingIntent pendingIntent;
#Override
public IBinder onBind(Intent intent) {
return null;
}
#Override
public void onCreate() {
super.onCreate();
Toast.makeText(this, "Service Created", Toast.LENGTH_LONG).show();
//startService(new Intent(this, UnUsedService.class));
}
#Override
public void onDestroy() {
super.onDestroy();
Toast.makeText(this, "Service Destroyed", Toast.LENGTH_LONG).show();
}
private PendingIntent pendingIntent;
#SuppressWarnings("deprecation")
#Override
public void onStart(Intent intent, int startId) {
// super.onStart();
super.onStart(intent, startId);
Toast.makeText(this, "Service Started", Toast.LENGTH_LONG).show();
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 32);
calendar.set(Calendar.SECOND, 0); AlarmManager am = (AlarmManager) getApplicationContext().getSystemService (Context.ALARM_SERVICE);
PendingIntent pi = PendingIntent.getService(getApplicationContext(), 0, new Intent(getApplicationContext(), AlarmReceiver.class), PendingIntent.FLAG_UPDATE_CURRENT);
am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pi);
am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis()+1000, AlarmManager.INTERVAL_DAY, pi);
}};
Receiver:
public class AlarmReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Alarm worked.", Toast.LENGTH_LONG).show();
}
}
I noticed that you're creating the wrong type of PendingIntent:
pendingIntent = PendingIntent.getService(UnUsedService.this, 0, myIntent, 0);
You want to target your BroadcastReceiver, so you need to use:
pendingIntent = PendingIntent.getBroadcast(AlarmReceiver.this, 0, myIntent, 0);
instead of this in your mainifest. .
try this
<activity android:name="com.example.mypackage.Index"></activity>
<activity android:name="com.example.mypackage.SendText"></activity>

Categories

Resources