Open sphh opened 6 years ago
Sure, should be possible to get the number which has started the call or SMS and filter by that. The number could then be configured during installation of the widget. I will add it when I find some time for that.
The possibility to enter the telephonenumber in the settings is implemented and checked in a separate branch (19897e60fc96c4943f99d2444f4642ccbf8520f1). But I have spent the whole evening yesterday to find a solution to filter the call log according to the caller number without any solution. I hope somebody on stackoverflow can help me: https://stackoverflow.com/questions/50728624/how-to-get-all-outgoing-calls-of-one-specific-phonenumber-in-android.
Until somebody has a solution, I do not see a simple solution to this problem. Maybe I can look into it again with more time, but fixing this issue will definitly take some time, sorry.
I am not sure but I think I managed to do so in UpdateWidgetService.java in the block at line 170. Just for proof of concept, I hardcoded my one of my two returned subscription_ids:
while (c.moveToNext()) { String sim_id = c.getString(c.getColumnIndexOrThrow("subscription_id")); ... if (date.after(this_month) && (sim_id.equals("9236120062440828764ff"))) {...}
I'm a beginner but I think it's not a big deal selecting one of the IDs in the configuration - you want either one or the other. Since you have two SIMs at most, I don't see a big advantage linking the subscription_id to the phone number.
Displaying two values like "10:23 / 43:22" should do it for most users
At the moment SimpleStatsWidget sums the SMS and minutes of both SIM cards. It would be great, if I could configure it to use one SIM card. Do you think, that's possible?