-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very slow loading when adding widget to homescreen #23
Comments
Could you say what you would like to see happening instead? |
Oh. It loads for maybe a minute and then it works. Why does it load that long? Couldn't you just use the list of hackerspaces that is shown when you open the app normally? |
Hm. This looks like several issues. Can you make a list for clarity? |
Can confirm that loading seems to be very slow. If someone could debug (and maybe fix) the loading behavior, that would be very welcome. |
Hm. I was looking at Widget.java, line 303. my-hackerspace/app/src/main/java/io/spaceapi/community/myhackerspace/Widget.java Line 303 in a05089e
This appeared a while AFTER the widget was created. It seems that the UpdateService my-hackerspace/app/src/main/java/io/spaceapi/community/myhackerspace/Widget.java Line 287 in cd8e02d
is not used until it is triggered by some event. In the AndroidManifest.xml we have this:
As well as the different
My guess is that these trigger the update service. When the widget is first created, this does not take place. Here is the update mechanism: my-hackerspace/app/src/main/java/io/spaceapi/community/myhackerspace/Widget.java Line 305 in cd8e02d
I would guess that once the widget is successfully created either
... Researching ....https://developer.android.com/reference/android/appwidget/AppWidgetManager#summary
According to this, my first guess was correct... Looking into it. |
It seems to me that Widget_config calls updateAlarm and that creates the system alarm for update with a 50ms delay. This is but a rough estimation and might go wrong - it might not be updated after 50ms. That might be the problem here. So, I had a look and I add the direct update without the redirection through the Android operating system... PR in progress... #34 |
When adding the widget, the list of spaces needs to be loaded (in order to choose a space). Sometimes this is still slow, but there is an issue with loading of the directory that I'm currently investigating. It's probably an IPv6 issue on the directory server (which sometimes runs into a timeout, causing a 30-60 loading time). However, the main issue was probably resolved with #34, so we can probably close this. |
When I try to create a widget the app shows loading. I can tap the loading icon away but can't choose a hackerspace.
The text was updated successfully, but these errors were encountered: