Universal App

Community contributed apps
89delta
Posts: 163
Joined: Mon Oct 15, 2012 7:21 pm
Location: Leesburg, GA

Re: Universal App

Post by 89delta »

How often does the U-app update itself? If it's manual refresh only can we get setting settings for timed intervals like the regular android app?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Universal App

Post by rimai »

I don't think it is possible without understand better how you can create background services in the phone and I don't.
The app pauses when it is not in the foreground.
I'm pretty sure Curt uses android services to keep things running in the background.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Universal App

Post by lnevo »

I think he meant in the foreground does it refresh continuously.
89delta
Posts: 163
Joined: Mon Oct 15, 2012 7:21 pm
Location: Leesburg, GA

Re: Universal App

Post by 89delta »

lnevo wrote:I think he meant in the foreground does it refresh continuously.
Yes, that's what I meant. But I can take a look at the RAStatus app to see how Curt did it for the refresh later tonight.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Universal App

Post by rimai »

Yeah, foreground refresh is easy.
Can you open an issue on github?
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Universal App

Post by lnevo »

89delta wrote:
lnevo wrote:I think he meant in the foreground does it refresh continuously.
Yes, that's what I meant. But I can take a look at the RAStatus app to see how Curt did it for the refresh later tonight.
Remember this is being coded with phonegap. The iphone does provide some background services, but it would have to be done in a way that is supported cross platform, so it would be up to the API.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Universal App

Post by binder »

yeah, i use a background service and a timed event that gets started at boot and gets restarted when you make any specific changes.


Sent from my iPad mini
89delta
Posts: 163
Joined: Mon Oct 15, 2012 7:21 pm
Location: Leesburg, GA

Re: Universal App

Post by 89delta »

lnevo wrote: Remember this is being coded with phonegap. The iphone does provide some background services, but it would have to be done in a way that is supported cross platform, so it would be up to the API.
Oh bummer.....All I know somewhat is eclipse...lol. Will take me forever to learn another program.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Universal App

Post by lnevo »

Eclipse is just an IDE.

Phonegap is a library.

Depending on what language you used with Eclipse, you may or may not have to learn a new language :) But certainly a new API.
lucho
Posts: 80
Joined: Fri Mar 02, 2012 8:11 am

Re: Universal App

Post by lucho »

This app is great! Using it in my iPhone with no problem.
One suggestion, could we add more things to graph (WL, port activity).
Thanks!
User avatar
chachew
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX

Re: Universal App

Post by chachew »

So i have been looking more into the webApp version of this application. The major problem i keep running into is Cross-domain access, which is denied. I can get around that with JSONP or CORS but the problem with CORS is probably all pages on reefangel.com have 'Access-Control-Allow-Origin' enabled so i cannot even bypass the browser origin problems. I think this may also break with localhost access via port forwarding. All limitations with Cross-Domain access.

I can get around all the problems with cross-domain to reefangel.com BUT i have to use YQL calls. Im trying to avoid this at all costs. But the more i dig into this the more i think i may have to use it
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Universal App

Post by rimai »

Does it need to be jsonp or just the json array work?
Did you see the json output from the controller??
If jsonp is absolutely necessary, can we make it as a known static function, instead of an argument passed to the server embedded in the url?
Roberto.
User avatar
chachew
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX

Re: Universal App

Post by chachew »

Ultimately a JSONP response is what we will need

I did some testing with the json output from the controller but i was running to problems because of the port forwarding. Port forwarding is considered cross-domain as well. Ill have to do some more testing at home with CORS and ports but im not sure it will be resolved either.
User avatar
chachew
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX

Re: Universal App

Post by chachew »

So i got some things working last night for locally connecting to the reefangel server. Took me a while to figure it out but i got the jsonp response that i needed. I had to modify the RA_Wifi.cpp and RA_Wifi.h files to get the correct jsonp wrapping and content-type. The json responses from the webserver were coming back as and 'xml' content type. I also had to hardcode the jsonp wrapper into the response. All-in-all it was a successful night of looking at the various pieces of code.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Universal App

