Jump to content


Photo
- - - - -

[download] Android SYS Webview App


  • Please log in to reply
12 replies to this topic

#1 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 24 April 2011 - 04:53 PM

Posted Image

File Name: Android SYS Webview App
File Submitter: etc6849
File Submitted: 24 Apr 2011
File Category: Premise
Author: etc6849
Contact: PM

Here's an Android webview app I've built specifically for SYS Minibrowser. It seems to be working well, so I thought I'd share.

Requirements
123's minibrowser module or equivalent running on a Premise SYS server. Compiled for Android 2.2 or newer. If you don't use Android 2.2, if you ask nicely, we can figure something out Posted Image PS: You can always upgrade to Cyanogenmod which is now 2.3 and very stable; it's also open source.

Install
You will have to enable under Applications: "Unknown sources" which allows installation of non-Market applications. You then can install the app using adb or whatever method you like. The app is signed and should install once you enable "Unknown sources."

Detailed Steps
Download the zip file. Unzip one level to reach apk file (don't unzip apk). Plug your phone into your PC and mount it as a storage device. Copy the apk file to your SD card, then unmount your phone as a storage device. Browse the sd card using Root Explorer and click the apk to install.

If you don't have "Root Explorer" (costs a few dollars and is available in the android market), there are numerous tutorials on how to install the file for free. Google "adb install apk" for additional methods.

Important note: which ever mini browser root you are using, disable refresh by setting UIRefreshInterval to 0. The app will auto refresh on it's own so as to prevent a SYS session timeout. Also screen will be white upon first start; you must hit menu and configure the settings, then click the back button on your phone

Features
1. Gets rid of all bars that you would normally see if you used a web browser. It offers the look and feel of an external app in true full screen mode.
2. Disables the multi-touch zoom, always keeping your mini browser in full screen. This prevents unintended zooming.
3. Scroll bars are auto hidden (e.g. only show up when you're scrolling).
4. Makes full use of the android app "life cycle" since it extends the activity class. This means when your phone goes to standby, nothing happens to save battery life. When it comes out of standby the phone will auto refresh and restart refreshing on a set interval (see below).
5. The app will automatically log in and icons are automatically cached by android (and android does a great job with caching, so I didn't implement my own method).
6. Some preferences come preset, but some such as Server Location MUST be changed in the settings menu upon initial install.

Menu Options
1. Refresh refreshes the screen using the address: http://ip:port/folder name/
2. Quit will finish() the activity (e.g. cause the app to properly close).
3. Under settings you'll find several preferences:
3.1. Server Location (it's preferred to use a free dynamic hosting service such as dyndns.org; for example, your serer location could be myDomain.dyndns.org or an ip address)
3.2. Port Number
3.3. Username (recommended if using minibrowser from the internet and not subnet)
3.4. Password (recommended if using minibrowser from the internet and not subnet)
3.5. Mini Browsser UI Name (name of root folder (e.g. ppc, xb etc.. used for Mini Browser SYS web redirect)
3.6. Refresh Interval
This refreshes the page automatically every x seconds. It must be set greater than 5 seconds, else auto refresh will be disabled. This only happens when the app is in the foreground to save bandwidth and follow the android app life cycle.
3.7. Orientation (used to set orientation in landscape (locked), portrait (locked) or enable orientation via sensor)
3.8. All user preferences (username, password etc...) are stored in a location private to this application only. If you uninstall this app, it will remove this information.

Please post any comments or issues in the support forum. I'll post more screen shots there.

New for RC8
1. A user's password is now completely hidden from view. (It was always protected internally though).
2. A concept called "Refresh After Touch" has been implemented.
A touch listener is used to suspend automatic refreshes. This means if a user interacts with a webpage, the page cannot refresh during the interaction.

To facilitate this, a new preference called "Refresh After Touch" is used to determine the timeout period where no automatic refreshing will take place. "Refresh After Touch" has an added benefit in that it refreshes the page after x seconds; no matter what the preference "Refresh Interval" is set to. Refresh Interval could be disabled and you can still use Refresh After Touch to load an updated page following user interaction. You can also disable "Refresh After Touch" by setting its value to zero.

PS: I'm not sure if this is clear or not, but this program could be used for displaying any webpage. This means it can be used with other HA systems that have html or flash pages.

Click here to download this file

#2 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 24 April 2011 - 04:54 PM

Main page

Attached Files



#3 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 24 April 2011 - 04:55 PM

Main page after the menu key is hit (Note menu color will be transparent black if you are running Android 2.3)...

Attached Files


Edited by etc6849, 24 April 2011 - 04:55 PM.


#4 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 24 April 2011 - 04:56 PM

Preference/Settings screen (access from menu->settings)

Attached Files


Edited by etc6849, 24 April 2011 - 04:57 PM.


#5 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 24 April 2011 - 04:58 PM

Orientation setting...

Attached Files



#6 chucklyons

chucklyons

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 654 posts
  • Location:Santa Cruz, Ca
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:INSTEON, Z-Wave, RadioRA
  • Audio:Xantech
  • CCTV:ip

Posted 27 April 2011 - 10:34 AM

ETC! Very nice...so you figured out how to stop the multiple threads...excellent. Built a 'native' Premise Android app! Nice. I'm looking forward to it (of course Ill have to see if I can get my Droid tablet back)...and I guess I'll have to do something for your graphics Posted Image

Excellent!

#7 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 27 April 2011 - 05:22 PM

Thanks for complements! The graphics are the boring/stock, but the good news is they are small in file size. When you're ready to try it out, PM me and I'll send you a copy of the source so that you can modify the menus (the menus are all stock android, but can be changed) or recompile to your specific version of android.

It goes without saying, but the app could be used for displaying any web page you want. If you point it towards your "ip" directory or any root mini broker directory, it will still work ;)

#8 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 01 May 2011 - 06:29 PM

I have added a handy feature that automatically refreshes a page following user interaction after a user defined interval. It also suspends all automatic refreshing during the user interaction, which is nice too.

#9 txwindsufer

txwindsufer

    Newbie

  • New Member
  • Pip
  • 1 posts

Posted 02 January 2012 - 04:52 PM

I am not a sophisticated user but a long-time user and I am thrilled by the continued work of so many. I have a Lutron homeworks system but since scenes and keypads are not part of the minibrower UI I have been unable to control multiple lights with a single button. However, I noticed on the graphics that were posted that a second row of buttons appear to control multiple lights. Would you be so kind as to explain how you implemented this second row of buttons to control multiple lights?

#10 chucklyons

chucklyons

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 654 posts
  • Location:Santa Cruz, Ca
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:INSTEON, Z-Wave, RadioRA
  • Audio:Xantech
  • CCTV:ip

Posted 02 January 2012 - 07:46 PM

I'm not sure I'm following what you're trying to do - you want one button to control 'n' lights ? Or multiple lights, like 'show all lights'?

#11 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 02 January 2012 - 08:00 PM

You just right click on Home, then click New->Custom User Interface Folder. Then you add CustomPanel object under the WebPreferenceFolder that's created. Next, you add Panel Buttons under the CustomPanel object and add a macro under each button. I use script macros since it's easier for me to write a script than click, but you can use any type of macro.

Check out the wiki here and follow the links at the bottom to watch the training videos. In one of the videos this is covered in detail.

#12 MikeSr

MikeSr

    Newbie

  • Registered
  • Pip
  • 2 posts

Posted 29 July 2012 - 05:29 PM

I havee tried the app and it works well except the audio volume doesnt work. the mute does work.
let me know if ihave something configured wrong.
Thank you for your hard work.

#13 etc6849

etc6849

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1606 posts
  • Location:Irmo, SC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1
  • Tech:X10-RF, Z-Wave, Custom
  • Phone:OBi100/110

Posted 02 August 2012 - 04:49 PM

Could you please be more specific. Are the audio buttons not working or do you simply hear no sound?

On my phone I don't use the browser to play music directly, but the button presses do make sound as they should. I can also change volume levels. I would download chrome and try things from a PC. If it works in Chrome, it should work in a webview app...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users