Comments (13)
Thanks for the kind words and your proposal. :)
We will think about how we can implement that. A hurdle can be that the app has to run in background and perform server requests in the background from time to time. For that, we have to experiment and try things out, because we didn't work with such parts yet.
But please be patient – I'm currently working on an internal redesign of the app, so this feature will come after that.
Next month I'm going to start working in a company and my brother too (we have just become adults), so we will sadly have less time to work on our app.
from grocy-android.
@MrJohnZoidberg no offence at all. If you like, I can upload the draft in my fork (I implemented the whole setting structure and permissions fr a service notification).
from grocy-android.
Oh that would be great :) You can create a pull request if you want.
Just issued the PR. It does not include the modules I changed to handle the boot and the notifications, following your comments.
If you provide me with any hints on the modules you would process that in, I can rework and share.
from grocy-android.
@igor-cali About the upcoming or next week I hope :)
from grocy-android.
@MrJohnZoidberg What's the best way to get the expiring items from the app code (better if an array with the expiring date?
Thanks!
from grocy-android.
@igor-cali How do you mean "from the app code"? Do you want to implement something?
from grocy-android.
@MrJohnZoidberg Yes. I drafted some structure, but I am not familiar with the 'database code' and API. That's why I am asking for hints.
from grocy-android.
@igor-cali Okay nice, you can look in the StockOverviewViewModel file, there is
- the repository which loads volatile items from database. VolatileItem is an object where productId and volatileType is stored, and when iterating over the VolatileItems you can check for "volatileType == expiring" and look the corresponding stockItem up with the productId (stockitems are loaded in a separate array from the repository).
- the DownloadHelper which updates the database after loading. dlHelper.updateData() takes class types of Models which should be updated with the call.
I hope this helps you to understand the code. :-)
from grocy-android.
@MrJohnZoidberg I am trying to get items with no success, from MainActivity.java
.
It looks like I cannot access VolitileItems
nor the repository
since they are local or private.
Here's is my code:
[...]
StockOverviewViewModel viewModel = new ViewModelProvider(this).get(StockOverviewViewModel.class);
viewModel.setOfflineLive(! isOnline());
viewModel.loadFromDatabase(true);
viewModel.downloadData();
//viewModel.updateFilteredStockItems();
MutableLiveData<ArrayList<StockItem>> StockItems = viewModel.getFilteredStockItemsLive();
ArrayList<StockItem> items = StockItems.getValue();
[...]
I always get a null items
list. Any hint?
from grocy-android.
@igor-cali Mmh thanks for trying to implement that feature, but I think you have not enough Android and/or Java knowledge to have a good implementation in the end (no offense). The MainActivity is not the right place to add such lines there and the way how you load the StockItems is also not right, sorry. And I can't explain how you can/should make it instead because then I can also do it myself... :)
I think it would be better if I implement this in the near future.
from grocy-android.
@igor-cali Oh that would be great :) You can create a pull request if you want.
from grocy-android.
Thanks for your work on it, I almost finished the feature yesterday. Only the time picker is missing and I will improve the notification text.
from grocy-android.
@MrJohnZoidberg is there a plan for a new release including this?
from grocy-android.
Related Issues (20)
- Enter storage location via keyboard
- Show location for next due date in product overview
- Do not reset search automatically
- Can't connect to my server after updating a certificate HOT 2
- Add support for server 4.2.0 HOT 2
- Unit of measure field not editable
- Automatically reactivate scanner after transaction
- Unable to enter own server
- For un-implemented features, please link to server page
- Support nested storage locations
- Delete all purchased products from the shopping list HOT 1
- "Due Soon" should include items set to "Due date type" of "Expiration"
- Please include the latest Swedish translations in the next release HOT 1
- Recipe preparation mode page HOT 2
- Show error message from backend (in case of consuming recipe if ingredients with disabled stock fulfillment checking) HOT 2
- Battery drains very quickly HOT 3
- Save data locally and then synchronize it? HOT 1
- [Feature Request] Grocycode and Barcode view & download from product details.ils
- [Question] NFC automation
- [bug] When editing a recipe that produces a product, the "Produces product" field is always empty
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 grocy-android.