Jump to content
IanB

3rd Party Android App

8 posts in this topic Last Reply

Recommended Posts

I decided to explore the possibility of writing my own Android application for Unraid. This was more of an opportunity for me to explore some areas of Android that I hadn't played around with, along with building a new app from scratch. Development was pretty quick/rapid and was able to throw together something that I personally liked. It's now mostly functional, but the key areas missing are not really programming challenges, but more challenges with continuing to try and reverse engineer the API to extract the necessary information from an Unraid server (since there isn't any official supported API).

 

Where is the best place to ask for help? Just ask the individual / specific questions in the forums? I've also not decided if i'd actually release the app for others - I guess it will depend on any interest there is in it. I'd probably want to seek permission though to make sure the Unraid team area happy with it first.

 

Some of the types of questions I hate:

  • What is the correct way to extract the "csrf_token" for the server? And how often should I refresh it?
  • Is there a way to update/obtain share sizes individually? I've been playing around with the "/webGui/scripts/share_size" script exectued via "/update.htm" followed by grabbing the generated "/state/x" file - but it doesn't seem to be correct?

 

In case people are interested in seeing some screenshots, here's a few (slightly out of date)...

 

Home.thumb.jpg.dce34f3f989473e60c920a9b141908f0.jpgDisks.thumb.jpg.9d3198ed3b72348ce30cb6605ac3401f.jpgShares.thumb.jpg.02e7b59eaf6615efce4cd4a8e304abff.jpgDocker.thumb.jpg.3c8f9f75ea32d63db9bdf066f38f4218.jpg

Share this post


Link to post

Awesome, I hope you get direct help from the dev team I hope as well you release the app for the whole community.

Share this post


Link to post
2 hours ago, IanB said:

What is the correct way to extract the "csrf_token" for the server? And how often should I refresh it?

From /var/local/emhttp/var.ini.  It's changed on every reboot of the server.

Share this post


Link to post
1 hour ago, Squid said:

From /var/local/emhttp/var.ini.  It's changed on every reboot of the server.

 

Thanks @Squid! I totally missed that, accessible via "/state/var.ini".

Share this post


Link to post

@Squid Don't suppose you know an easy way to obtain the `Uptime` from the server? I had hoped to also find it in the same var.ini file, but doesn't seem to be present...

Share this post


Link to post
12 hours ago, Squid said:

Only by running uptime

 

Sorry @Squid, not sure I follow. I'm basically trying to programmatically determine the same details presented here by the Web interface:

 

1817397290_2019-04-16at12_14.png.4b2d5cbcdb7defa717b1b01cb8559d38.png

 

Thanks in advance

Share this post


Link to post
24 minutes ago, IanB said:

 

Sorry @Squid, not sure I follow. I'm basically trying to programmatically determine the same details presented here by the Web interface:

 

1817397290_2019-04-16at12_14.png.4b2d5cbcdb7defa717b1b01cb8559d38.png 

 

Thanks in advance

That is a subset of the information returned by the CLI level 'uptime' command.  Perhaps you had not realised that 'uptime' is a standard command?

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.