PDA

View Full Version here: : Simple android app to grab current conditions Upd: 13/7/12


Garbz
08-07-2012, 11:03 PM
Updated: 13/07/12
http://www2.garbz.com/Astro_Seeing_2.apk (http://www2.garbz.com/Astro_Seeing.apk) (1.27mb)

Changelog:
+ Added Legend.

I thought I would share something that I've been working on. For a while now I figured I want to see what it's like using AppInventor which was like an idiots guide to phone programming IDE. I also almost daily at the moment check the 7timer website for the forecast for the evening conditions, and recently got stuck in another city with my telescope and it took me a while to figure out where I was so I could get the current conditions.

Anyway this Android app is the result. :) It basically just gets the image from 7timer, but also allows you to get your currently location from GPS (slow but accurate), or from the network (fast but less accurate, but still there because it's good enough and doesn't chew battery). It also allows you to set GPS co-ordinates manually (this was for my testing but I never removed it, heck maybe someone out there finds it useful). Finally in case you're not sure where you are or what your provided location has come up with a button will drop a dot on google maps for you (for network only coverage this can show you where your nearest cellphone tower is if you're in a fringe coverage area).


Screenshot of the app in action:
http://www2.garbz.com/Astro_Seeing.jpg

Link to app:
http://www2.garbz.com/Astro_Seeing_2.apk (http://www2.garbz.com/Astro_Seeing.apk) (1.27mb)
Sorry about the slow transfer rate our internet connection has been crap this week.

How the app works:
On opening the app it will retrieve the last stored location. The text at the bottom shows the current location the app will retrieve co-ordinates for. If this text is in red then the picture above is not up to date.

Clicking "Refresh" will get the forecast and change the text colour to white.

Clicking "GPS Location" will retrieve the current location from which ever location provider is chosen and update the picture. (Bug: GPS doesn't turn off again until you hit "Refresh" though you don't need to hit refresh since as soon as a location is found it will update the picture anyway.)

Clicking "Manual Location" allows you to set a manual location and also allows you to chose if you want your location to come from GPS or Network.

Clicking "Check with Maps" opens up google maps to the currently chosen location.

Bug Reporting:
Feel free to use this app as you see fit. If you want the App Inventor Source package then let me know. You won't see this app in the market, but if you find a bug or have a feature request it can't hurt to post it here.
One caveat though, I've been an Android programmer for a total of 3 hours, I kid you not, so chances are slim that if this program doesn't work on your device that I can figure out why :shrug:. It works on a Galaxy S with Cyanogenmod 9 (Android 4.0.4)

Security Explanation:
In case you're into that sort of thing here's my explanation of the permissions it needs:


Location: Course (Network based) Fine (GPS Based) Mock Locations (comes up on my phone, but may be a development tool)
Storage: For remembering previous location and app preferences
Full Internet Access: For downloading images.
Phone Calls: Read phone state and identity (Honestly I have no idea. I don't know why it comes up and I don't know how to turn it off. )
Extras: Additional access to location providers is required because I couldn't get the phone to stay in GPS mode when I wanted fine co-ordinates. It always jumped backed to network. After I set Location1.LockProviders=true this permission is now requested.



Disclaimer:
If your phone catches fire it wasn't me... and you likely needed a new phone anyway :P. That said this program has been tested for a whole 20 minutes. Caveat emptor.

What's with the crappy name:
App Inventor asked me what to call my project. I had no idea it would end up as the package name or I would have called it "AWESOME APP" :D

supernova1965
11-07-2012, 10:13 AM
Hi Garbz,

Great app there is only one thing that would make it perfect a zoom function. Well done.:thumbsup:

h0ughy
11-07-2012, 11:09 AM
not being a app person how do you load it if you dont go to the app store?

supernova1965
11-07-2012, 01:34 PM
I browsed to the site on my phone and it downloaded and installed automatically h0ughy.

h0ughy
11-07-2012, 01:56 PM
ok i will try that :thanx::thumbsup:

Garbz
11-07-2012, 02:07 PM
What he said :)

Actually there is one other requirement depending on how Android is set up on the phone. It needs to allow non-market apps to be installed. On my phone this is under "Settings > Security > Unknown Sources" If I don't check this it won't allow me to install the program after I download and click on the .apk file.

Warren good suggestion, I'll see if that is somehow possible in the App Inventor IDE. It really is very basic in its capabilities but it may be possible.

h0ughy
11-07-2012, 02:11 PM
ok did it - i agree that a zoom function would be good - and a legend.

Kal
11-07-2012, 03:52 PM
downloaded and installed

cool app!

Garbz
12-07-2012, 12:10 AM
Now a legend I can do. It looks like pinch zoom I may be able to do as well. Did a bit of reading on it today.

Stay tuned this weekend for an update if all goes well :)

Garbz
13-07-2012, 11:24 PM
UPDATED 13/07/12

I've added a legend to the app.

Few things I can't fix within the bounds of AppInventor:
- Can't add a pinchzoom feature without leaving the app (pinchzoom renders in the browser).
- Can't multitask. This means I can't add a progress bar or anything like that, and the app appears to lock up while downloading the image from the website.
- Can't change the colour palate to dark red.

This is actually quite frustrating. I'll see about maybe redoing this app by actually coding it in java. Though that may mean brushing off a textbook I haven't read in many years.

http://www2.garbz.com/Astro_Seeing_2.apk (http://www2.garbz.com/Astro_Seeing.apk) (1.27mb)