Page 9 of 33
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 8:30 am
by rimai
The new libs on dev branch have the lights on/off commands already

I also created dedicated functions for it.
Code: Select all
ReefAngel.LightsOn();
ReefAngel.LightsOff();
Re:
Posted: Sat Apr 20, 2013 8:40 am
by cosmith71
binder wrote:
good requests.
what did you have in mind for the graphical representations? like a slider bar or something else?
Yes, slider bars. Something similar to what's on the portal.
--Colin
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 8:43 am
by rimai
Uh... Ohh...
You will also like to know that I created the override for the PWM channels, so if you ever make this graphical representation, can we have long-press to override the values???

I created override for all light channels

(standard dimming, expansion dimming, AI and Radion)
It's all in the new libs

Posted: Sat Apr 20, 2013 9:49 am
by binder
rimai wrote:Uh... Ohh...
You will also like to know that I created the override for the PWM channels, so if you ever make this graphical representation, can we have long-press to override the values???

I created override for all light channels

(standard dimming, expansion dimming, AI and Radion)
It's all in the new libs

exactly.
so from what it sounds like, all the "cool" features will be in the next library release. guess I better get snapping and implement these features.
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 12:00 pm
by DrewPalmer04
Basically.... I'm just jealous of you android users

lol
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 12:35 pm
by binder
DrewPalmer04 wrote:Basically.... I'm just jealous of you android users

lol
iOS seems harder and more complicated to me.

I did start going through an online class at Stanford about iOS development but I've only gotten through 1 assignment. Ideally, I want to create an iOS app similar to my android app (even though there is the existing iOS app). Unfortunately, I'm slow.

Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 2:14 pm
by binder
cosmith71 wrote:
Commands screen as a "swipe to" like status and main relay
I've got something working now. It's simply a stripped down version of the commands page. The commands page will still exist though. You will swipe left from the main Status page. The only command that is not implemented is the Version command. I'm not sure how necessary or important it is to have it on that screen. It's probably not a commonly used command. Does it need to be on this page??
Here's a screenshot:

- commands, swipe to the left
- commands_swipe.png (21 KiB) Viewed 8005 times
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 2:38 pm
by cosmith71
That's perfect! Nice big buttons for the important things.
I think I used the Version command once to see what it did. I think it's great like it is.
Thanks!
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 4:58 pm
by binder
I've been working on a new layout and look for the individual pages. I've come up with this one so far....I still need to change the layout for the PWM channels, but at least this is a start. I've increased the text size and made the layout more "solid" in terms that it does not change much when you change the labels around. I've also added a subtitle to indicate what value you are actually displaying. You will see what I mean when you look at the screen shot. It also flows better if you have items hidden (like me). So there's not going to be this abnormal space where the T3 label was.

Feedback is always welcome.

- New Status Layout
- NewStatusLayout.png (39.75 KiB) Viewed 7999 times
I'm working on the Relay pages next....
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 6:20 pm
by binder
And the new Relay box layout....

- New Relay Layout
- NewRelayLayout.png (42.39 KiB) Viewed 7996 times
There's a subtitle that contains the actual port and the layout is more uniform no matter how long the label is. Also, the relay override mask button is on the opposite side to keep the layout consistent.
Re: Android Reef Angel Status
Posted: Sat Apr 20, 2013 7:11 pm
by cosmith71
Looks good. I like the uniformity and the port names along with the labels.
--Colin
Re: Android Reef Angel Status
Posted: Sun Apr 21, 2013 10:36 am
by binder
Re: Android Reef Angel Status
Posted: Tue Apr 23, 2013 5:49 am
by topjimmy
binder wrote:topjimmy wrote:How do I set up and "Away" profile? What IP do I use?
open up the settings page and input your ip address. since you probably just have a dynamic home ip address, what most people use is a free dynamic dns address for their network. using something like no-ip.com and running their application to automatically update their ip when/if it ever changes. also, you must open up port 2000 on your router to allow access to your network from the outside world. i know there are other topics on the forum that discuss this already.
I used the same ip and port as the portal, which works, but the app gets an error 13?
Re: Android Reef Angel Status
Posted: Tue Apr 23, 2013 7:46 am
by DrewPalmer04
Binder: do you have to have a dev license for android apps? I'm considering converting to the android side of the world lol. My iPhone is slowing down and driving me crazy.
Re: Android Reef Angel Status
Posted: Tue Apr 23, 2013 10:03 am
by binder
topjimmy wrote:
I used the same ip and port as the portal, which works, but the app gets an error 13?
sometimes if you try to connect too fast, the controller does not respond or if you have multiple connections being made at the same time it will error out at times.
Re: Android Reef Angel Status
Posted: Tue Apr 23, 2013 10:03 am
by binder
topjimmy wrote:
I used the same ip and port as the portal, which works, but the app gets an error 13?
sometimes if you try to connect too fast, the controller does not respond or if you have multiple connections being made at the same time it will error out at times.
Re: Android Reef Angel Status
Posted: Tue Apr 23, 2013 10:08 am
by binder
DrewPalmer04 wrote:Binder: do you have to have a dev license for android apps? I'm considering converting to the android side of the world lol. My iPhone is slowing down and driving me crazy.
yes and no. yes if you want to publish on the google play store for people to install and update. the license is a one time $25 fee (unless they raised it).
no if you want develop your own apps and only install them on your phone manually. you cannot distribute these on the play store. they can be the normal releases but just not on the play store. you also must allow your phone to install apps from unknown sources.
the main thing is the dev license just gives you the ability to distribute your apps on the play store.
Re: Android Reef Angel Status
Posted: Wed Apr 24, 2013 4:33 pm
by binder
I've been making more changes to the layout to use the new actionbar layout across all devices. I moved the refresh button to the actionbar and removed it from the main layout. The "only" problem with this is that the profiles are not easily switched unless I add a drop down list in the actionbar.

