AppInvites "Install" link doesn't open the app - android

It happens from time to time, also with Google's sample app (https://github.com/googlesamples/google-services/tree/master/android/appinvites). App is installed on device but instead of opening the app, "Install" link:
Opens web browser on Lollipop and earlier, than it suggests to "Open with play store"
Stucks on email client (Gmail) on Marshmallow. It seems that something is happening (status bar is blinking) but no app is opened.
Those are logs from Marshamallow (seems that Google apis returns some 401's):
09-10 08:14:12.692 795-813/? I/ActivityManager﹕ Displayed
com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity: +92ms
09-10 08:14:12.714 23045-23082/? E/Surface﹕ getSlotFromBufferLocked: unknown buffer: 0xa96e4530
09-10 08:14:12.752 795-804/? I/art﹕ Background partial concurrent mark sweep GC freed 599(43KB) AllocSpace objects, 0(0B) LOS objects, 30% free, 35MB/51MB, paused 2.199ms total 171.864ms
09-10 08:14:12.875 23045-23093/? E/Volley﹕ [20360] BasicNetwork.performRequest: Unexpected response code 401 for https://www.googleapis.com/plusdatamixer/v1/mutateonekey?alt=proto&key=AIzaSyAP-gfH3qvi6vgHZbSYwQ_XHqV_mXHhzIk
09-10 08:14:12.876 23045-23110/? E/AppInviteAgent﹕ Error communicating with server com.android.volley.AuthFailureError
09-10 08:14:12.896 795-1943/? I/ActivityManager﹕ START u0 {act=android.intent.action.VIEW dat=https://plus.google.com/... flg=0x14000000 cmp=com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity} from uid 10011 on display 0
09-10 08:14:12.978 23045-23112/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
09-10 08:14:13.024 1731-1731/? I/Keyboard.Facilitator﹕ onFinishInput()
09-10 08:14:13.047 795-813/? I/ActivityManager﹕ Displayed com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity: +88ms
09-10 08:14:13.070 23045-23082/? E/Surface﹕ getSlotFromBufferLocked: unknown buffer: 0xa96e4580
09-10 08:14:13.108 795-804/? I/art﹕ Background partial concurrent mark sweep GC freed 676(64KB) AllocSpace objects, 1(20KB) LOS objects, 30% free, 35MB/51MB, paused 2.421ms total 188.050ms
09-10 08:14:13.174 23045-23091/? E/Volley﹕ [20358] BasicNetwork.performRequest: Unexpected response code 401 for https://www.googleapis.com/plusdatamixer/v1/mutateonekey?alt=proto&key=AIzaSyAP-gfH3qvi6vgHZbSYwQ_XHqV_mXHhzIk
09-10 08:14:13.175 23045-23112/? E/AppInviteAgent﹕ Error communicating with server com.android.volley.AuthFailureError
09-10 08:14:13.184 795-3345/? I/ActivityManager﹕ START u0 {act=android.intent.action.VIEW dat=https://plus.google.com/... flg=0x14000000 cmp=com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity} from uid 10011 on display 0
09-10 08:14:13.266 23045-23081/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
09-10 08:14:13.307 1731-1731/? I/Keyboard.Facilitator﹕ onFinishInput()
09-10 08:14:13.318 795-813/? I/ActivityManager﹕ Displayed com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity: +86ms
09-10 08:14:13.343 23045-23082/? E/Surface﹕ getSlotFromBufferLocked: unknown buffer: 0xa96e4530
09-10 08:14:13.387 795-804/? I/art﹕ Background partial concurrent mark sweep GC freed 604(43KB) AllocSpace objects, 0(0B) LOS objects, 30% free, 35MB/51MB, paused 3.115ms total 181.567ms
09-10 08:14:13.480 23045-23092/? E/Volley﹕ [20359] BasicNetwork.performRequest: Unexpected response code 401 for https://www.googleapis.com/plusdatamixer/v1/mutateonekey?alt=proto&key=AIzaSyAP-gfH3qvi6vgHZbSYwQ_XHqV_mXHhzIk
09-10 08:14:13.481 23045-23081/? E/AppInviteAgent﹕ Error communicating with server com.android.volley.AuthFailureError
09-10 08:14:13.491 795-1194/? I/ActivityManager﹕ START u0 {act=android.intent.action.VIEW dat=https://plus.google.com/... flg=0x14000000 cmp=com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity} from uid 10011 on display 0
09-10 08:14:13.543 23045-23098/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
09-10 08:14:13.590 1731-1731/? I/Keyboard.Facilitator﹕ onFinishInput()
09-10 08:14:13.609 795-813/? I/ActivityManager﹕ Displayed com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity: +80ms
More logs:
09-10 08:35:58.327 2148-2728/? E/MDM﹕ [145] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
09-10 08:35:58.332 19279-22527/? D/LocationInitializer﹕ Restart initialization of location
09-10 08:35:58.335 22495-22495/? I/GAv4-SVC﹕ Google Analytics 7.9.53 is starting up.
09-10 08:35:58.338 795-1268/? I/AccountManagerService﹕ getTypesVisibleToCaller: isPermitted? true
09-10 08:35:58.355 22495-22526/? D/NativeLibraryUtils﹕ Install completed successfully.
09-10 08:35:58.384 22495-22534/? D/OpenGLRenderer﹕ Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-10 08:35:58.447 22495-22533/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
09-10 08:35:58.460 22495-22533/? I/GLSUser﹕ [ChannelManager] Attempting to channel bind connection HttpClient.
09-10 08:35:58.467 22495-22534/? I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 08/12/15, 70b1c55, I9e0bc0c0ce
09-10 08:35:58.479 22495-22533/? I/GLSUser﹕ [ChannelManager] Checking whether channelId is enabled. isEnabledGmsCore? false, isEnabledSdk? true, isAtLeastKitKat? true
09-10 08:35:58.484 22495-22534/? I/OpenGLRenderer﹕ Initialized EGL, version 1.4
09-10 08:35:58.521 1731-1731/? I/Keyboard.Facilitator﹕ onFinishInput()
09-10 08:35:58.539 795-813/? I/ActivityManager﹕ Displayed com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity: +368ms (total +399ms)
09-10 08:35:58.597 22495-22537/? W/System.err﹕ java.lang.Exception: Error converting session
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.a.log(SourceFile:302)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.a.toSession(SourceFile:268)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.ClientSessionContext.getSession(SourceFile:87)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.SSLParametersImpl.getCachedClientSession(SourceFile:709)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.SSLParametersImpl.getSessionToReuse(SourceFile:376)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.OpenSSLSocketImpl.startHandshake(SourceFile:294)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.common.net.SSLCertificateSocketFactory.a(SourceFile:258)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.common.net.SSLCertificateSocketFactory.createSocket(SourceFile:558)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:89)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.Connection.connect(Connection.java:143)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:245)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.http.GoogleHttpClient.a(SourceFile:933)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.http.GoogleHttpClient.a(SourceFile:775)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.http.GoogleHttpClient.execute(SourceFile:676)
09-10 08:35:58.599 22495-22537/? W/System.err﹕ at com.google.android.gms.http.GoogleHttpClient.execute(SourceFile:660)
09-10 08:35:58.600 22495-22537/? W/System.err﹕ at com.android.volley.toolbox.HttpClientStack.performRequest(SourceFile:87)
09-10 08:35:58.600 22495-22537/? W/System.err﹕ at com.google.android.gms.auth.be.d.performRequest(SourceFile:43)
09-10 08:35:58.600 22495-22537/? W/System.err﹕ at com.android.volley.toolbox.BasicNetwork.performRequest(SourceFile:96)
09-10 08:35:58.600 22495-22537/? W/System.err﹕ at com.google.android.gms.common.server.v.performRequest(SourceFile:48)
09-10 08:35:58.600 22495-22537/? W/System.err﹕ at com.android.volley.NetworkDispatcher.run(SourceFile:112)
09-10 08:35:58.600 22495-22537/? W/System.err﹕ Caused by: java.io.IOException: Invalid session data
09-10 08:35:58.603 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.OpenSSLSessionImpl.<init>(SourceFile:88)
09-10 08:35:58.603 22495-22537/? W/System.err﹕ at com.google.android.gms.org.conscrypt.a.toSession(SourceFile:267)
09-10 08:35:58.603 22495-22537/? W/System.err﹕ ... 27 more
Moreover - after a couple of hours it will start working for some time. Then it will stop.
Config details:
dependencies {
classpath 'com.android.tools.build:gradle:1.3'
classpath 'com.google.gms:google-services:1.3.0'
}
//...
compile 'com.google.android.gms:play-services-base:7.8.0'
compile 'com.google.android.gms:play-services-appinvite:7.8.0'
//...
targetSdkVersion 22

You should verify the link you used to do teh AppInvite

Related

AdMob making my app crash in release version

i just added AdMob to my app. Everything seem to work well when i debug or install release version of app (HTC m7). The problem occurs on CHUWI VX2 device (esky82_tb_cn_kk, Android 4.4). It is very strange because on this device my App works in debug mode but doesn't works in release version. I try turn of pro-gourd but it doesn't help me.
Any one have idea for that?
my manifest
instruction inside my onCreate method:
mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.setAdListener(new AdListener() {
#Override
public void onAdClosed() {
super.onAdClosed();
mAdView.setVisibility(View.GONE);
}
#Override
public void onAdOpened() {
super.onAdOpened();
mAdView.startAnimation(fade_in);
mAdView.setVisibility(View.VISIBLE);
}
#Override
public void onAdFailedToLoad(int errorCode) {
super.onAdFailedToLoad(errorCode);
mAdView.setVisibility(View.GONE);
}
#Override
public void onAdLoaded() {
super.onAdLoaded();
mAdView.startAnimation(fade_in);
mAdView.setVisibility(View.VISIBLE);
}
#Override
public void onAdLeftApplication() {
super.onAdLeftApplication();
mAdView.setVisibility(View.GONE);
}
});
mAdView.loadAd(adRequest);
code inside layout.xml
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.google.android.gms.ads.AdView android:id="#+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="#string/banner_ad_unit_id"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:visibility="gone">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
Crash log:
05-01 19:39:16.305 124-124/? I/SurfaceFlinger﹕ Skip composition for [Built-in Screen (type:0)] since dirtyRegion is empty
05-01 19:39:16.321 124-124/? I/SurfaceFlinger﹕ Skip composition for [Built-in Screen (type:0)] since dirtyRegion is empty
05-01 19:39:16.330 2162-2162/? D/AndroidRuntime﹕ Shutting down VM
05-01 19:39:16.330 2162-2162/? W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41d79c98)
05-01 19:39:16.330 2162-2162/? W/dalvikvm﹕ threadid=1: uncaught exception occurred
05-01 19:39:16.331 2162-2162/? W/System.err﹕ java.lang.RuntimeException: Unable to start activity ComponentInfo{freshfrog.pytomat/freshfrog.pytomat.Main}: java.lang.NullPointerException
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread.access$800(ActivityThread.java:151)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:110)
05-01 19:39:16.332 2162-2162/? W/System.err﹕ at android.os.Looper.loop(Looper.java:193)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5292)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
05-01 19:39:16.333 2162-2162/? W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ Caused by: java.lang.NullPointerException
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at freshfrog.pytomat.Main.onCreate(Main.java:450)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at android.app.Activity.performCreate(Activity.java:5264)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
05-01 19:39:16.334 2162-2162/? W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
05-01 19:39:16.335 2162-2162/? W/System.err﹕ ... 11 more
05-01 19:39:16.335 2162-2162/? W/dalvikvm﹕ threadid=1: calling UncaughtExceptionHandler
05-01 19:39:16.336 124-124/? I/SurfaceFlinger﹕ Skip composition for [Built-in Screen (type:0)] since dirtyRegion is empty
05-01 19:39:16.339 2162-2162/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: freshfrog.pytomat, PID: 2162
java.lang.RuntimeException: Unable to start activity ComponentInfo{freshfrog.pytomat/freshfrog.pytomat.Main}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at freshfrog.pytomat.Main.onCreate(Main.java:450)
at android.app.Activity.performCreate(Activity.java:5264)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2302)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
            at android.os.Handler.dispatchMessage(Handler.java:110)
            at android.os.Looper.loop(Looper.java:193)
            at android.app.ActivityThread.main(ActivityThread.java:5292)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
            at dalvik.system.NativeStart.main(Native Method)
05-01 19:39:16.341 654-669/? V/Provider/Settings﹕ from settings cache , name = dropbox:data_app_crash , value = null
05-01 19:39:16.342 654-669/? D/dalvikvm﹕ create interp thread : stack size=128KB
05-01 19:39:16.342 654-669/? D/dalvikvm﹕ create new thread
05-01 19:39:16.343 654-669/? D/dalvikvm﹕ new thread created
05-01 19:39:16.343 654-669/? D/dalvikvm﹕ update thread list
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ create interp thread : stack size=128KB
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ create new thread
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ new thread created
05-01 19:39:16.343 916-2188/? D/dalvikvm﹕ update thread list
05-01 19:39:16.343 654-2191/? D/dalvikvm﹕ threadid=82: interp stack at 0x64403000
05-01 19:39:16.343 654-2191/? D/dalvikvm﹕ threadid=82: created from interp
05-01 19:39:16.343 654-669/? D/dalvikvm﹕ start new thread
05-01 19:39:16.343 654-669/? V/Provider/Settings﹕ from settings cache , name = send_action_app_error , value = 1
05-01 19:39:16.343 654-669/? W/ActivityManager﹕ Force finishing activity freshfrog.pytomat/.Main
Logcat indicate this line (Main.java:450)
mAdView.setAdListener(new AdListener() {
what is this ?
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
what were you expecting? to hit both sides?
try this
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
and let the rest go
You are getting a NullPointerException on line 450 of Main.
Look at that line. Something there has not been initialised.
I solve my problem. This issue isn't connect with AdView. It was problem with project. I made small mistakes. I don't have this line
<?xml version="1.0" encoding="utf-8"?>
on the start of xml layout file. I don't know how it can event works.
I reboot device
I added missing line to xml
I clean project (Build > Clean Project)
I rebuild project (Build > Rebuild Project)
Then my apk starts work without progourd but crash when I enable this feature. So i find this solution
I configure progourd configuration file like this.

Android - Intent makes my app crash

I am creating an app on Android, which involves an Activity and a service. One of the components of the service is meant to send a signal to the MainActivity, which will execute some specific code. The problem is, trying to send the intent makes the app crash.
Here is the code that sends the intent. Note that it resides in the inside of a doInBackground function of an AsyncTask object, which resides inside the said service:
#Override
protected String doInBackground(Socket... client) {
Intent received = new Intent();
received.setAction("com.mycompany.Messenger.MESSAGE_RECEIVED");
sendBroadcast(received);
}
Note that if I comment out sendBroadcast(received), the app does not crash.
Here is the handler of the Intent inside MainActivity (which has the name ChatBubbleActivity in my app):
public class MessageReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
if(intent.getAction().equals(MESSAGE_RECEIVED)) {
String current_message = "Intent works!";
TextView textView = (TextView) findViewById(R.id.myText);
textView.setText(current_message);
}
}
}
And this is the declaration of the Receiver in manifest:
<receiver android:name=".ChatBubbleActivity$MessageReceiver">
<intent-filter>
<action android:name="com.mycompany.Messenger.MESSAGE_RECEIVED"/>
</intent-filter>
</receiver>
, inside the <activity> chunk.
What is it that I might be missing?
EDIT:New version of code based on answers, still crashing.
EDIT logcat:
02-04 16:17:32.444 487-489/? D/dalvikvm﹕ GC_CONCURRENT freed 1662K, 22% free 6885K/8728K, paused 2ms+2ms, total 42ms
02-04 16:17:32.876 1275-1275/? D/AndroidRuntime﹕ >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-04 16:17:32.912 1275-1275/? D/AndroidRuntime﹕ CheckJNI is OFF
02-04 16:17:32.960 1275-1275/? D/dalvikvm﹕ Trying to load lib libjavacore.so 0x0
02-04 16:17:32.964 1275-1275/? D/dalvikvm﹕ Added shared lib libjavacore.so 0x0
02-04 16:17:32.968 1275-1275/? D/dalvikvm﹕ Trying to load lib libnativehelper.so 0x0
02-04 16:17:32.972 1275-1275/? D/dalvikvm﹕ Added shared lib libnativehelper.so 0x0
02-04 16:17:32.972 1275-1275/? D/dalvikvm﹕ No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
02-04 16:17:33.020 1275-1275/? D/dalvikvm﹕ Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
02-04 16:17:33.128 1275-1275/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
02-04 16:17:33.132 1275-1275/? E/android.os.Debug﹕ failed to load memtrack module: -2
02-04 16:17:33.264 1275-1275/? D/AndroidRuntime﹕ Calling main entry com.android.commands.am.Am
02-04 16:17:33.284 487-617/? I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity} from pid 1275
02-04 16:17:33.692 1275-1275/? D/AndroidRuntime﹕ Shutting down VM
02-04 16:17:33.692 1275-1279/? D/dalvikvm﹕ GC_CONCURRENT freed 95K, 15% free 576K/676K, paused 1ms+0ms, total 1ms
02-04 16:17:33.884 487-538/? I/ActivityManager﹕ Start proc com.mycompany.messenger for activity com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity: pid=1286 uid=10059 gids={50059, 3003}
02-04 16:17:33.932 1286-1286/? D/dalvikvm﹕ Late-enabling CheckJNI
02-04 16:17:34.228 1286-1286/? D/dalvikvm﹕ GC_FOR_ALLOC freed 60K, 4% free 2873K/2992K, paused 6ms, total 7ms
02-04 16:17:34.236 1286-1286/? I/dalvikvm-heap﹕ Grow heap (frag case) to 3.338MB for 500412-byte allocation
02-04 16:17:34.248 1286-1295/? D/dalvikvm﹕ GC_FOR_ALLOC freed <1K, 4% free 3362K/3484K, paused 11ms, total 11ms
02-04 16:17:34.252 1286-1290/? D/dalvikvm﹕ GC_CONCURRENT freed 0K, 4% free 3362K/3484K, paused 1ms+0ms, total 5ms
02-04 16:17:34.696 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libEGL_genymotion.so
02-04 16:17:34.708 1286-1286/? D/﹕ HostConnection::get() New Host Connection established 0xb7944cb0, tid 1286
02-04 16:17:34.744 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_genymotion.so
02-04 16:17:34.744 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libGLESv2_genymotion.so
02-04 16:17:34.816 1286-1286/? W/EGL_genymotion﹕ eglSurfaceAttrib not implemented
02-04 16:17:34.820 1286-1286/? E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from GradienCache
02-04 16:17:34.824 1286-1286/? E/OpenGLRenderer﹕ MAX_TEXTURE_SIZE: 8192
02-04 16:17:34.848 1286-1286/? E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
02-04 16:17:34.848 1286-1286/? E/OpenGLRenderer﹕ MAX_TEXTURE_SIZE: 8192
02-04 16:17:34.852 1286-1286/? D/OpenGLRenderer﹕ Enabling debug mode 0
02-04 16:17:34.932 1286-1300/? W/dalvikvm﹕ threadid=12: thread exiting with uncaught exception (group=0xa4d31b20)
02-04 16:17:34.932 1286-1300/? E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #2
Process: com.mycompany.messenger, PID: 1286
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:1050)
at android.app.ContextImpl.startActivity(ContextImpl.java:1037)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:311)
at com.mycompany.Messenger.LocalService$DownloadWebpageTask2.doInBackground(LocalService.java:118)
at com.mycompany.Messenger.LocalService$DownloadWebpageTask2.doInBackground(LocalService.java:113)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:841)
02-04 16:17:34.936 487-617/? W/ActivityManager﹕ Force finishing activity com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity
02-04 16:17:35.180 487-840/? W/InputMethodManagerService﹕ Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#529ef2ac (uid=10059 pid=1286)
02-04 16:17:35.288 487-617/? I/WindowManager﹕ Screenshot max retries 4 of Token{52998cec ActivityRecord{5294f214 u0 com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity t4 f}} appWin=Window{52948c58 u0 Starting com.mycompany.messenger} drawState=4
02-04 16:17:35.288 487-617/? W/WindowManager﹕ Screenshot failure taking screenshot for (800x1280) to layer 21015
02-04 16:17:38.512 487-502/? I/Choreographer﹕ Skipped 188 frames! The application may be doing too much work on its main thread.
02-04 16:17:38.516 711-711/? I/Choreographer﹕ Skipped 185 frames! The application may be doing too much work on its main thread.
02-04 16:17:39.708 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:17:40.536 711-711/? W/EGL_genymotion﹕ eglSurfaceAttrib not implemented
02-04 16:17:41.260 487-502/? I/Choreographer﹕ Skipped 35 frames! The application may be doing too much work on its main thread.
02-04 16:17:49.560 1286-1300/? I/Process﹕ Sending signal. PID: 1286 SIG: 9
02-04 16:17:49.580 487-616/? W/InputMethodManagerService﹕ Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#52963b68 attribute=null, token = android.os.BinderProxy#5290713c
02-04 16:17:49.644 487-840/? I/ActivityManager﹕ Process com.mycompany.messenger (pid 1286) has died.
02-04 16:17:49.716 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:17:59.720 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:09.728 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:19.736 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:29.744 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:39.752 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:49.756 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:59.764 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:09.772 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:19.780 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:29.788 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:39.792 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:49.800 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
Do you want to start an activity or send a broadcast? I don't understand your code.
You are starting an activity from a background thread, that's not allowed.
In your AsyncTask, the method protected String doInBackground(Socket... client) is the only one that doesn't run in the UI thread.
When ever you want to start your Broadcast Receiver you don't call it as an acitivty
Your Method
Intent received = new Intent(ChatBubbleActivity.MESSAGE_RECEIVED);
received.putExtra("current", "Intent is working!!");
startActivity(received);
What it should be
Intent intent = new Intent();
intent.setAction("com.tutorialspoint.CUSTOM_INTENT");
sendBroadcast(intent);
Have a look at these tutorials
Vogella
TutorialsPoint

