ElkArte Community

Extending Elk => Addons => Topic started by: ahrasis on January 13, 2015, 10:32:49 am

Title: ElkArte Community Android App
Post by: ahrasis on January 13, 2015, 10:32:49 am
I was creating a simple app for my community. So I thought, since it is very simple, why don't I create one for ElkArte community.

I personally signed this app. Anybody who wants to try it out may find the package attached. Please unzip it first as I cannot upload .apk here.  ;)

Edited. This apk has been published. You may now download it from Google Play (Market) as well.
Title: Re: ElkArte Community Android App
Post by: meetdilip on January 13, 2015, 11:59:05 am
Thanks @ahrasis . You might like this thread

http://adminforum.in/index.php?/topic/487-android-app/

Title: Re: ElkArte Community Android App
Post by: ahrasis on January 13, 2015, 12:33:12 pm
Well, this is the first step. I think adding a notification etc won't be that difficult but we may need to pass some info as between the app and the forum. Currently, I don't do that for two main reaons. One, I am not well verse in java and its scripting / coding. Two, I am not so sure about security side of it, yet.

For your info, I implemented Sub Forums Addon on my community site. So, I can have several (subforum) sites using one app or one app for each subforum site (several apps that are).

Implementation of this is by loading specific url in each app denying others. Other url will then be forced to be opened in the browsers instead from within the app.

I will share the code for this app later.
Title: Re: ElkArte Community Android App
Post by: emanuele on January 15, 2015, 03:11:40 pm
Cool!
Unfortunately I don't have a smartphone, so I can't test it and give feedback... :(

On the security side of things, I'm not sure how mobile notifications work, I think push notifications should be sent from the forum to... a sort of account somewhere, but it's all a big blurry... LOL
Title: Re: ElkArte Community Android App
Post by: radu81 on January 15, 2015, 05:17:58 pm
Quote from: emanuele – I think push notifications should be sent from the forum to... a sort of account somewhere, but it's all a big blurry... LOL
there is pushover as app for all devices (ios, android and windows phone) https://pushover.net/
Title: Re: ElkArte Community Android App
Post by: TE on January 15, 2015, 10:45:48 pm
the server side for push notifications to an android device seems to be easy, see here:
https://gist.github.com/prime31/5675017
Title: Re: ElkArte Community Android App
Post by: ahrasis on January 16, 2015, 12:34:36 am
Nice code. That should be added inside Elk right? Ok. Consider that is added to Elk, we still need to get the THE_DEVICE_REGISTRATION_ID. Which means we need to register the device via the app, intercept the id via the app as well but the app should send the id back to server.  How do we do that?
Title: Re: ElkArte Community Android App
Post by: ahrasis on January 21, 2015, 07:54:30 am
More guides for me and those who are interested to study about adding up notification to app.

1. http://developer.android.com/google/gcm/index.html
2. http://www.androidbegin.com/tutorial/android-google-cloud-messaging-gcm-tutorial/
3. http://www.tutorialspoint.com/android/android_php_mysql.htm
4. http://stackoverflow.com/questions/11242743/gcm-with-php-google-cloud-messaging
5. http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-12-2/
6. http://forum.xda-developers.com/showthread.php?t=1860405

The next question, what function is notifying Elk forum user? Mention? Board? Or any activities?
Title: Re: ElkArte Community Android App
Post by: emanuele on January 21, 2015, 08:50:36 am
hmm... good question.
Ad the moment there is not a centralized mean to "notify" users of different things. The unification is part of the targets for 1.1.
The current way is split in at least two: one for "classic" notifications (those enabled by members by "notify me of replies" for example) and one for likes/other notifications I think, but at the moment I'm focusing on other stuff and I'm not sure... sorry. :-[
Title: Re: ElkArte Community Android App
Post by: ahrasis on January 22, 2015, 12:28:11 am
I am thinking to set if email is sent, trigger the notification via GCM. Will email be sent for all types of notification if the user doesn't opt not to be informed via email? I was thinking, if email is always sent when it is not turned off and there is any phone id registered, may be, the similar option for admin to enable sending notification to users via GCM.
Title: Re: ElkArte Community Android App
Post by: emanuele on January 22, 2015, 04:51:48 am
Except for mentions and likes, yes, all notifications are sent via email, so sendmail should be a good point to look.
Title: Re: ElkArte Community Android App
Post by: ahrasis on January 22, 2015, 08:04:48 am
Ok. I will check on that first. Hopefully, I'll see some light at the end of this tunnel.
Title: Re: ElkArte Community Android App
Post by: gorbi on January 26, 2015, 01:35:18 pm
I install this app and never saw a difference with the browser. What is an idea? I thought it was going to be like Tapatalk.
Title: Re: ElkArte Community Android App
Post by: ahrasis on January 26, 2015, 11:35:47 pm
As discussed above your post, this is a simple app. We did not implement notification system as yet. And even that is implemented, an addon need to be made so notification will work and pass to the app.
Title: Re: ElkArte Community Android App
Post by: emanuele on April 04, 2015, 04:39:38 am
An interesting tutorial:
http://mrbool.com/how-to-use-json-to-parse-data-into-android-application/28944
Title: Re: ElkArte Community Android App
Post by: ahrasis on June 19, 2015, 03:51:40 am
@Burke Knight have you read this? I can see that you are writing app, so, maybe you can venture into this too?
Title: Re: ElkArte Community Android App
Post by: Burke Knight on June 19, 2015, 05:33:27 am
Quote from: ahrasis – @Burke Knight have you read this? I can see that you are writing app, so, maybe you can venture into this too?

Well, I kind of cheat when making apps....  ;)
I use an online app maker.... LOL

Something like this, would be best, though, not to go that route.
Another way, would be something like Android Forums did, and that's using Tapatalk's system for people making their own app using their platform. However:

QuoteHow Much Does a Tapatalk BYO License Cost?

$69/month will grant you one license that will allow you to create a custom branded app for one forum for iOS or Android or both. There is only once license available even if you produce apps for only one platform.

So, best idea, in my opinion, would be making own app, somehow.
Yes, the app maker I used, is okay, but you also have to pay a monthly fee, if want to remove their branding from the about page in app. Also, all it really is, is just a simple browser app, set to your site.
Title: Re: ElkArte Community Android App
Post by: ahrasis on June 21, 2015, 03:38:19 am
We are thinking to add notification to the app. That will require some real workout. ;)
Title: Re: ElkArte Community Android App
Post by: ahrasis on December 04, 2015, 11:22:42 pm
As advised here, I find json is the way to create a realtime notification on android app. Currently, I have some free time to read and study more on json to retrieve and pass information to php. This one, I'd say, is a good reading to practise: http://www.geeks.gallery/simple-json-parsing-example-in-android-part-vi/
http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
Title: Re: ElkArte Community Android App
Post by: emanuele on December 06, 2015, 02:42:19 am
Interesting stuff for sure!!
Title: Re: ElkArte Community Android App
Post by: ahrasis on February 24, 2016, 09:12:08 am
This apk has been published. You may now download it from Google Play (Market) as well. No additional addon for notification yet.
Title: Re: ElkArte Community Android App
Post by: meetdilip on February 24, 2016, 09:38:37 am
Installing. You have a developer license @ahrasis  ?
Title: Re: ElkArte Community Android App
Post by: meetdilip on February 24, 2016, 09:47:35 am
Installed. Looks like you have used WebView to make this app.

