Expo push-notification not working in production - android

SDK Version: 40
Platforms(Android/iOS/web/all): Android
The push notification is only working in development mode in development device it’s not working in development mode in other device… (fcm setted) after I build using bundleRelease (eject) and published to playstore. it’s not working could I set as production in google console or expo console ? where ? I’m testing with insomnia (exp.host/–/api/v2/push/send) and it’s ok in development, but not in other devices and production , why working in one device and not in others device in test ? I see the exponent push generated after install as well
I recently tried:
// Notifications.setNotificationHandler(null); //tried as well
Notifications.setNotificationHandler({
handleNotification: async () => {
return {
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: false,
};
},
});
the problem is caused because I’m using gradlew assembleRelease to build ? Need I build with eas build platform android ???
I'm currently using exeperienceId: #username/slug and not ApplicationId to register the push tokens

Related

How to tell where React Native app is getting over the air (OTA) / Live updates?

I am very new to React Native and Expo. I am now assigned to work on our company mobile app. While doing a build and pushing to Test Flight in Apple Connect, I noticed that my test code is getting Over the Air updated and going live. This is a big problem.
How do I tell from where my app is getting updated live?
I am using the Expo build tools. I checked the configuration for updates in the expo section of the app.json file. It looked like this:
"updates": {
"fallbackToCacheTimeout": 0,
},
Reading the Expo documentation it says the enabled flag is set to true by default. I assumed that was it, so I set the enabled to false.
"updates": {
"fallbackToCacheTimeout": 0,
"enabled": false
},
But my push, which just updated the version number in the app, was pushed live after the app was restarted.
From reading online the behavior is exactly like the Expo OTA update or Microsofts "Code Push". In other words, when users open the app after it's been closed it is the old version. But once they restart, the app updates to the new version.
My build process is this after pushing to my remote git repository:
expo build:ios
Then after the build is queued and builds, I take the download URL and download the .ipa bundle. From there, I use Transporter to check/upload the bundle to Test Flight. Once in Test Flight, I wait until it's done "processing", then I answer the compliance questions (encryption export).
THAT'S IT! I don't create a release in the production side or even touch that.
HOWEVER, if users (who are not beta tester BTW) close and open their app a few times, they get that version that is sitting out in test flight.
I know it's an OTA update for sure because I never issue the expo build:android command but yet....my android phone gets updated too.
I am at my wits end trying to track down where this thing is getting updated. The original developer of the app doesn't have any idea either (i.e. no help).
Any thoughts on how to tell where the thing is being hosted and how it's getting updated.
The reason you are seeing the updates to your production app is because each time you create a new build, expo "publishes" your latest build which pushes any changes OTA to all users unless you use 'release channels'.
Here is the expo documentation supporting the above statement:
https://docs.expo.dev/classic/building-standalone-apps/#3-start-the-build
"Please note: When you run expo build, Expo automatically publishes your app (with expo publish). In order to avoid accidentally publishing changes to your production app, you may want to use release channels."
https://docs.expo.dev/distribution/release-channels/
Once you establish a release channel separate from your production build, you can build separately, and publish OTA updates to that separate build apart from your app that is already live.
This may go without saying, but you can revert your production app using expo publish. As it stands with your current release channel setup, this will also update your TestFlight app.

Android device not recognized by flutter when installing app

I've finished the v1.0 of my app and I would like to install it on my phone for daily use (I'm following the docs here).
I built the apk using flutter build apk --split-per-abi
I then connected my phone* to my pc and ran flutter install but got "No target device connected".
Do I have to follow the steps given in this answer, even if I just want to install the release version of the app?
Does it have to do with my phone being a Huawei?
Also, I've not gone through the steps of signing my app as I don't intend on publishing it.
*Huawei P30 running Android 10

Expo: what is the difference between expo build and expo upload

What are difference between expo build and upload. Does upload cmd still return a standalone app. I realized if i run on Expo Client will work fine but when build a standalone version, the application does not behave the same again.
The commands build and upload are very different ones. The build command (Expo documentation on building) builds a standalone app, while the 'upload' command (Expo documentation on uploading) uploads the standalone app that you've built to the App Store or the Play Store (Your Choice).

React Native - build apk with plugins

I’m using react-native-push-notifications to send local notifications on my react native app. The app works perfectly on my android emulator and on any physical device while using react-native run-android. But when I signed my app and build an apk throw gradlew assemblerelease the apk builds without compiling react-native-push-notifications and the app does not send notifications. I think I should link the plugin with build.gradle but I’ve searched for a while and didn’t figure how.

React native (expo) app APK not working

I have built an expo (React native) app and in development it is working great, even running perfectly on my android device. I built an APK and now when i run the apk on the same android device i get my splash screen and then login screen but when i try login i get the following error screen
enter code here
Okay I found the answer, i had the following code
const Loader = ({ }) => {
Apparently this works completely fine in dev mode but once you build an APK it breaks the app. Hope this saves someone else some time

Categories

Resources