Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding changes to GpiiActivity.java class and AndroidManifest.xml from Gpii Android Application in order to allow its own installation #27

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions platform/app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<uses-permission android:name="android.permission.READ_SMS"></uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>

<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" android:required="false"/>

<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
Expand Down
148 changes: 148 additions & 0 deletions platform/app/res/layout-xlarge-land/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:scrollbars="vertical"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true" >

<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:src="@drawable/gpii_logo"
android:scaleX="0.65"
android:scaleY="0.65"
android:contentDescription="@string/gpii_logo_content" />

<Button
android:id="@+id/installButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1"
android:layout_centerHorizontal="true"
android:layout_marginLeft="92dp"
android:visibility="gone"
android:text="@string/button_intallation" />

<RelativeLayout
android:id="@+id/gpii_Info"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1">

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/gpii_status_label"
android:textStyle="bold"
android:layout_marginTop="15dp"
/>

<TextView
android:id="@+id/gpii_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@+id/textView1"
android:text="@string/gpii_status_unknown"
android:textColorHighlight="@android:color/darker_gray"
/>

<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1"
android:text="@string/gpii_script_label"
android:layout_marginTop="15dp"
android:textStyle="bold"
/>

<EditText
android:id="@+id/gpii_script_uri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView01"
android:layout_alignParentRight="true"
android:layout_below="@+id/TextView01"
android:layout_marginTop="10dp"
android:ems="10"
android:inputType="textUri"
android:maxLines="1"
android:scrollHorizontally="true"
android:text="@string/gpii_default_script_uri"
/>

<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/gpii_script_uri"
android:layout_below="@+id/gpii_script_uri"
android:layout_marginTop="23dp"
android:text="@string/gpii_controls"
android:textStyle="bold"
/>

<Button
android:id="@+id/gpii_start_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/TextView02"
android:layout_marginTop="10dp"
android:text="@string/gpii_controls_start"
/>

<Button
android:id="@+id/gpii_stop_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gpii_start_button"
android:layout_toRightOf="@+id/gpii_start_button"
android:text="@string/gpii_controls_stop"
/>

<Button
android:id="@+id/gpii_kill_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gpii_stop_button"
android:layout_toRightOf="@+id/gpii_stop_button"
android:text="@string/gpii_controls_kill"
/>

<Button
android:id="@+id/gpii_update_status_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gpii_kill_button"
android:layout_toRightOf="@+id/gpii_kill_button"
android:text="@string/gpii_controls_update_status"
android:singleLine="true"
/>

</RelativeLayout>

<Button
android:id="@+id/downloadButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/button_download" />

</RelativeLayout>
26 changes: 26 additions & 0 deletions platform/app/res/layout-xlarge-land/progress_download_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#88000000">

<TextView
android:id="@+id/textview_overlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textAlignment="center"
android:text="@string/waitfor"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_margin="5dp"/>
<ProgressBar
android:id="@+id/progressbar_overlay"
android:layout_below="@id/textview_overlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/>

</RelativeLayout>
148 changes: 148 additions & 0 deletions platform/app/res/layout-xlarge/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:scrollbars="vertical"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true" >

<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:adjustViewBounds="true"
android:src="@drawable/gpii_logo"
android:scaleX="0.85"
android:scaleY="0.85"
android:contentDescription="@string/gpii_logo_content" />

<Button
android:id="@+id/installButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1"
android:layout_centerHorizontal="true"
android:layout_marginLeft="92dp"
android:visibility="gone"
android:text="@string/button_intallation" />

<RelativeLayout
android:id="@+id/gpii_Info"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1">

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/gpii_status_label"
android:textStyle="bold"
android:layout_marginTop="15dp"
/>

<TextView
android:id="@+id/gpii_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/textView1"
android:layout_alignBottom="@+id/textView1"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@+id/textView1"
android:text="@string/gpii_status_unknown"
android:textColorHighlight="@android:color/darker_gray"
/>

<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1"
android:text="@string/gpii_script_label"
android:layout_marginTop="15dp"
android:textStyle="bold"
/>

<EditText
android:id="@+id/gpii_script_uri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/TextView01"
android:layout_alignParentRight="true"
android:layout_below="@+id/TextView01"
android:layout_marginTop="10dp"
android:ems="10"
android:inputType="textUri"
android:maxLines="1"
android:scrollHorizontally="true"
android:text="@string/gpii_default_script_uri"
/>

<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/gpii_script_uri"
android:layout_below="@+id/gpii_script_uri"
android:layout_marginTop="23dp"
android:text="@string/gpii_controls"
android:textStyle="bold"
/>

<Button
android:id="@+id/gpii_start_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/TextView02"
android:layout_marginTop="10dp"
android:text="@string/gpii_controls_start"
/>

<Button
android:id="@+id/gpii_stop_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gpii_start_button"
android:layout_toRightOf="@+id/gpii_start_button"
android:text="@string/gpii_controls_stop"
/>

<Button
android:id="@+id/gpii_kill_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gpii_stop_button"
android:layout_toRightOf="@+id/gpii_stop_button"
android:text="@string/gpii_controls_kill"
/>

<Button
android:id="@+id/gpii_update_status_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/gpii_kill_button"
android:layout_toRightOf="@+id/gpii_kill_button"
android:text="@string/gpii_controls_update_status"
android:singleLine="true"
/>

</RelativeLayout>

<Button
android:id="@+id/downloadButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/button_download" />

</RelativeLayout>
26 changes: 26 additions & 0 deletions platform/app/res/layout-xlarge/progress_download_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#88000000">

<TextView
android:id="@+id/textview_overlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textAlignment="center"
android:text="@string/waitfor"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_margin="5dp"/>
<ProgressBar
android:id="@+id/progressbar_overlay"
android:layout_below="@id/textview_overlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/>

</RelativeLayout>
26 changes: 26 additions & 0 deletions platform/app/res/layout/progress_download_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#88000000">

<TextView
android:id="@+id/textview_overlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textAlignment="center"
android:text="@string/waitfor"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_margin="5dp"/>
<ProgressBar
android:id="@+id/progressbar_overlay"
android:layout_below="@id/textview_overlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/>

</RelativeLayout>
3 changes: 3 additions & 0 deletions platform/app/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
<string name="gpii_default_script_uri">/sdcard/gpii/android/gpii.js</string>
<string name="gpii_logo_content">Logo des GPII Projekts</string>
<string name="gpii_controls_update_status">Status prüfen</string>
<string name="waitfor">Bitte warten Sie, bis Cloud4All heruntergeladen wurde</string>
<string name="button_intallation">Installieren Cloud4All Platform</string>
<string name="button_download">Laden Sie Cloud4All Platform</string>

</resources>
Loading