Hack Club Mobile
- 10 Devlogs
- 16 Total hours
A Mobile App for Stardance
A Mobile App for Stardance
I added a README and done some small changes before shipping. I did not come up with a logo though so the Default Android one should be enough for now…
I have a lot more Ideas but sadly, Stardance is ending soon…
I added iOS-Support! The Share-Sheet behaves a bit weirdly and only worked in the iOS Simulator. Hopefully it will work on real devices but I only have an iPad to test with. The IPA is also unsigned because there is no world where I will pay Apple 100€ every year! But yeah, it works well enough…
Various small changes have been made. The Project View now has a back
button and stats and Devlogs now have a Share button!
The most time however, was spent on figuring out rememberSaveable(). It
is a Composable that saves its state across reloads, such as when going
back or when rotating the Screen. Not having to load the Feed again when going back from a project
is a lot smoother and looks better. However, I had quite some trouble with the Saver. I
ended up just wrapping stuff inside a list, as that appeared to work.
However, the App now crashes completely when closing it (or turning off
the screen)…
Okay, didn’t Devlog in a while. I first added the Like-Count at the bottom of a Devlog. It worked quite well!
But when I tried to actually make it interactable, I failed miserably. For some reason, Stardance requires an authenticity_token on POST-Requests which is just inside the HTML as well. While I could have probably just acquired that as well, I just felt too dumb. Who thought, that this would solve any kind of Security-Problem? It is not comparable to a CAPTCHA!
Anyways, I now started on implementing a Project-Screen which is already looking pretty okay! (I just used the same Feed-View as from the other Parts, lol)
I added Tabs on the Explore Page and Statistics on the User Account Page. I am not quite sure, if I like the Fact, that the Tabs are a bit overloaded and the “Following” Text is wrapped into a new line. But that is of course dependent on the Screen Size. Same with the Facts on the Account Page: I originally also wanted to show the Follower/Following Count there but that ended up being too much. I am, however, quite happy about this layout!
Next Objective is bringing more Interactivity: Liking Posts, seeing Comments etc.
I tried adding Browser support but it doesn’t really work. Stardance does not do CORS correctly so I first had to build a custom Proxy for it (which means that Rate-Limits will be reached much faster). After that, I noticed that Images would still not load because I would somehow need to rewrite the src Attribute. Additionally, logging in is not possible because I can’t really set the Cookie Header…
Yeah, I am going to leave this as is…
I have implemented an Account Page! The Design, especially the Padding still has to be refined but I like the general layout of it!
Unfortunately, I did not find a better way for the User to authenticate than pasting a Cookie inside the App. This is not very User-Friendly but for now should(tm) work…
Quite a few changes have been made. First: I am now using the MultiplatformMaterialYou-Library to theme the App. This will make it sync to your System Theme on both iOS and Android and even to your Wallpaper Colors on Android 12+. Second: Images now render thanks to Coil. Sometimes they are a bit too big though… And not to forget: Authentication theoretically works as well now! There is just no UI for it yet…
We can now display a very basic Version of the Feed with Infinite Scrolling! This took longer than I wanted because the way Compose works can often be really confusing. It is very hacky because I just load more when the LazyColumn requests it… Anyways, Rendering Images and Authentication will be the next goals…
I am building Hack Club Mobile, a Smartphone App for Stardance (and hopefully other YSWS’s in the future).
When I first had the Idea of creating this, I thought: “Oh yeah, should be easy. Just call some JSON APIs and you’re done.” Oh how wrong I was. These stupid c***kheads from Hack Club who cant write a Single line of working Code use HTML Templating. Making it very hard to build stuff like this.
Thankfully I found ksoup which allows me to parse HTML in Kotlin.
Speaking of Kotlin: I am building this App with Kotlin Multiplatform and Kotlin Compose. This will make the App work and look native on Android and also work (maybe not as good though) on iOS. I am already quite familiar with it as I build multiple Apps using it.
Lets just hope I don’t give up this early because I think it could get really useful…
For now, the Focus is on viewing the Feed (what you see in the Stardance Home-Tab) which already works… kinda… somewhat…