Can't send and receive SMS with LineageOS 14.1 - java

I have got a problem with sending and receiving SMS from my mobile (Samsung Galaxy S3) which runs LineageOS 14.1-20170405-NIGHTLY-i9300.
Since a few weeks I can't either send or receive messages with the normal android messaging application and also with SMS applications from the Google Play Store.
I really don't know what to do and it seems like nobody else has got this problem...
The logcat says the following after I tried to send a message:
04-08 13:58:50.229 24428-24428/com.android.messaging I/MessagingApp: UI initiated message sending in conversation 3
04-08 13:58:50.365 24428-24635/com.android.messaging I/MessagingAppDataModel: InsertNewMessageAction: inserting new message
04-08 13:58:50.525 24428-24635/com.android.messaging E/MessagingApp: Uncaught exception in background thread Thread[IntentService[ActionService],5,main]
04-08 13:58:50.526 24428-24635/com.android.messaging E/MessagingApp: java.lang.NullPointerException: Uri must not be null
at android.os.Parcel.readException(Parcel.java:1690)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:476)
at android.content.ContentResolver.insert(ContentResolver.java:1279)
at com.android.messaging.sms.i.ahJ(SourceFile:879)
at com.android.messaging.sms.i.ahz(SourceFile:888)
at com.android.messaging.datamodel.action.InsertNewMessageAction.KA(SourceFile:378)
at com.android.messaging.datamodel.action.InsertNewMessageAction.IV(SourceFile:171)
at com.android.messaging.datamodel.action.ActionServiceImpl.Ji(SourceFile:305)
at com.android.messaging.datamodel.action.ActionServiceImpl.onHandleIntent(SourceFile:267)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
04-08 13:58:50.545 24428-24428/com.android.messaging E/AndroidRuntime: FATAL EXCEPTION: IntentService[ActionService]
Process: com.android.messaging, PID: 24428
java.lang.NullPointerException: Uri must not be null
at android.os.Parcel.readException(Parcel.java:1690)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:476)
at android.content.ContentResolver.insert(ContentResolver.java:1279)
at com.android.messaging.sms.i.ahJ(SourceFile:879)
at com.android.messaging.sms.i.ahz(SourceFile:888)
at com.android.messaging.datamodel.action.InsertNewMessageAction.KA(SourceFile:378)
at com.android.messaging.datamodel.action.InsertNewMessageAction.IV(SourceFile:171)
at com.android.messaging.datamodel.action.ActionServiceImpl.Ji(SourceFile:305)
at com.android.messaging.datamodel.action.ActionServiceImpl.onHandleIntent(SourceFile:267)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Does anybody know what I have to do now?
I really have no idea...
Thank you in advance!

Related

Media Recorder getActiveMicrophones() fail in real device

I'm trying to set media devices for webRTC conference and when I test from my Android emulator it runs fine but when I use getActiveMicrophones() method running a real phone it crashes with the following log:
D/AppRTCAudioManager: --- updateAudioDeviceState: wired headset=true, BT state=HEADSET_UNAVAILABLE
D/AppRTCAudioManager: Device status: available=[], selected=NONE, user selected=NONE
setAudioDeviceInternal(device=WIRED_HEADSET)
D/AppRTCAudioManager: New device status: available=[WIRED_HEADSET], selected=WIRED_HEADSET
D/ConferenceManager: onAudioManagerDevicesChanged: [WIRED_HEADSET], selected: WIRED_HEADSET
E/MediaRecorderJNI: MediaRecorder::getActiveMicrophones error -19
E/MediaRecorder: getActiveMicrophones failed:-5
I/MediaRecorder: getActiveMicrophones failed, fallback on routed device info
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.talentumtraining, PID: 18457
java.lang.RuntimeException: getRoutedDeviceId failed.
at android.media.MediaRecorder.native_getRoutedDeviceId(Native Method)
at android.media.MediaRecorder.getRoutedDevice(MediaRecorder.java:1354)
at android.media.MediaRecorder.getActiveMicrophones(MediaRecorder.java:1452)
at com.example.talentumtraining.fragment.FragmentClinicConfigurations$SoundMeter.getDevices(FragmentClinicConfigurations.java:522)
at com.example.talentumtraining.fragment.FragmentClinicConfigurations.onAudioManagerDevicesChanged(FragmentClinicConfigurations.java:405)
at com.example.talentumtraining.fragment.FragmentClinicConfigurations.access$000(FragmentClinicConfigurations.java:59)
at com.example.talentumtraining.fragment.FragmentClinicConfigurations$1.onAudioDeviceChanged(FragmentClinicConfigurations.java:228)
at io.antmedia.webrtcandroidframework.apprtc.CustomAppRTCAudioManager.updateAudioDeviceState(CustomAppRTCAudioManager.java:581)
at io.antmedia.webrtcandroidframework.apprtc.CustomAppRTCAudioManager.start(CustomAppRTCAudioManager.java:278)
at com.example.talentumtraining.fragment.FragmentClinicConfigurations.onStart(FragmentClinicConfigurations.java:224)
at androidx.fragment.app.Fragment.performStart(Fragment.java:2730)
at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:365)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1194)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1356)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1434)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1497)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)
at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2169)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1992)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1947)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1849)
at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:192)
at android.app.ActivityThread.main(ActivityThread.java:7049)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:913)
I don't see why it is failing. Any idea?
Thanks in advance.