Post by lnevo »

Awesome!!!
User avatar
chachew
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX

Re: Universal App

Post by chachew »

rimai wrote:Does it need to be jsonp or just the json array work?
Did you see the json output from the controller??
If jsonp is absolutely necessary, can we make it as a known static function, instead of an argument passed to the server embedded in the url?
Roberto, i think it would be beneficial to have another url to call to get json. Would make things a lot easier :)
Similar to: "http://forum.reefangel.com/status/labels.aspx?id=RA_ID"
Maybe: "http://forum.reefangel.com/status/label ... x?id=RA_ID"

Could be anything really, that was just off the top of my head. The problem im having with the CORS call accessing the labels.aspx page is that the HTTP header is either missing the "Access-Control-Allow-Origin" header or its not allowing it. Maybe the simpler solution would to add the "Access-Control-Allow-Origin" HTTP header to that page.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Universal App

Post by rimai »

We already have :)
http://forum.reefangel.com/status/label ... x?id=RA_ID
In any case, I also added the header to both pages. Let me know if it works.
Roberto.
User avatar
chachew
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX

Re: Universal App

Post by chachew »

rimai wrote:We already have :)
http://forum.reefangel.com/status/label ... x?id=RA_ID
In any case, I also added the header to both pages. Let me know if it works.
Awesome! That's exactly what i need. Ill continue on with looking at things then. :D

Thanks, Roberto
Naptalene
Posts: 98
Joined: Tue Nov 05, 2013 12:50 am

Re: Universal App

Post by Naptalene »

Sorry if this is in the wrong thread...

Is there anyway to give an option to turn on a password to get into the app?
My kids play on my phone and I'm getting paranoid that they over ride/ turn things on/off.

Thanks
Believe it or not.... I can ask even stupider questions than this one.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Universal App

Post by lnevo »

Good idea... I thought this was doable on the iPhone, but apparently not. Unless we change the rating of the app to 12+ or 17+ :)
poolman
Posts: 17
Joined: Mon Jan 30, 2012 1:36 am

Re: Universal App

Post by poolman »

Hi Roberto

Just wanted to say I upgraded to the plus and have been running for two weeks now and everything has been rock solid on the app. Well done.
Thanks
New2novas
Posts: 33
Joined: Wed Sep 18, 2013 6:17 pm

Re: Universal App

Post by New2novas »

I'm having problems getting on the app, I know port forwarding is working properly because I change change pump settings from the portal.
Image
treetopflyn
Posts: 89
Joined: Fri Oct 05, 2012 1:58 am

Re: Universal App

Post by treetopflyn »

I can't get this to work. It says my forum name is not set up.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Universal App

Post by rimai »

That will happen if your controller doesn't send data to the Portal and you are trying to download labels or chart data or something else from the Portal.
Make sure your code has this line:

Code: Select all

ReefAngel.Portal("treetopflyn");
Roberto.
treetopflyn
Posts: 89
Joined: Fri Oct 05, 2012 1:58 am

Re: Universal App

Post by treetopflyn »

But I don't have this issue with the app that this one replaced. It is working fine.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Universal App

Post by rimai »

The previous app, you would have to manually setup the forum username.
The UApp pulls it directly from RA, so you don't need to enter it. Also, if you have many controllers, the app is smart enough to pull data correctly because it actually finds out the forum username from the controller itself.
The previous app could only accommodate one controller.
Roberto.
treetopflyn
Posts: 89
Joined: Fri Oct 05, 2012 1:58 am

Re: Universal App

Post by treetopflyn »

Got ya. I'll check the code. Thanks
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Universal App

Post by lnevo »

Roberto, can you add a window for the webcam screen defined in the portal?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Universal App

Post by rimai »

Can you open an issue?
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Universal App

Post by lnevo »

Sure
Post Reply