-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b1f7bbe
Showing
32 changed files
with
1,473 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="org.cirg.kioskbrowser" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
<uses-sdk android:minSdkVersion="11" /> | ||
<uses-permission android:name = "android.permission.INTERNET"/> | ||
<application | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" > | ||
<activity | ||
android:name="org.cirg.kioskbrowser.KioskActivity" | ||
android:launchMode="singleTask" | ||
android:label="@string/app_name" | ||
android:configChanges="keyboardHidden|orientation" | ||
android:screenOrientation="landscape" | ||
android:theme="@android:style/Theme.Holo.NoActionBar"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<!-- set password activity --> | ||
<activity | ||
android:name="org.cirg.kioskbrowser.auth.SetPasswordActivity" | ||
android:exported="false" | ||
android:label="@string/title_set_password_activity"> | ||
<meta-data | ||
android:name="android.support.PARENT_ACTIVITY" | ||
android:value="org.cirg.kioksbrowser.KioskActivity"/> | ||
</activity> | ||
<!-- admin access activity --> | ||
<activity | ||
android:name="org.cirg.kioskbrowser.admin.AdminActivity" | ||
android:exported="false" | ||
android:label="@string/admin_access"> | ||
<meta-data | ||
android:name="android.support.PARENT_ACTIVITY" | ||
android:value="org.cirg.kioksbrowser.KioskActivity"/> | ||
</activity> | ||
|
||
<!-- make an activity alias to enable/disable the kiosk mode | ||
TODO this mode on and off is currently not supported | ||
--> | ||
<activity-alias | ||
android:enabled="true" | ||
android:name="org.cirg.kioskbrowser.KioskMode" | ||
android:exported="false" | ||
android:targetActivity="org.cirg.kioskbrowser.KioskActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.HOME" /> | ||
</intent-filter> | ||
</activity-alias> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Android Kiosk Browser | ||
==================== | ||
|
||
This application allows for kiosk-mode web browsing, intended for | ||
use with CIRG's PRO systems. This application runs on top of the lock | ||
screen and catches home screen intents. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Auth Failed</title> | ||
<link rel="stylesheet" media="all" href="noconfig.css"/> | ||
</head> | ||
<body> | ||
<h1 id="header">Authorization failed</h1> | ||
<div id="info"> | ||
<p> Press back to reload the page. </p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Setup</title> | ||
<script type="text/javascript" src="android.js"></script> | ||
<script type="text/javascript" src="host_lookup_fail.js"></script> | ||
<link rel="stylesheet" media="all" href="noconfig.css"/> | ||
</head> | ||
|
||
<body> | ||
<h1>Error: Host Lookup Failure</h1> | ||
<p>Looks like the webpage you requested was not valid. Would you like | ||
to reload the page, or go back to the previous page</p> | ||
<button type="button" id="close_app">Close App</button> | ||
<button type="button" id="reload">Reload Page</button> | ||
</body> | ||
|
||
|
||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
window.onload = onLoad; | ||
|
||
function onLoad(){ | ||
document.getElementById("close_app").onclick = closeApp; | ||
document.getElementById("reload").onclick = reloadPage; | ||
} | ||
|
||
function goBack(){ | ||
navigateHistory(-2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Setup</title> | ||
<link rel="stylesheet" media="all" href="noconfig.css"/> | ||
</head> | ||
<body> | ||
<h1 id="header">No kiosk password set.</h1> | ||
<div id="info"> | ||
<p> It looks like this is your first time starting this app. Hold down the back button to set your password.</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
body { | ||
text-align: center; | ||
background:#e4ebf1; | ||
line-height: 1.5em | ||
} | ||
|
||
html { | ||
font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; | ||
color: #333 | ||
} | ||
|
||
#info{ | ||
text-align: left; | ||
margin: auto; | ||
border: 2px solid black; | ||
width: 60%; | ||
padding: 10px; | ||
} | ||
#info.option{ | ||
text-align: center; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Setup</title> | ||
<link rel="stylesheet" media="all" href="noconfig.css"/> | ||
<script type="text/javascript" src="noconfig.js"></script> | ||
</head> | ||
<body> | ||
<h1 id="header">No config file found</h1> | ||
<div id="info"> | ||
<p> It looks like this is your first time starting this app. Please enter the URL of the config file you wish to use</p> | ||
<textarea id="configURL" rows="10" cols="50"></textarea> | ||
<button type="button" id="submit_button">Go</button> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
window.onload=onLoad; | ||
|
||
function onLoad(){ | ||
document.getElementById("submit_button").onclick = createConfig; | ||
} | ||
|
||
function createConfig(){ | ||
var configFile = document.getElementById("configURL").value; | ||
var xmlHttp = null; | ||
try{ | ||
xmlHttp = new XMLHttpRequest(); | ||
xmlHttp.open( "GET",configFile, false ); | ||
xmlHttp.send( null ); | ||
} | ||
catch(err){ | ||
Android.log(err); | ||
} | ||
config_contents = xmlHttp.responseText; | ||
Android.writeConfigFile(config_contents); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<config> | ||
<allowed-sites> | ||
<start-url>https://www.google.com</start-url> | ||
<host-regex>^.*google\.com$</host-regex> | ||
<host-regex>^.*slashdot.org$</host-regex> | ||
<host-regex>^.*facebook.com$</host-regex> | ||
</allowed-sites> | ||
<script host-regex="^.*facebook.com.*$"> | ||
alert("Domain specific scripts are allowed as well"); | ||
</script> | ||
</config> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# To enable ProGuard in your project, edit project.properties | ||
# to define the proguard.config property as described in that file. | ||
# | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in ${sdk.dir}/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the ProGuard | ||
# include property in project.properties. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
class: | ||
-keepclassmembers class org.cirg.kioskbrowser.JavaScriptInterface{ | ||
public *; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system edit | ||
# "ant.properties", and override values to adapt the script to your | ||
# project structure. | ||
# | ||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): | ||
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt | ||
|
||
# Project target. | ||
target=android-14 | ||
android.library.reference.1=../../gridlayout_v7 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:orientation="vertical" | ||
android:useDefaultMargins="false" > | ||
|
||
<Button | ||
android:id="@+id/continue_button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/continue_browsing" | ||
android:onClick="continueBrowsing" /> | ||
|
||
<Button | ||
android:id="@+id/reset_config_button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/reset_config" | ||
android:onClick="resetConfig" /> | ||
|
||
<Button | ||
android:id="@+id/set_password_button" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/set_password" | ||
android:onClick="setPassword"/> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" > | ||
|
||
<EditText | ||
android:id="@+id/auth_password" | ||
android:inputType="textPassword" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="4dp" | ||
android:layout_marginLeft="4dp" | ||
android:layout_marginRight="4dp" | ||
android:layout_marginBottom="16dp" | ||
android:hint="@string/password"/> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" > | ||
<EditText | ||
android:id="@+id/httpauth_username" | ||
android:inputType="text" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="4dp" | ||
android:layout_marginLeft="4dp" | ||
android:layout_marginRight="4dp" | ||
android:layout_marginBottom="16dp" | ||
android:hint="@string/username"/> | ||
<EditText | ||
android:id="@+id/httpauth_password" | ||
android:inputType="textPassword" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="4dp" | ||
android:layout_marginLeft="4dp" | ||
android:layout_marginRight="4dp" | ||
android:layout_marginBottom="16dp" | ||
android:hint="@string/password"/> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/layout" | ||
android:orientation="horizontal" | ||
android:layout_width = "fill_parent" | ||
android:layout_height= "fill_parent" | ||
android:scaleType="center" | ||
> | ||
<WebView | ||
android:id="@+id/webview" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:layout_alignParentTop="true" | ||
/> | ||
</FrameLayout> | ||
|
Oops, something went wrong.