PS : Forgot the main part, Nice work :thumbsup:
Title: Re: ElkArte Community Android App
Post by: ahrasis on February 24, 2016, 09:08:00 pm
Yes, I do have a license as its the cheapest compared to IOS. :P

Webview is the easiest. Still working on notification addon for the app.
Title: Re: ElkArte Community Android App
Post by: meetdilip on February 25, 2016, 05:19:05 am
Mind sharing the technique to add notifications to an app. I too make some webview apps. Would be great to know.
Title: Re: ElkArte Community Android App
Post by: ahrasis on February 25, 2016, 08:53:47 pm
Read previous replies and you'll find several guides are there already. We just want to make it works on elkarte.
Title: Re: ElkArte Community Android App
Post by: Spuds on March 02, 2016, 08:35:27 am
I must say it was very cool to find ElkArte in the play store :D  Great job @ahrasis
Title: Re: ElkArte Community Android App
Post by: ahrasis on August 18, 2016, 10:02:56 pm
Sorry @meetdilip for not answering. There is a way but I haven't done anything for it. Just wait as the knowledge to do it will be more openly shared.

In the meantime, I have added a proper connection error message if you are offline while opening this app. I will post to google play once everything is check out fine.
Title: Re: ElkArte Community Android App
Post by: Bloc on August 19, 2016, 01:07:18 pm
Quite nice, Ahrasis :) I see it basically renders the web version of the site, which is fine really. But it does have some glitches, because the theme has glitches. Most notably is that the icon-based main menu when breaking over 2 lines, will hide the top of the content. On my LG G2 it does that in portrait mode.
Title: Re: ElkArte Community Android App
Post by: ahrasis on September 19, 2016, 09:32:47 pm
I will be updating this app with some minor fixes and may be some additions. As a note, default menu and even footer may be overidden by css injection if there is no need for it filling up the space.

Fixes:
- Fixed the orientation issue i.e. the site view is currently reloading to default when orientation changes.

Additions:
- Hamburger side menu with icons?
- CSS injections?

Any other issues you are facing? Any css injections you wanna suggest?
Title: Re: ElkArte Community Android App
Post by: ahrasis on September 20, 2016, 12:11:40 pm
Just found and fixed another bug i.e. attaching (adding) files in the app. Quite a long solution as well, but luckily it is an open source. Those who are interested to get this fix, can grab it here: https://github.com/mgks/Os-FileUp
Title: Re: ElkArte Community Android App
Post by: ahrasis on September 21, 2016, 04:54:49 am
I have it ready here but without the sliding menu and I haven't upgraded it to Google Play yet. Beta testers can download it from this post. Don't forget to unzip it first. ;)
Title: Re: ElkArte Community Android App
Post by: ahrasis on September 24, 2016, 02:26:15 am
The 1.0.1 version of this is already in Google Play / Market.