Calling autoFocus() from parent Activity returns NPE

I have instantiated a fragment type that extends CameraFragment (and implements TabListener), and I am trying to call the autoFocus() from the the parent Activity. Calling autoFocus() from the fragment that extends CameraFragment works fine, but calling it from the parent Activity results in an NPE. I am listening for a onKeyDown() event in the main Activity, which works as expected as per the logcat. Here is my NPE trace:
09-10 10:00:16.410: D/app(5283): onKeyDown: 80
09-10 10:00:16.415: D/AndroidRuntime(5283): Shutting down VM
09-10 10:00:16.415: W/dalvikvm(5283): threadid=1: thread exiting with uncaught exception (group=0x40f7b2a0)
09-10 10:00:16.425: E/AndroidRuntime(5283): FATAL EXCEPTION: main
09-10 10:00:16.425: E/AndroidRuntime(5283): java.lang.NullPointerException
09-10 10:00:16.425: E/AndroidRuntime(5283): at com.commonsware.cwac.camera.CameraFragment.autoFocus(CameraFragment.java:96)
09-10 10:00:16.425: E/AndroidRuntime(5283): at com.me.app.appCameraFragment.callAutoFocus(cameraFragment.java:232)
09-10 10:00:16.425: E/AndroidRuntime(5283): at com.me.app.MainTabActivity.onKeyDown(MainTabActivity.java:264)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.view.KeyEvent.dispatch(KeyEvent.java:2705)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.app.Activity.dispatchKeyEvent(Activity.java:2423)
09-10 10:00:16.425: E/AndroidRuntime(5283): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2019)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3851)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.view.ViewRootImpl.handleImeFinishedEvent(ViewRootImpl.java:3799)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:2934)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.os.Looper.loop(Looper.java:137)
09-10 10:00:16.425: E/AndroidRuntime(5283): at android.app.ActivityThread.main(ActivityThread.java:4921)
09-10 10:00:16.425: E/AndroidRuntime(5283): at java.lang.reflect.Method.invokeNative(Native Method)
09-10 10:00:16.425: E/AndroidRuntime(5283): at java.lang.reflect.Method.invoke(Method.java:511)
09-10 10:00:16.425: E/AndroidRuntime(5283): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1036)
09-10 10:00:16.425: E/AndroidRuntime(5283): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:803)
09-10 10:00:16.425: E/AndroidRuntime(5283): at dalvik.system.NativeStart.main(Native Method)
I'm not sure what version of the code you are working on, but line 96 is a closing brace in the current CameraFragment.
The only way autoFocus() can crash with a NullPointerException is if cameraView is null, and the only way cameraView should be null is if onCreateView() has not yet been called. You need the fragment to be visible and fully created before you request auto-focus.

