-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ANDROID] App Crashing In Combination with React Native Navigation #117
Comments
I am getting this issue too. :( Is there any fixes for this? |
i also get the same problem.
|
I have same issue , anyone solved it ? |
@JayricMok: I solved my problem by applying the fixed code from from @BunHouth in;
|
But this breaks control panel on notification. |
@mrsydster @BunHouth I applied , still having same issue |
@JayricMok can you show me your issue. |
@JayricMok Are you also using wix-react-native-navigation ? if you not using react-native-navigation it should be work without any error. is your project is available on github?. |
@BunHouth i using react-navigation https://reactnavigation.org/docs/intro/ |
@JayricMok it should not problem with that navigation. can you show me your error? |
@bdavid68 @JayricMok: Ahh the reason I am not getting that issue is because I disabled the notification from Audio Streaming. I am using Music Control instead for the notification control. |
@mrsydster can you explain more about how you mix the music control with audio streaming ? |
I use Audio Streaming for steaming the audio (obviously) and than I replaced the notifications control with Music Control. This is my code for the player:
|
@SydneyTR where to put your code ? put it inside |
@JayricMok: No this is just a component I wrote for the app, this can go into one of your screens, on which you want to display your player |
@SydneyTR now im using this modules |
@SydneyTR in your |
@SydneyTR how you disabled the notification from Audio Streaming ? |
Fix to sporadic NullPointerException issue found at tlenclos#117 (comment)
I am getting an error on Android (Google Pixel SDK25 8.0.0) when I run an app app that has React Native Navigation in combination with React Native Audio Streaming.
I get the following error:
09-30 16:41:40.535 3828-3828/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.xm, PID: 3828 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference at com.audioStreaming.ReactNativeAudioStreamingModule.getClassActivity(ReactNativeAudioStreamingModule.java:43) at com.audioStreaming.Signal.setData(Signal.java:66) at com.audioStreaming.ReactNativeAudioStreamingModule.onServiceConnected(ReactNativeAudioStreamingModule.java:78) at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1453) at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1481) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
The MainApplication.java is build up like this:
` package com.xm;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import com.reactnativenavigation.NavigationApplication;
import com.audioStreaming.ReactNativeAudioStreamingPackage;
import java.util.Arrays;
import java.util.List;
public class MainApplication extends NavigationApplication {
} `
When I remove the line
new ReactNativeAudioStreamingPackage()
the app will work. What am i doing wrong here or how can i fix it?The text was updated successfully, but these errors were encountered: