Comments (8)
Hi @jafarpishdadi :
A long time since I started this project again, I tried to change the value of android: updatePeriodMillis="90000000"
with
Android: updatePeriodMillis="900000"
File: Widgetprovider
from react-native-widget-listview.
Try doing this in widgetTask.js
:
bgTimer.setInterval(() => {
fetch('https://www.simplifiedcoding.net/demos/marvel/')
.then((response) => response.json())
.then((responseJson) => {
synchronizeWidget(responseJson)
}).catch((error) => {
console.error(error);
});
}, 900000);
from react-native-widget-listview.
With a video or with a more detailed explanation point by point it would be easier to understand what really happens and what you would like to do.
Consider that it is only a trial version of a module widget, since there is not much information and documentation about it at the moment about these bridge experiments, especially at the time of what was in development a year ago.
At the moment I don't have the equipment and the time to be able to help you adequately.
Take a look at this project, in particular the following files:
It might give you some suggestions on how to create a refresh button manually to get the data.
Surely on stackoverflow they will be able to help you much better than me, there are lots of very experienced Android developers, try asking them for some suggestions.
from react-native-widget-listview.
I have also faced similar issues some times back with the widget. But unfortunately I've not worked further after that because there's no suffcient documentation available for this. I'd definitely like to assist you.
- Have you tried https://stackoverflow.com/questions/39946431/what-is-the-best-way-to-schedule-a-task-in-react-native ?
Not sure what is your purpose for updating widget every 15 minute as you are fetching data from the API, so widget must update it dynamically from API, isn' it?
from react-native-widget-listview.
thanks for replay @gaetanozappi
onupdate called and no problem
but data data not updated widgetTask.js
I want the data to be called from the url in widgttask.js every 15 minutes
this section not run
bgTimer.setTimeout(() => {
fetch('https://www.simplifiedcoding.net/demos/marvel/')
.then((response) => response.json())
.then((responseJson) => {
synchronizeWidget(responseJson)
}).catch((error) => {
console.error(error);
});
}, 0);
from react-native-widget-listview.
thanks @gaetanozappi
im use setinterval code
in background data receive after 15 min and Continue to 15 minutes
but when app close data not receive and stop widget
log onupdate function in WidgetProvider
this called every 15 minutes but not receive data from widgettask
How to manually update task with refresh-icon ?
from react-native-widget-listview.
hi @creativemind1
Thanks for your help
im design weather widget for app that update every 15 minute
i would to fetch data from url and update widget
from react-native-widget-listview.
hi @creativemind1
Thanks for your helpim design weather widget for app that update every 15 minute
i would to fetch data from url and update widget
Do you have any proper repo to check and comment?
from react-native-widget-listview.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-widget-listview.