fixme-lausanne / myhackerspace Goto Github PK
View Code? Open in Web Editor NEWAndroid app for hackerspaces status and information, using the SpaceAPI.
Home Page: https://play.google.com/store/apps/details?id=ch.fixme.status
Android app for hackerspaces status and information, using the SpaceAPI.
Home Page: https://play.google.com/store/apps/details?id=ch.fixme.status
Hi,
I discovered FIXME Hackerspace thanks to MyHackerspace, in 2015 I was awake at 2 AM and I was browsing the F-Droid app store, trying to get bored enough to sleep. I installed MyHackerspace and found that there was a hackerspace in my city, it was a completely random happenance.
Joining FIXME was a life changing experience and I wanted to highlight the browsing/discovery aspect of the application, to help other people like me discover hackerspaces.
I have two big features in mind:
1:
https://github.com/silent88/MyHackerspace/commit/74721d820549ce6eb05ff4c12bdcdcf97e6f0a53
Here I marked the code to modify in order to have a sorted list.
Instead of loading the list with only the name of the hackerspace, you can load the list with "country code" + "" + "hackerspace name".
This is a related issue: Filter spaces
https://github.com/fixme-lausanne/MyHackerspace/issues/4
2:
In order to have create a Google Map we need a centralized repository of GeoData.
It does not make sense to have MyHackerspace query all hackerspaces dynamically only to build a map, or a simple UI list.
https://github.com/silent88/directory
https://raw.githubusercontent.com/silent88/directory/master/directory-country-manual.json
Discussion about modifying the centralized repository is happening here:
https://github.com/SpaceApi/directory/pull/147
silent88
My Hackerspace (Entropia) is currently moving, due to the the Spaceapi is currently not availible.
This causes the widget to create Toasts with "No Route to host" when I'm in the middle of doing other things, and it was not easy to even find out which app is responsible for that.
This is propably an edge case, but nevertheless very annoying to my.
I don't think it's a good idea to use toasts for errors from a widget, especially if there is no context for the message. A Toast with just "No route to Host" when I'm on my homescreen does not give me any Information I would need to anything about the cause (and it gets really annoying after a few times).
I'm not sure what the best way to fix this is. Maybe creating a Notification, to at least give context for the Message and maybe more information and time.
But it might get just as anoying in a case like mine to get Notifications every few minutes, but at least the can disable notifications on a per app basis in current Android versions.
Any suggestions?
Last week we released v14 of the SpaceAPI schema! https://github.com/SpaceApi/schema/blob/master/MIGRATION.md
To support this, I'd like to rewrite the parser, which is currently using the (horrible!) Android JSON library.
I first took a look at https://app.quicktype.io/ and the generated source code. I like that it's based on Jackson, but it uses some Java 8 standard library functions that are not part of Android API21 and would need to be rewritten.
I thought about simplifying the generated code using plain Jackson calls, but that also seems quite a lot of work.
In the end, I saw that Kotlin has a new serialization framework that makes (de)serialization quite easy. I don't have much Kotlin experience, but it's definitely a nice language!
So TL;DR: Here's a new project I started, that should provide a standalone lenient Kotlin/Java parser for SpaceAPI endpoints. https://github.com/spaceapi-community/spaceapi-kt The goal is to have a single library / wrapper type that can parse both v0.13 and v14 endpoints (and future versions as well). The focus is on parsing, not on serializing, so we can skip a lot of validation logic.
Kotlin has nice Java interop, so Kotlin can call Java and vice versa. The only cost is that the Kotlin runtime needs to be integrated as a Gradle dependency, which makes the app a bit larger. On the other hand we then have the option of using Kotlin as well in the app code.
(Maybe it's also possible to convert the library into pure-JVM bytecode that does not require the Kotlin runtime, but I doubt it.)
@rorist do you see any problem with this approach? Would you accept a PR that replaces the parser with this library?
When directly editing SpaceAPI URL in the "Current hackerspace API" setting (after commit 39cd9b1 it is called "Edit SpaceAPI URL") data from the new SpaceAPI isn't reloaded as would be expected when returning to the main page.
First when manually pushing the reload button data is reloaded or an error is thrown.
Tested on latest release 1.8.2 from F-Droid but I see no later commits which seem to address this.
The list of all hackerspaces at hackerspaces.org is so long (currently, well over 1000) that the list seems not to complete or load only so many. Could a manual type in of the hackerspace name be added at the top? I cannot access my own space, as of yet, with this app. Thanks in advance.
Some missing fields to translate:
<string name="prefs_api_url_title">Current hackerspace API</string>
<string name="prefs_api_url_summary">Override current hackerspace URL (will be lost when choosing an other hackerspace in the list)</string>
Touching the widget could open the associated hackerspace.
Hi,
the app crashes whenever our open status is undefined ('null'). We have to send this whenever the Internet connection in our space is down... (according to the specification under -> http://spaceapi.net/documentation -> state -> open)
Hi,
in Net.java's toString() method there's the following check:
if (mUrlConnection.getResponseCode() == HttpURLConnection.HTTP_OK){
That leads to issues if a the response is a 301/302 redirect to a status.json
file.
For example:
> curl -L -I http://www.c-base.org/status.json
HTTP/1.1 302 Found
Cache-Control: no-cache
Content-length: 0
Location: https://www.c-base.org/status.json
Connection: close
HTTP/1.1 200 OK
Date: Sat, 17 Jan 2015 21:46:03 GMT
Server: Apache/2.2.16 (Debian)
Last-Modified: Fri, 02 May 2014 01:48:51 GMT
ETag: "1860012-316-4f860fbbf26c0"
Accept-Ranges: bytes
Content-Length: 790
Content-Type: text/plain; charset=UTF-8
Strict-Transport-Security: max-age=31536000; includeSubDomains
The error message is something like: Error: java.lang.Throwable - Found http://www.c-base.org/status.json
Check if the response code is 301/302 (redirect) and then follow the new url. Taking care of protocol switches (e.g. http -> https / https -> http) would be necessary.
Kind regards,
gehaxelt
The new directory server (#71) has both A (IPv4) and AAAA (IPv6) DNS records. Therefore DNS resolution resolves to an IPv6 address when querying directory.spaceapi.io.
However, from a network that does not support IPv6, that connection will simply fail, no IPv4 fallback is being done.
The correct solution for this is RFC6555 (Happy Eyeballs). I'll try to find out if I get that to work on Android.
Some spaces provide webcam images: http://status.crdmp.ch/
Would be nice if these could be shown. Maybe not automatically, to save bandwidth, but by pressing a button or something like that.
To continue the discussion in #70: Should we trust self-signed certificates, or certificates where the CA is not in a standard root store (e.g. CaCert)?
Nowadays it should be easy to set up Let's Encrypt, and plain HTTP endpoint URLs still work fine as an alternative. My suggestion would be to keep the certificate validation code.
I don't know, if it is a bug, but some icons of some hackerspaces have a loading animation that never stops (e.g. Munich Maker lab and FAU FabLab)
We need to update the translation with the latest fields.
Error: "ui_image_status" is not translated in "de" (German), "fr" (French) [MissingTranslation]
<string name="ui_image_status">Status image of the hackerspace</string>
~~~~~~~~~~~~~~~~~~~~~~
/home/travis/build/fixme-lausanne/MyHackerspace/myHackerspace/src/main/res/values/strings.xml:32: Error: "prefs_api_title" is not translated in "de" (German), "fr" (French), "nl" (Dutch) [MissingTranslation]
<string name="prefs_api_title">SpaceAPI Endpoint</string>
~~~~~~~~~~~~~~~~~~~~~~
/home/travis/build/fixme-lausanne/MyHackerspace/myHackerspace/src/main/res/values/strings.xml:33: Error: "prefs_api_summary" is not translated in "de" (German), "fr" (French), "nl" (Dutch) [MissingTranslation]
<string name="prefs_api_summary">URL to the global SpaceAPI directory (directory.json file)\nExamples:\nhttps://spaceapi.fixme.ch/directory.json\nhttp://spaceapi.net/directory.json</string>
~~~~~~~~~~~~~~~~~~~~~~~~
/home/travis/build/fixme-lausanne/MyHackerspace/myHackerspace/src/main/res/values/strings.xml:34: Error: "prefs_api_url_title" is not translated in "da" (Danish), "de" (German), "fr" (French), "nl" (Dutch) [MissingTranslation]
<string name="prefs_api_url_title">Current hackerspace API</string>
~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/travis/build/fixme-lausanne/MyHackerspace/myHackerspace/src/main/res/values/strings.xml:35: Error: "prefs_api_url_summary" is not translated in "da" (Danish), "de" (German), "fr" (French), "nl" (Dutch) [MissingTranslation]
<string name="prefs_api_url_summary">Override current hackerspace URL (will be lost when choosing an other hackerspace in the list)</string>
I've got a Note 2 running CM11M6 and was delighted to find this app! I hang out at Nova Labs, which is in your list, but when set to Nova Labs, the widget just spins the 'updating' circle forever. Is there a deficiency in the Nova Labs data? The full app shows the status correctly.
Extend the API adding something like "status_external_url" wich links to an HTTP Auth protected page.
We must then support HTTP Basic Auth withing the app when clicking the a private status button on hackerspaces providing such feature.
Some guy did an extraction from hackerspaces.org, find a way to integrate that into the app
http://davr.org/hackerspace/
Have a way to select spaces in the list with some filters like:
And order them by recent events/status changes, etc
I am getting a Error: java.io.FileNotFoundException on the hackerspace Bitlair
https://bitlair.nl/statejson.php
I can access the url from my phone's browser.
For example:
Could you please use git tags? It would make updating your app on f-droid much easier :)
Thanks!
Show every api fields instead of a fixed list.
Would you consider merging a pull request if I'd convert the project to use Gradle? The nice side effect of that would be simple dependency management and direct importing into Android Studio.
It's all in the title
I saw that every hackerspace puts an @ in front of their twitter handle
in the spaceapi file (e.g. "twitter":"@HackerspaceBI").
In the MyHackerspace App this value is displayed as (e.g.) "https://twitter.com/#!/@HackerspaceBI".
While this link works fine in my Firefoy browser on my laptop, my Android phone (KitKat)
lanches the (default) browser and then twitter tells me that link is invalid.
Hi,
Often when my smartphone changes networks (wifi -> mobile, wifi -> wifi, between different mobile base stations, etc...) the widget crashes with an notification. This is not a new behaviour, until now I just ignored the problem, but it should be fixable ;-)
Smartphone is a Samsung S5 with Android 5.0 (multiple builds)
The spaceapi v 0.13 spec says:
open (Array)
Description
A flag which indicates if the space is currently open or closed. The state 'undefined' can be achieved by assigning this field the value 'null' (without the quotes). In most (all?) programming languages this is evaluated to false so that no app should break
however if the value is null MyHackerspace throws an exception since null cannot be turned into a boolean.
Works fine with no widget, but if you do use a widget it crashes, probably due to open being null
https://london.hackspace.org.uk/spaceapi.php
I/MyHackerspace(29223): Update widgetid 39 with url https://london.hackspace.org.uk/spaceapi
V/MyHackerspace(29223): fetching https://london.hackspace.org.uk/spaceapi
D/Launcher.Workspace(12400): 6557954 Animate widget drop, final view is appWidgetHostView
D/AndroidRuntime(29223): Shutting down VM
W/dalvikvm(29223): threadid=1: thread exiting with uncaught exception (group=0x4132e930)
E/AndroidRuntime(29223): FATAL EXCEPTION: main
E/AndroidRuntime(29223): java.lang.NullPointerException
E/AndroidRuntime(29223): at ch.fixme.status.Widget$GetApiTask.onPostExecute(Widget.java:232)
E/AndroidRuntime(29223): at ch.fixme.status.Widget$GetApiTask.onPostExecute(Widget.java:194)
E/AndroidRuntime(29223): at android.os.AsyncTask.finish(AsyncTask.java:631)
E/AndroidRuntime(29223): at android.os.AsyncTask.access$600(AsyncTask.java:177)
E/AndroidRuntime(29223): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
E/AndroidRuntime(29223): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(29223): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(29223): at android.app.ActivityThread.main(ActivityThread.java:5041)
E/AndroidRuntime(29223): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(29223): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(29223): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(29223): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime(29223): at dalvik.system.NativeStart.main(Native Method)
W/DropBoxManagerService( 390): Dropping: data_app_crash (966 > 0 bytes)
D/dalvikvm(29223): GC_CONCURRENT freed 565K, 10% free 9441K/10396K, paused 3ms+14ms, total 60ms
D/Launcher.Model(12400): DbDebug Add item (null) to db, id: 171 (-100, 0, 1, 0)
I/Process (29223): Sending signal. PID: 29223 SIG: 9
I/WindowState( 390): WIN DEATH: Window{42065258 u0 ch.fixme.status/ch.fixme.status.Widget_config}
I/ActivityManager( 390): Process ch.fixme.status (pid 29223) has died.
Widget is too small for high resolution screen
Missing strings to be translated:
<string name="ui_image_status">Status image of the hackerspace</string>
<string name="prefs_api_title">SpaceAPI Endpoint</string>
<string name="prefs_api_summary">URL to the global SpaceAPI directory (directory.json file)\nExamples:\nhttps://spaceapi.fixme.ch/directory.json\nhttp://spaceapi.net/directory.json
<string name="prefs_api_url_title">Current hackerspace API</string>
<string name="prefs_api_url_summary">Override current hackerspace URL (will be lost when choosing an other hackerspace in the list)</string>
It would be a good thing if we could resize the widget
I migrated the server that serves GeekLabs's spaceapi at (spaceapi.geeklabs.dk/?format=json) this sunday and in that process made some changes that caused the "logo" url to serve a different image for some hours.
I noticed today that the widget on my phone was still displaying the wrong logo regardless of the time passed and how many times I refreshed the feed from the app's main window. First when the spaces' "state" was changed the image was updated. Strangely enough this ought also to happened monday evening when the labs was open.
I just did some quick experiments that showed that when fiddling around with the widgets they do update, at least when the image url changes from invalid->valid (I just renamed the file on the server to test). However, it doesn't seem to handle the situation where just the image data fetched from the url changes.
We have a valid space API integration. It is working in the other apps that uses space API.
The API endpoint is https://istanbulhs.org/api/spaceapi/
I think the problem is that we redirect this link to another link to display the output. Maybe your network call does not support redirection.
The app needs about 5MB/week. I don't know, if you can fix this or if this is because of the space api design. (Maybe a setting for refresh duration would be nice)
Missing fields to translate:
<string name="prefs_api_title">SpaceAPI Endpoint</string>
<string name="prefs_api_summary">URL to the global SpaceAPI directory (directory.json file)\nExamples:\nhttps://spaceapi.fixme.ch/directory.json\nhttp://spaceapi.net/directory.json</string>
<string name="prefs_api_url_title">Current hackerspace API</string>
<string name="prefs_api_url_summary">Override current hackerspace URL (will be lost when choosing an other hackerspace in the list)</string>
Our spaceapi provides an png24 for open/closed status
http://status.bckspc.de/spacestatus.php
and it looks like this on my homescreen:
We develop a tool which drives app via UiAutomator, and finally dump the apps heap, which is further analyzed for possible leaked Activity or Fragment.
We apply the tool to this app, and found that the Activity "ch.fixme.status.Main" may leak. We could detect 2 instances of the Activity, one of which is actually destroyed but remain in heap.
P.S. the paths to GC root were compressed/folded here.
Luckly, this leak is not serious, as it did not retain too much memory.
Hey together,
how to get space into your directory? Is this a mirror of spaceapi.net? The spaceapi.net directory is down.
Regards,
Max
http://f-droid.org/
"The F-Droid Repository is an easily-installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. The server contains the details of multiple versions of each application, and the Android client makes it easy to browse, install them onto your device, and keep track of updates."
On my nexus 5 it needs 24% (android battery statistic)
Hi, I'm not sure, but normally this app should contain a widget, right?
But in the latest f-droid version and in the latest play store version, I can't find a widget.
I was thinking about the following feature:
Any considerations? I'm willing to put some effort on this matter.
Please consider adding a list of favourites so one can fast access often used hackerspaces.
Change the UI so we can:
Cool people committed cool patches and those should go live :)
The last published version is 1,5 years old.
(if help is needed, get in touch with me)
It would be nice to have a better view of the different fields in order to have more information density. I propose having some kind of tiles.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.