How to fix `cannot be cast to java.lang.String` in RN?

I got this error in my RN application in Android:
06-06 16:37:54.455 7506-7569/system_process E/AudioTrack: Could not
get audio output for session 729, stream type -1, usage 13, sample
rate 48000, format 0x1, channel mask 0x3, flags 0x4 06-06 16:37:54.455
7506-7569/system_process E/SoundPool: Error creating AudioTrack 06-06
16:37:54.924 1286-1286/? E/EGL_emulation: tid 1286:
eglCreateSyncKHR(1669): error 0x3004 (EGL_BAD_ATTRIBUTE) 06-06
16:37:55.190 11821-11894/com.efiat_rn E/unknown:ReactNative: Exception
in native call
java.lang.ClassCastException: com.facebook.react.bridge.ReadableNativeMap cannot be cast to
java.lang.String
at com.facebook.react.bridge.ReadableNativeMap.getString(ReadableNativeMap.java:168)
at com.facebook.react.modules.dialog.DialogModule.showAlert(DialogModule.java:232)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:761) 06-06 16:37:55.191 11821-11894/com.efiat_rn E/unknown:ReactNative: Exception in native
call
java.lang.ClassCastException: com.facebook.react.bridge.ReadableNativeMap cannot be cast to
java.lang.String
at com.facebook.react.bridge.ReadableNativeMap.getString(ReadableNativeMap.java:168)
at com.facebook.react.modules.dialog.DialogModule.showAlert(DialogModule.java:232)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:154)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:761)
It runs perfectly fine on iOS version. It don't show me which JS I do wrong. and I have no clue or ideas on how to fix it. It prompts when I launch the application, when I dismiss the error message, I can see a half-load application, but not clickable. Is there any ideas on how can I start the debugging? Thanks.
In ReactNative you are calling a method of the native bridge which requires String parameters. But what you are actually sending is JsonObject.
Example,
const data = {message: "hello"}; // Consider this as your data
if you send this to the bridge, it will create a NativeArray and send it to native layer (But your layer's method expects String).
Now you have to convert the object to String and send it to the native layer
const strData = JSON.stringify(data);
Now send the strData to the native layer
(Comment below if you need more details or you can tell your error
more clearly to get some clear answer)

App crashes when restoring from background

I have static values that are deleted after my application is a long time in the background or after opening many different apps, causing that my app crashes.
I think that Android OS is removing data from my app or "killing" it.
Is there any way to keep my app's data to avoid this problem?
NOTE: I can't save this values on SharedPreferences or in a database because there are many HashMaps and ArrayLists, is too much information.
It is necessary that these values are static because I need them available in many classes o my app in any time.
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.proyect/com.proyect.gui.ActivityMenu}: java.lang.NullPointerException: println needs a message
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2266)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2316)
at android.app.ActivityThread.access$600(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1298)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:5225)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:741)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException: println needs a message
at android.util.Log.println_native(Native Method)
at android.util.Log.v(Log.java:117)
at com.proyect.gui.FragmentMenu.onActivityCreated(FragmentMenu.java:145)
at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1983)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1092)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1234)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2046)
at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:174)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:597)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
at android.app.Activity.performStart(Activity.java:5143)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2239)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2316) 
at android.app.ActivityThread.access$600(ActivityThread.java:150) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1298) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:213) 
at android.app.ActivityThread.main(ActivityThread.java:5225) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:525) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:741) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) 
at dalvik.system.NativeStart.main(Native Method) 
Change this:
Log.v("errorTag", e.getMessage());
To this:
String error = e.getMessage();
if(error == null)
error = "It's crashed here";
Log.v("errorTag", error );
OR SIMPLER
Log.v("errorTag", e );
The point is that e.getMessage() is null. So, always check if e.getMessage() is not null before print it

No Class Def Found Error Android-Bolts Parse

I am using Android Studio (latest version) for developing my app. I use Parse as a backend solution. Everything was working smooth until i found out that parse have new release and i wanted to upgrade from Parse-1.7.1.jar to Parse-1.8.3.jar (latest version).
Since parse now use Bolts lib i also added the library like this:
compile 'com.parse.bolts:bolts-android:1.1.4'
Parse.initialize();
Also i use the facebook-sdk for dont know if this have to do anything with this mess.
All i get in my Application onCreate method is this error
03-08 22:07:05.841 24519-24533/ant.flow E/dalvikvm﹕ Could not find class 'bolts.Task$TaskCompletionSource', referenced from method com.parse.ParsePinningEventuallyQueue.waitForOperationSetAndEventuallyPin
03-08 22:07:05.841 24519-24519/ant.flow E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: ant.flow, PID: 24519
java.lang.NoClassDefFoundError: bolts.BoltsExecutors
at bolts.Task.<clinit>(Task.java:31)
at com.parse.ParseSQLiteDatabase.<init>(ParseSQLiteDatabase.java:45)
at com.parse.ParseSQLiteDatabase.openDatabaseAsync(ParseSQLiteDatabase.java:33)
at com.parse.ParseSQLiteOpenHelper.getDatabaseAsync(ParseSQLiteOpenHelper.java:43)
at com.parse.ParseSQLiteOpenHelper.getWritableDatabaseAsync(ParseSQLiteOpenHelper.java:39)
at com.parse.OfflineStore.findAsync(OfflineStore.java:390)
at com.parse.OfflineStore.findAsync(OfflineStore.java:354)
at com.parse.ParsePin.getParsePin(ParsePin.java:22)
at com.parse.ParseQuery.countFromLocalDatastoreAsync(ParseQuery.java:885)
at com.parse.ParseQuery.access$1700(ParseQuery.java:78)
at com.parse.ParseQuery$22.call(ParseQuery.java:1132)
at com.parse.ParseQuery$22.call(ParseQuery.java:1128)
at com.parse.ParseQuery.doWithRunningCheck(ParseQuery.java:912)
at com.parse.ParseQuery.countInBackground(ParseQuery.java:1128)
at com.parse.ParseInstallation.hasCurrentInstallationAsync(ParseInstallation.java:88)
at com.parse.GcmRegistrar.updateAsync(GcmRegistrar.java:96)
at com.parse.Parse.initialize(Parse.java:240)
at ant.flow.SocialApplication.onCreate(SocialApplication.java:33)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4581)
at android.app.ActivityThread.access$1600(ActivityThread.java:161)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1325)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
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:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)

Android Array Out of Bound Exception

I have built a Android App thats has a WebView to show a mobile website within the app.
I have started to get this exception on one device particularly
This issue is not seen on other devices.
I went through the source code and it looks like an issue with Android. Can any one help me understand that if we can do anything else in the app to suppress this exception
Note: In the stack trace, there is nothing related to the app code
AndroidAppCrashDump {"brand":"samsung","model":"GT-S6312","sdk":16,"android":"4.1.2","appVersion":"1.1.15","manufacturer":"samsung"}----java.lang.ArrayIndexOutOfBoundsException: length=1; index=1109619192 at
java.util.Arrays.fill(Arrays.java:855) at
android.support.v4.widget.ViewDragHelper.clearMotionHistory(ViewDragHelper.java:773) at
android.support.v4.widget.ViewDragHelper.cancel(ViewDragHelper.java:499) at
android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:1031) at
android.support.v4.widget.DrawerLayout.onInterceptTouchEvent(DrawerLayout.java:868) at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1877) at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237) at
an droid.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979) at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237) at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979) at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2237) at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1979) at
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2177) at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1482) at
android.app.Activity.dispatchTouchEvent(Activity.java:2469) at
android.support.v7.app.ActionBarActivityDelegateICS$WindowCallbackWrapper.dispatchTouchEvent(ActionBarActivityDelegateICS.java:260) at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2125) at
android.view.View.dispatchPointerEvent(View.java:7414) at
android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3523) at
android.vi ew.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3455) at
android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4565) at
android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4543) at
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4647) at
android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171) at
android.os.MessageQueue.nativePollOnce(Native Method) at
android.os.MessageQueue.next(MessageQueue.java:125) at
android.os.Looper.loop(Looper.java:124) at
android.app.ActivityThread.main(ActivityThread.java:4963) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:511) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) at
dalvik.system.NativeStart.main(Native Method)

Categories

Resources