- ActionBar Layout
- ActionBarLayout.png (44.13 KiB) Viewed 7946 times
What do you guys think?
Is there a need for an easy way to change profiles?
Re: Android Reef Angel Status
Posted: Wed Apr 24, 2013 5:45 pm
by cosmith71
I never change profiles.
--Colin
Re: Android Reef Angel Status
Posted: Wed Apr 24, 2013 6:30 pm
by binder
Hopefully the "final" release of the layout and last time I post a picture for a while.

I now am making use of the ActionBar along with an Indicator for all the pages to be viewed. IMO, it looks pretty sweet.

- Completed Layout
- AwesomeLayout.png (29.33 KiB) Viewed 7937 times
Re: Android Reef Angel Status
Posted: Wed Apr 24, 2013 7:01 pm
by cosmith71
Lol@ "AwesomeLayout.png"
Looks great!
Re: Android Reef Angel Status
Posted: Wed Apr 24, 2013 7:02 pm
by rimai
I like it

Evolution uses the same bar.
Re: Android Reef Angel Status
Posted: Sun Apr 28, 2013 1:32 am
by phrusher
Looks great! The two changes I've been really looking forward to are swipe to commands and the refresh moved up to the action bar

(I never switch profiles either). What is the flash symbol next to refresh?
As an additional request for future update, when setting update interval to Manual (never) the service should be stopped. There is no reason for the service to be active if only manual updates are preformed. Or an optional solution could be to keep the service and just update whenever the screens turns on with BroadcastReceiver and ACTION_SCREEN_ON. That would be pretty sweet.
Re: Android Reef Angel Status
Posted: Sun Apr 28, 2013 8:04 am
by binder
phrusher wrote:Looks great! The two changes I've been really looking forward to are swipe to commands and the refresh moved up to the action bar

(I never switch profiles either). What is the flash symbol next to refresh?
The flash symbol is for the Internal Memory. If you have a large enough screen, it displays memory next to it. There's also the History icon that looks like a list. Thanks for the feedback!
phrusher wrote:As an additional request for future update, when setting update interval to Manual (never) the service should be stopped. There is no reason for the service to be active if only manual updates are preformed. Or an optional solution could be to keep the service and just update whenever the screens turns on with BroadcastReceiver and ACTION_SCREEN_ON. That would be pretty sweet.
There are actually 2 services that are associated with the app. One is the auto update service and the other is just listener / communication service. If auto update is set to manual, the auto update service is cancelled. It's actually an alarm that the android service sends a message to run at the specified interval. The communication service is just sitting there doing nothing but sleeping and waiting for commands to be sent to it. It has to be there for the auto update service and for any app that wishes to communicate with the controller.
When I simplified the communications, just that service communicates with the controller. So all the parts of the app just send a message to the service to grab the latest data from the controller and update the database. When it's updated, then it sends a message back to the app that it's updated and to update it's data.
I don't think I would like having the service update every time I turn my screen on. That would be a little excessive to me.

Although, I "could" put that feature in for you if you would like to have it.
I will take a look at the service code and see if there's an easy way to only start it if it's not on Manual. Then if it is on Manual, start it when you launch an update/send a command/update the memory/etc and then shut it down when the app pauses or when the command finishes.
I did do a quick google search on this topic just before I posted my reply which caused me to change it before I posted it.

