v1.8.2 Android auto linking not working with RN 61.5
See original GitHub issueV 1.8.2 doesn’t seem to be working correctly on RN 61.5. It builds fine with no errors/crashes, but the listener is never triggered.
I am not sure if I have everything installed correctly. I am very confused because on here https://www.npmjs.com/package/react-native-call-detection the install instructions say to edit the MainApplication.java
, settings.gradle
and build.gradle
files, but on github, it says Autolinking should work without manual changes
. Also, the example app seems like it needs to be updated to use autolinking.
The reason I think it is not working is because I am putting a debugger just inside the listener and it is never triggered. Here is the file I am using this in:
import { useState, useEffect } from 'react';
import { useDispatch } from 'react-redux';
import CallDetectorManager from 'react-native-call-detection';
import { DialerActionsConst } from 'reducers/dialer';
export default function CallDetectionSetup() {
const dispatch = useDispatch();
const [callDetector, setCallDetector] = useState();
useEffect(() => {
setupCallDetector();
return () => {
if (callDetector) {
callDetector.dispose();
}
};
}, []);
function setupCallDetector() {
debugger // this is being tripped
setCallDetector(new CallDetectorManager((event) => {
debugger // this is never being tripped
switch (event) {
case 'Offhook':
dispatch({ type: DialerActionsConst.CALL_CONNECTED });
break;
case 'Connected':
dispatch({ type: DialerActionsConst.CALL_CONNECTED });
break;
case 'Dialing':
dispatch({ type: DialerActionsConst.CALL_CONNECTED });
break;
case 'Disconnected':
dispatch({ type: DialerActionsConst.CALL_DISCONNECTED });
break;
default:
break;
}
}));
}
return null;
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
React native auto linking issue in Android (RN 0.61.5)
First, you need to try to run react-native unlink netinfo . Once you've unlinked the library you should use cocoapods , not react-native ......
Read more >My Android Auto app isn't working - Google Help
My Android Auto app isn't working · Check if your car is compatible · Check your USB cable · Check your car or...
Read more >Android Auto Won't Connect or Not Working? How to fix and ...
Is your Android Auto not connecting to your car? Here Christopher shows some common solutions and how to fix most immediate problems.
Read more >react-native/CHANGELOG.md at main - GitHub
Change autolink to match requirements for FlipperFolly working with Xcode 12.5 (c6f4611dcb by @kelset); Change podfile to rely on the autolink-ios rb file ......
Read more >Why Is Android Auto Not Working? 8 Troubleshooting Fixes
2. Update Your Phone and the Android Auto App · 3. Make Sure Your Phone Works With Android Auto · 4. Confirm That...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Apologies for delay. I have made a release. Closing the issue, feel free to reopen it, if the problem still persists.
Yes I believe the fix for that is not published to npm. If you use “react-native-call-detection”: “github:priteshrnandgaonkar/react-native-call-detection.git#d6e90c32188341b36508853eb743b9a475acdd5a”,
in your package.json then it works