Join us on Discord!
You can help CodeWalrus stay online by donating here.

[Android] CodeWalrus Post Notifier

Started by Snektron, April 16, 2015, 01:34:08 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Snektron

For our computer science class we (@brentmaas, @TheCoder1998 and me) need to do a project. We had
to come up with a project ourselves. The first thing i did was send a mail to DJ, since i saw people would like a post notifier a while before.
Since we were quite busy at the time, we decided to delay developement untill we had some free time, which is about now.
We have to keep a log and everything too, so we'll be using this topic to notify of developement updates.

Language:
Since the default Android programming language is Java, and we can all code in Java (well, TheCoder is still learning :P), we'll
be using that to make the application. We will be using the Android SDK ofcourse.

Planned features:
- Service that sends a push notification when a new post is made.
- Clientside only. it will be checking the SMF RSS update feed and parsing data from there.
   (The SMF RSS feed gives post content too, but that might use too much data. If someone knows how to remove that data in the http request, or if
   a site maintainer can make a special feed for us, that would be nice :))
a custom smf mod that returns some data upon requesting an url
- Toggle service active.
- Toggle 3g update checking.
- Algorithm to do more checks when there is intense posting.
- Setting for time between checks
- Activity that displays latest X posts
- Setting to ignore some tags/topics/subforums

Release:
The app will be released on the play store, since i have an account anyways.
Ofcourse, the app will be free. Also we'll probably post it on a new topic when it's finished.

Further info
This app will sadly not be available for iOS, since none of us have a mac to develop on or an app store license.
Windows version is not ruled out but that's not part of the project, so that will maybe come later. (also if we do it, it's maybe better to do a chrome plugin).

If you have any suggestions or ideas, please leave them on this topic :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Duke "Tape" Eiyeron

Have fun with such kinds of projects. also try to make a passive notification reader, else batteries will be drown into obvlivion.
  • Calculators owned: A lot.

Yuki

I'm tempted to suggest GCM but that would require me to write a GCM server mod and store every user's ID to send them the same message to everyone individually.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Snektron

hm. I havent heard about GCM before, but it looks quite handy. Else we can write our own lightweight server to connect to for updates, and the server can search through the rss feed or something. Is it possible to run a notify server on CW's servers?
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Yuki

Sure. The best would be to make SMF send a message to the notification server directly when someone posts, just like what it's doing with the IRC bot.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Snektron

Yes that would be ideal. How would SMF be sending the message though?
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

#6
Juju's last idea would be ideal, but of course it depends of how reliable such inter-server connection would be and we would have to make sure that the app doesn't take too many resources. Also, if the server that the app uses is down, then it needs to not slow down forum posting.

Anyway a post notifier would definitively rule if it doesn't spam the server with requests or fake page views. Good luck in any case! :)

What I am thinking is that when a new post is made, then Walrified should also store the topic title and URL in a standalone file or database element on the server and the notification app would check that log instead of the site's RSS. That way, it won't rack up forum page views and it would be smaller in size (it could maybe only keep the last 5 replies on record).
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Yuki

Quote from: Cumred_Snektron on April 16, 2015, 03:43:05 PM
Yes that would be ideal. How would SMF be sending the message though?
The IRC bot uses UDP, with SMF acting as a client.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Duke "Tape" Eiyeron

That would be useful indeed to get notifications from SMF, hyes.
  • Calculators owned: A lot.

Snektron

Quote from: Juju on April 16, 2015, 04:09:00 PM
Quote from: Cumred_Snektron on April 16, 2015, 03:43:05 PM
Yes that would be ideal. How would SMF be sending the message though?
The IRC bot uses UDP, with SMF acting as a client.
Ah okay. That shouldn't be too hard to implement.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Yuki

You would have to implement a UDP server and process whatever it recieves. Yeah, pretty easy.
  • Calculators owned: TI-83+ (dead?), Casio Prizm (also dead???)
  • Consoles, mobile devices and vintage computers owned: A lot
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron

if you wanna throw money at me and/or CodeWalrus monthly it's here

Dream of Omnimaga

Yeah the thing is just make sure that you don't reload the SMF RSS feed or any forum page to check if there are new posts. If, for example, 10 members use the application and the app checks the RSS feed every 10 second for new posts, then the Forum statistic page will show 864000 extra page views everyday and I'm unsure if we want fake stats. Omnimaga had a similar problem in March 2014 when they tried ENotify, in addition to many errors. Not sure what is an UDP server but I'll check I guess.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

UDP is a protocol. It just means SMF sends a packet to the notify server with 'hey - theres a new post! its {post data}" or something :P
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

#13
Ah right, such protocol would work better then. Would it be better to host it on our server in case yours or your URL go down in the future? (which just happened to your URL >.<)

Also yeeah there needs to be a timeout feature so that if after 3 seconds it still cannot register a connection, then it sends the post to the forums and IRC and just skips your app. Otherwise I remember that at first, when Omni used a similar way to notify of new posts on IRC, it would wait until the forums can register a connection to the IRC bot and we could no longer post at all if the bot was down  >.<
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Snektron

Yeah that's why i asked it, and why we initially planned to have it clientside only
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Powered by EzPortal