can not load native library

I am developing a epub reader application, when I am loading it it shows a error that the reader cannot load native library, below I am attaching the log cat of the file.
11-05 15:41:01.980: I/Process(445): Sending signal. PID: 445 SIG: 9
11-05 15:41:02.090: I/ActivityManager(70): Process org.geometerplus.zlibrary.ui.android (pid 445) has died.
11-05 15:41:02.115: E/InputDispatcher(70): channel '406f9968 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Consumer closed input channel or an error occurred. events=0x8
11-05 15:41:02.115: E/InputDispatcher(70): channel '406f9968 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Channel is unrecoverably broken and will be disposed!
11-05 15:41:02.175: I/WindowManager(70): WIN DEATH: Window{406f9968 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:41:02.235: I/WindowManager(70): WIN DEATH: Window{406ffa08 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:41:02.425: I/WindowManager(70): WIN DEATH: Window{40705430 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:41:02.565: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=181, events=0x8
11-05 15:41:02.565: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=185, events=0x8
11-05 15:41:02.785: I/ActivityManager(70): Start proc org.geometerplus.zlibrary.ui.android:crash for activity org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: pid=468 uid=10044 gids={3003, 1015}
11-05 15:41:06.005: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: +3s304ms (total +18s82ms)
11-05 15:41:13.185: D/dalvikvm(328): GC_EXPLICIT freed 321K, 54% free 2540K/5511K, external 1625K/2137K, paused 107ms
11-05 15:41:15.705: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 15:41:21.855: D/dalvikvm(285): GC_EXPLICIT freed 9K, 55% free 2595K/5767K, external 1625K/2137K, paused 74ms
11-05 15:45:38.435: I/ActivityManager(70): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader } from pid 145
11-05 15:45:38.855: I/ActivityManager(70): Start proc org.geometerplus.zlibrary.ui.android for activity org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: pid=477 uid=10044 gids={3003, 1015}
11-05 15:45:44.916: D/dalvikvm(70): GREF has increased to 401
11-05 15:45:45.376: D/dalvikvm(477): GC_EXPLICIT freed 435K, 51% free 3062K/6151K, external 1625K/2137K, paused 117ms
11-05 15:45:45.555: D/dalvikvm(477): GC_EXPLICIT freed 5K, 51% free 3057K/6151K, external 1625K/2137K, paused 109ms
11-05 15:45:45.685: D/dalvikvm(477): GC_EXPLICIT freed 13K, 51% free 3048K/6151K, external 1625K/2137K, paused 83ms
11-05 15:45:45.836: D/dalvikvm(477): GC_EXTERNAL_ALLOC freed 1K, 51% free 3057K/6151K, external 1625K/2137K, paused 114ms
11-05 15:45:46.345: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: +7s531ms
11-05 15:45:48.975: W/dalvikvm(477): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/geometerplus/fbreader/formats/PluginCollection;
11-05 15:45:48.985: W/dalvikvm(477): threadid=9: thread exiting with uncaught exception (group=0x40015560)
11-05 15:45:49.046: W/System.err(477): java.lang.ExceptionInInitializerError
11-05 15:45:49.067: W/System.err(477): at org.geometerplus.fbreader.library.Book.getPlugin(Book.java:159)
11-05 15:45:49.067: W/System.err(477): at org.geometerplus.fbreader.library.Book.<init>(Book.java:135)
11-05 15:45:49.075: W/System.err(477): at org.geometerplus.fbreader.library.Book.getByFile(Book.java:96)
11-05 15:45:49.086: W/System.err(477): at org.geometerplus.fbreader.fbreader.FBReaderApp.openBookInternal(FBReaderApp.java:233)
11-05 15:45:49.115: W/System.err(477): at org.geometerplus.fbreader.fbreader.FBReaderApp$1.run(FBReaderApp.java:157)
11-05 15:45:49.115: W/System.err(477): at org.geometerplus.android.util.UIUtil$3$1.run(UIUtil.java:120)
11-05 15:45:49.125: W/System.err(477): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load NativeFormats-v2: findLibrary returned null
11-05 15:45:49.125: W/System.err(477): at java.lang.Runtime.loadLibrary(Runtime.java:429)
11-05 15:45:49.146: W/System.err(477): at java.lang.System.loadLibrary(System.java:554)
11-05 15:45:49.146: W/System.err(477): at org.geometerplus.fbreader.formats.PluginCollection.<clinit>(PluginCollection.java:33)
11-05 15:45:49.166: W/System.err(477): ... 6 more
11-05 15:45:49.177: I/ActivityManager(70): Starting: Intent { act=android.fbreader.action.CRASH dat=ExceptionInInitializerError: cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity } from pid 477
11-05 15:45:49.325: I/Process(477): Sending signal. PID: 477 SIG: 9
11-05 15:45:49.578: I/ActivityManager(70): Process org.geometerplus.zlibrary.ui.android (pid 477) has died.
11-05 15:45:49.586: E/InputDispatcher(70): channel '407cc278 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Consumer closed input channel or an error occurred. events=0x8
11-05 15:45:49.586: E/InputDispatcher(70): channel '407cc278 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Channel is unrecoverably broken and will be disposed!
11-05 15:45:49.805: W/ActivityManager(70): Activity pause timeout for HistoryRecord{406e37c0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader}
11-05 15:45:49.975: I/WindowManager(70): WIN DEATH: Window{407cc278 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:45:50.146: I/WindowManager(70): WIN DEATH: Window{407e92f0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:45:50.265: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=152, events=0x8
11-05 15:45:50.746: D/dalvikvm(468): GC_EXTERNAL_ALLOC freed 312K, 50% free 2954K/5895K, external 2032K/2137K, paused 229ms
11-05 15:45:51.055: W/InputManagerService(70): Got RemoteException sending setActive(false) notification to pid 477 uid 10044
11-05 15:45:53.208: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: +2s884ms
11-05 15:45:57.405: W/IInputConnectionWrapper(145): showStatusIcon on inactive InputConnection
11-05 15:46:05.297: D/dalvikvm(456): GC_EXPLICIT freed 76K, 52% free 2633K/5379K, external 1625K/2137K, paused 143ms
11-05 15:46:10.276: D/dalvikvm(468): GC_EXPLICIT freed 13K, 50% free 2964K/5895K, external 2379K/2971K, paused 111ms
11-05 15:46:15.775: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 15:50:04.305: I/ActivityManager(70): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader } from pid 145
11-05 15:50:04.495: I/ActivityManager(70): Start proc org.geometerplus.zlibrary.ui.android for activity org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: pid=491 uid=10044 gids={3003, 1015}
11-05 15:50:09.456: D/dalvikvm(491): GC_EXPLICIT freed 454K, 51% free 3062K/6151K, external 1625K/2137K, paused 139ms
11-05 15:50:09.765: D/dalvikvm(491): GC_EXPLICIT freed 7K, 51% free 3057K/6151K, external 1625K/2137K, paused 148ms
11-05 15:50:09.945: D/dalvikvm(491): GC_EXPLICIT freed 1K, 51% free 3057K/6151K, external 1625K/2137K, paused 146ms
11-05 15:50:10.435: D/dalvikvm(491): GC_EXTERNAL_ALLOC freed 11K, 51% free 3057K/6151K, external 1625K/2137K, paused 424ms
11-05 15:50:11.325: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader: +6s905ms
11-05 15:50:13.985: W/dalvikvm(491): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/geometerplus/fbreader/formats/PluginCollection;
11-05 15:50:13.997: W/dalvikvm(491): threadid=9: thread exiting with uncaught exception (group=0x40015560)
11-05 15:50:14.166: W/System.err(491): java.lang.ExceptionInInitializerError
11-05 15:50:14.166: W/System.err(491): at org.geometerplus.fbreader.library.Book.getPlugin(Book.java:159)
11-05 15:50:14.166: W/System.err(491): at org.geometerplus.fbreader.library.Book.<init>(Book.java:135)
11-05 15:50:14.166: W/System.err(491): at org.geometerplus.fbreader.library.Book.getByFile(Book.java:96)
11-05 15:50:14.175: W/System.err(491): at org.geometerplus.fbreader.fbreader.FBReaderApp.openBookInternal(FBReaderApp.java:233)
11-05 15:50:14.175: W/System.err(491): at org.geometerplus.fbreader.fbreader.FBReaderApp$1.run(FBReaderApp.java:157)
11-05 15:50:14.185: W/System.err(491): at org.geometerplus.android.util.UIUtil$3$1.run(UIUtil.java:120)
11-05 15:50:14.185: W/System.err(491): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load NativeFormats-v2: findLibrary returned null
11-05 15:50:14.185: W/System.err(491): at java.lang.Runtime.loadLibrary(Runtime.java:429)
11-05 15:50:14.235: W/System.err(491): at java.lang.System.loadLibrary(System.java:554)
11-05 15:50:14.235: W/System.err(491): at org.geometerplus.fbreader.formats.PluginCollection.<clinit>(PluginCollection.java:33)
11-05 15:50:14.235: W/System.err(491): ... 6 more
11-05 15:50:14.365: I/ActivityManager(70): Starting: Intent { act=android.fbreader.action.CRASH dat=ExceptionInInitializerError: cmp=org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity } from pid 491
11-05 15:50:14.456: I/Process(491): Sending signal. PID: 491 SIG: 9
11-05 15:50:14.621: I/ActivityManager(70): Process org.geometerplus.zlibrary.ui.android (pid 491) has died.
11-05 15:50:14.665: E/InputDispatcher(70): channel '4076a8e0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Consumer closed input channel or an error occurred. events=0x8
11-05 15:50:14.665: E/InputDispatcher(70): channel '4076a8e0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader (server)' ~ Channel is unrecoverably broken and will be disposed!
11-05 15:50:14.786: I/WindowManager(70): WIN DEATH: Window{4076a8e0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:50:14.936: W/ActivityManager(70): Activity pause timeout for HistoryRecord{40613df0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader}
11-05 15:50:15.376: I/WindowManager(70): WIN DEATH: Window{40611fa0 org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.FBReader paused=true}
11-05 15:50:15.697: E/InputDispatcher(70): Received spurious receive callback for unknown input channel. fd=152, events=0x8
11-05 15:50:16.796: W/InputManagerService(70): Got RemoteException sending setActive(false) notification to pid 491 uid 10044
11-05 15:50:19.055: I/ActivityManager(70): Displayed org.geometerplus.zlibrary.ui.android/org.geometerplus.android.fbreader.crash.MissingNativeLibraryActivity: +3s151ms
11-05 15:50:24.215: D/dalvikvm(145): GC_EXPLICIT freed 170K, 50% free 3020K/6023K, external 6250K/7660K, paused 141ms
11-05 15:50:29.247: D/dalvikvm(456): GC_EXPLICIT freed 3K, 52% free 2632K/5379K, external 1625K/2137K, paused 130ms
11-05 15:51:15.785: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 15:56:15.819: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:01:15.875: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:06:17.818: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:11:17.846: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:16:17.860: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:21:17.887: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:26:17.895: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:30:38.037: D/PerformBackupThread(70): starting agent for backup of BackupRequest{app=ApplicationInfo{405c2c30 com.android.providers.settings} full=false}
11-05 16:30:38.138: D/BackupManagerService(70): awaiting agent for ApplicationInfo{405c2c30 com.android.providers.settings}
11-05 16:30:38.145: D/BackupManagerService(70): agentConnected pkg=com.android.providers.settings agent=android.app.backup.BackupAgent$BackupServiceBinder#40701198
11-05 16:30:38.445: V/LocalTransport(70): finishBackup()
11-05 16:31:17.939: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:36:17.975: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:41:18.036: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:46:18.105: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:47:00.296: D/dalvikvm(127): GC_CONCURRENT freed 353K, 53% free 2745K/5767K, external 2179K/2672K, paused 24ms+8ms
11-05 16:51:18.136: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:56:18.147: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol
11-05 16:56:52.975: I/dalvikvm(70): Jit: resizing JitTable from 2048 to 4096
11-05 16:58:48.395: D/dalvikvm(70): GC_CONCURRENT freed 972K, 51% free 4474K/9095K, external 3125K/3903K, paused 34ms+16ms
11-05 17:01:18.197: D/SntpClient(70): request time failed: java.net.SocketException: Address family not supported by protocol

File write permission error in Android

I am writing a file to SDCard and set <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> it works good upto 3.x but on 4.0 it gives the below error.
java.io.IOException: open failed: EACCES (Permission denied)
at java.io.File.createNewFile(File.java:940)
at com.gt.mLearning.app.VideoViewActivity.copyFile(VideoViewActivity.java:204)
at com.gt.mLearning.app.VideoViewActivity.access$3(VideoViewActivity.java:193)
at com.gt.mLearning.app.VideoViewActivity$Loader.doInBackground(VideoViewActivity.java:61)
at com.gt.mLearning.app.VideoViewActivity$Loader.doInBackground(VideoViewActivity.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:264)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)
Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at java.io.File.createNewFile(File.java:933)
Any help or suggestion?
rohit
Just guessing but did you probably have your phone still connected to the computer? This error might happen if your sd card is still locked as a usb device.
Hope this helped,
Tobias
Latter on I discovered that the issue is device specific. I installed the File Manager app from Android market and it shows no write permission. It mean the Android OS implementation of that manufacturer do not provide write permission which is causing the issue.
Probably you have hard-coded the external storage directory and it works on particular devices.
Environment.getExternalStorageDirectory();
Posting your code will help much more than just the log.
You may check you've just updated your Android O/S, too. Some major change cause sdcard problem. For me, I update my Android O/S in SHV-E160K from 2.3.5 to 4.1.2 with Odin which is samsung firmware update application. And I faced problem.
My detailed error message is as follows :
02-14 11:00:43.057 22288-22288/? W/System.err﹕ java.io.IOException: open failed: EACCES (Permission denied)
02-14 11:00:43.057 22288-22288/? W/System.err﹕ at java.io.File.createNewFile(File.java:940)
02-14 11:00:43.057 22288-22288/? W/System.err﹕ at com.sec.android.util.IAPDeviceInfoEditor.activity.EditorActivity.createDeviceInfo(EditorActivity.java:222)
02-14 11:00:43.057 22288-22288/? W/System.err﹕ at com.sec.android.util.IAPDeviceInfoEditor.activity.EditorActivity.onClick(EditorActivity.java:121)
02-14 11:00:43.057 22288-22288/? W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
02-14 11:00:43.057 22288-22288/? W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:511)
02-14 11:00:43.057 22288-22288/? W/System.err﹕ at android.view.View$1.onClick(View.java:3685)
02-14 11:00:43.057 22288-22288/? W/System.err﹕ at android.view.View.performClick(View.java:4192)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at android.view.View$PerformClick.run(View.java:17248)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:615)
02-14 11:00:43.067 172-485/? V/AudioHardwareMSM8660﹕ open driver
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:92)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at android.os.Looper.loop(Looper.java:137)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:4950)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:511)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:997)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:764)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at libcore.io.Posix.open(Native Method)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ at java.io.File.createNewFile(File.java:933)
02-14 11:00:43.067 22288-22288/? W/System.err﹕ ... 16 more
The reason is 4.1.2 couldn't recognize file system in 2.3.5. I solve this formatting sdcard storage. format doesn't mean delete your personal information such as address, memo or history. After format, it works like magic.
This may help you.
I faced the same issue when writing the file on sdcard. I have set all required permission to write the file but i used file object like below:
Wrong :
File myFile = new File(Environment.getExternalStorageDirectory().getAbsoluteFile()+fileName);
Correct:
File myFile = new File(Environment.getExternalStorageDirectory().getAbsoluteFile(), fileName);
That means the path was wrong.

Categories

Resources