I am planning to include an updated FaceIt for 1.1 in this app 1.0.2 version which is already included in current 1.0.1 version. It can only be seen if you are using Be Social and it is still very ugly, I'd say. This is done via css injection / replacement as mentioned before.

The coming version will also load all css and js files from the app, to make it run faster. This is however subject to ElkArte Community not using minified version of them because I kinda confused on how to fetch them and keep them in the app if that is the case.

I am also considering to load all default theme images from the app as well.This is something I have to study more, I'd say, but it will definitely load the app faster than the browser.

Last one will be fixing the notification system. It should only reminds app user exactly at 11.01am daily. Currently, it keeps reminding after certain period of time.

I am setting 6 months period for this.
Title: Re: ElkArte Community Android App
Post by: emanuele on September 24, 2016, 04:11:53 am
Quote from: ahrasis – This is however subject to ElkArte Community not using minified version of them because I kinda confused on how to fetch them and keep them in the app if that is the case.
How do you currently fetch them?
Title: Re: ElkArte Community Android App
Post by: ahrasis on September 24, 2016, 04:27:24 am
Currently, they are loading from the site except for besocial css which I replace it with faceit css from the app asset folder.

The plan is I just download from the site or ElkArte 1.1 b2, extract them and include them in the app asset folder. This will be similar to default theme images, but I have to do it more dynamically for them as they are many.

That is why it is kinda hard to figure for minified version since they are cached in the cache folder and renamed dynamically.
Title: Re: ElkArte Community Android App
Post by: emanuele on September 24, 2016, 06:20:26 am
So you distribute the css with the app?
Title: Re: ElkArte Community Android App
Post by: Spuds on September 24, 2016, 08:35:30 am
QuoteThe 1.0.1 version of this is already in Google Play / Market.
Cool ... there was an update available when I just checked
Title: Re: ElkArte Community Android App
Post by: ahrasis on September 24, 2016, 09:31:10 am
Quote from: emanuele – So you distribute the css with the app?
Yes, for testing purposes as I don't think many is using Be Social.

I kinda use the old ElkArte 1.0 version of css, with minor fixes i.e. copy svg css for the menu. Will update it to EA 1.1 later in 1.0.2.

Once I figure out on how to create and use android settings, I will have the user choose which css that they want. But that may be in version 1.0.5 or above.

More css can be tested or even promoted if this css injection is successfully added as a setting to the app.

Title: Re: ElkArte Community Android App
Post by: ahrasis on August 30, 2017, 01:43:27 am
I already reached v 1.0.5 (5). This version should have the following abilities:

1. Added floating button to share.
2. Added pull to refresh feature.
3. Added immediate exit button.
4. Implemented full view (no header).

It should already be available at Google Play.
(https://play.google.com/store/apps/details?id=net.elkarte.www)

Do also suggest what you want from this app so that I may slowly learn and develop them, when possible.
Title: Re: ElkArte Community Android App
Post by: Jorin on August 30, 2017, 01:57:46 am
Hey, you are using my logo draft! Cool!  :D

But some screenshots would be better. And you should think about editing the description. ;)
Title: Re: ElkArte Community Android App
Post by: ahrasis on August 30, 2017, 02:18:30 am
Was just grabbing here and there including your draft logo to build this app. I will try to get into the details and will update the Google Play site with proper information later. Thank you for the heads up.

By the way
@Jorin, do you have a reverse copy of those images copy you shared especially this one: http://www.elkarte.net/community/index.php?action=dlattach;topic=395.0;attach=1870;image ? I would prefer it in the reverse color as splash screen actually.
Title: Re: ElkArte Community Android App
Post by: Jorin on August 30, 2017, 02:22:52 am
Okay, great! Good luck with the app!

Hm... I have to look, but I think, yes. What exactly do you need, and what for? You can write a personal message if you want...
Title: Re: ElkArte Community Android App
Post by: ahrasis on August 30, 2017, 02:26:13 am
Sorry, just edited the previous post: I would prefer it in the reverse color as splash screen actually.
Title: Re: ElkArte Community Android App
Post by: Jorin on August 30, 2017, 02:27:57 am
Okay, please send me a message on the weekend as a reminder.  O:-)
Title: Re: ElkArte Community Android App
Post by: ahrasis on October 31, 2018, 06:31:56 am
I realized I haven't updated this app for more than a year. Sighed.

Basically, android no longer support other than android studio and other software communities have to find their ways to resolve this.

I tried to learn android studio and xamarin on my own, but I didn't understand any of them that much. I will try to find a way to upgrade the app later.