I honestly had not given it much thought about the service sitting there running because I mostly deal with an update interval of 4 hours, so it's always running and that didn't seem to bother me.
However, I know I wrote most of my app with the ability to check and see if the service was running and if it was not running to start it up. So the functionality that you are mentioning, should definitely be doable and fairly simple to implement. With that being said, I'm going to give it a little closer look to see if there's a better way for me to handle the running service even if auto updating is enabled. I may just do this in a multi-part update pattern where I handle the Manual case first to keep it off unless you are using the app for updating and then work on the rest later because if somebody wants the app to update automatically, they are going to want it to run in the background.
I found this post:
http://stackoverflow.com/questions/2545 ... ed-or-to-l
I am reading it through plus the associated articles and posts with it. So updates to how this works will be made. This will go along with me improving the performance of my app and also simplifying it to allow for the bigger updates I plan on making in the future. It's just part of the every evolving and expanding nature of the apps. Thanks for mentioning this to me and pointing it out!! I will see what I can do.

Re: Android Reef Angel Status
Posted: Sun Apr 28, 2013 8:09 am
by cosmith71
Everything looks awesome! Can't wait for the release (hint hint)!
--Colin
Posted: Sun Apr 28, 2013 2:27 pm
by binder
cosmith71 wrote:Everything looks awesome! Can't wait for the release (hint hint)!
--Colin
I'm testing it on my phone and tablet. There still is a couple items I need/want to implement before the release.
Re: Android Reef Angel Status
Posted: Sat May 04, 2013 8:59 am
by binder
Since my last post about removing the ability to switch profiles with the change to an ActionBar layout, I did some more thinking and experimenting. I figured out a way to add the profile switching back. I implemented the List navigation in the actionbar. In the actionbar, the "Home" profile will always be visible. If you have an Away profile enabled, then you will have "Home" and "Away" visible in the navigation list. All you must do is simply change the list to switch profiles.
The only downside is that I removed the application title from the status bar. I didn't feel that it was a big deal because most people would rather have functionality instead of seeing the name of the app. You still see the icon, but not the title.
Here's a screenshot to show you what it looks like now.

- Navigation List
- NavList.png (34.85 KiB) Viewed 8088 times
Re: Android Reef Angel Status
Posted: Sat May 04, 2013 9:00 am
by rimai
I like it

Re: Android Reef Angel Status
Posted: Mon May 06, 2013 11:41 am
by phrusher
binder wrote:In the actionbar, the "Home" profile will always be visible. If you have an Away profile enabled, then you will have "Home" and "Away" visible in the navigation list. All you must do is simply change the list to switch profiles.
Looks great! Just to make sure, it still remembers if Away is my preferred profile?
Regarding the background service it sounds like the best solution is the one you are proposing. Check if its running or else start it up and shut it down after the response or it timeouts. The benefit of this is that the same code could be used on both manual and timer so it might result in slightly better maintainability. It's not super important since the service is hardly using any resources (only around 3MB on phone, 16MB on tab) but it's always a bit annoying with all the apps that don't require a service still start them
You can hold on with the "update on screen start". Manual might be sufficient and most people probably turn on the screen rather frequently and it might be spamming the controller unless some time buffer is implemented. Maybe later though
Now release it already or I have to get the source and compile it myself

Android Reef Angel Status
Posted: Mon May 06, 2013 3:33 pm
by binder
phrusher wrote:binder wrote:In the actionbar, the "Home" profile will always be visible. If you have an Away profile enabled, then you will have "Home" and "Away" visible in the navigation list. All you must do is simply change the list to switch profiles.
Looks great! Just to make sure, it still remembers if Away is my preferred profile?
Regarding the background service it sounds like the best solution is the one you are proposing. Check if its running or else start it up and shut it down after the response or it timeouts. The benefit of this is that the same code could be used on both manual and timer so it might result in slightly better maintainability. It's not super important since the service is hardly using any resources (only around 3MB on phone, 16MB on tab) but it's always a bit annoying with all the apps that don't require a service still start them
You can hold on with the "update on screen start". Manual might be sufficient and most people probably turn on the screen rather frequently and it might be spamming the controller unless some time buffer is implemented. Maybe later though
Now release it already or I have to get the source and compile it myself

yes, it remembers what profile you have selected, just like it currently does. i dont plan or try to break existing functionality unless i absolutely have to.
i still have to get the stopping service functionality fixed before i can release it. i made some big behind the scenes changes and am testing it to make sure things still work properly. i also need to see if i can speed up the app as well because it runs slow in the emulator.
i was going to try to get a few more features in before i release but i think im gonna hold off until next release for the next 2 significant features (saved custom memory locations and parameter notifications).
