No funded issue found.
Check out the Issue Explorer
Be the OSS Funding you wish to see in the world.
Looking to fund some work? You can submit a new Funded Issue here .
Time left
Opened
Issue Type
Workers Auto Approve
Project Type
Time Commitment
Experience Level
Permissions
Accepted
Reserved For
Fetch messages in background when Push Notification is received
status-im
Batchfile
[comment]: # (Please replace ... with your information. Remove )
### User Story
- As a user, I expect to see the unread messages in the when I click the push notification. Currently, I have to wait for sync to kick in and retrieve the messages from the network.
- As a Status contributor, I want to have a better sense of what the Sent/Received ratio is. If the user doesn't open the app for 24h after receiving a message, that message will never be counted as received, which is fake news!
### Description
[comment]: # (Feature or Bug? i.e Type: Bug)
*Type*: Features
[comment]: # (Describe the feature you would like, or briefly summarise the bug and what you did, what you expected to happen, and what actually happens. Sections below)
*Summary*:
The application could run in the background upon reception of a notification to fetch recent messages, decrypt them and consequently send the signal to Mixpanel.
#### Expected behavior
[comment]: # (Describe what you expected to happen.)
1. User receives message and PN;
1. User loses internet connectivity;
1. After a minute, user clicks on PN;
1. App opens and message is ready to be read.
#### Actual behavior
[comment]: # (Describe what actually happened.)
1. User receives message and PN;
1. User loses internet connectivity;
1. After a minute, user clicks on PN;
1. App opens and message doesn't appear until foreground sync has completed.
### Solution
[comment]: # (Please summarise the solution and provide a task list on what needs to be fixed.)
*Summary*:
It could be done using `background app refresh` feature on iOS which allows an app to wake up for 30 sec in the background upon reception of a notification
> When a background update notification is delivered to the user's device, iOS wakes up your app in the background and gives it up to 30 seconds to run. In iOS, the system delivers background update notifications by calling the application:didReceiveRemoteNotification:fetchCompletionHandler: method of your app delegate. Use that method to initiate any download operations needed to fetch new data. Processing remote notifications in the background requires that you add the appropriate background modes to your app.
Similar feature should exist on Android.
1. The notification sent by the client should be a [data-only notification](https://firebase.google.com/docs/cloud-messaging/concept-options#data_messages), otherwise, it will only call app-specific code when it is tapped by the receiver or the app is in the foreground.
1. Upon getting called `onMessageReceived()` (Android)/`didReceiveRemoteNotification()` (iOS), the app should trigger a network sync to retrieve messages, in a platform-specific way that allows for long-running tasks, and create a [local notification](https://github.com/evollu/react-native-fcm#build-custom-push-notification-for-android).
Setup your profile
Tell us a little about you:
Skills
No results found for [[search]] .
Type to search skills..
Bio Required
[[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Next
Setup your profile
Our tools are based on the principles of earn (π°), learn (π), and meet (π¬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Back
Next
Save
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email:
Email
Back
Save