Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:audaciouscode/PassiveDataKit-Android
- Loading branch information
Showing
24 changed files
with
975 additions
and
9 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 |
---|---|---|
@@ -1,14 +1,18 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.audacious_software.pdk.passivedatakit"> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" /> | ||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" /> | ||
<uses-permission android:name="android.permission.READ_CALL_LOG" /> | ||
<uses-permission android:name="android.permission.READ_SMS" /> | ||
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"> | ||
<application android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" android:theme="@style/AppTheme"> | ||
<activity android:name="com.audacious_software.passive_data_kit.activities.generators.MicrosoftBandAuthActivity" android:label="@string/app_name" /> | ||
<activity android:name="com.audacious_software.passive_data_kit.activities.generators.RequestPermissionActivity" android:label="@string/app_name" /> | ||
<activity android:name="com.audacious_software.passive_data_kit.activities.DiagnosticsActivity" android:label="@string/app_name" /> | ||
<activity android:name="com.audacious_software.passive_data_kit.activities.DataStreamActivity" android:label="@string/app_name" /> | ||
<activity android:name="com.audacious_software.passive_data_kit.activities.DataDisclosureActivity" android:label="@string/app_name" /> | ||
<activity android:name="com.audacious_software.passive_data_kit.activities.DataDisclosureDetailActivity" android:label="@string/app_name" /> | ||
</application> | ||
</manifest> |
26 changes: 26 additions & 0 deletions
26
assets/html/passive_data_kit/generator_location_disclosure.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,26 @@ | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> | ||
<style type="text/css"> | ||
body, | ||
* { | ||
font-family:-apple-system,Helvetica Neue; | ||
font-size: 16px; | ||
} | ||
|
||
body { | ||
background-color: F5F5F5; | ||
} | ||
</style> | ||
|
||
</head> | ||
<body> | ||
<p> | ||
<em>TODO: Write disclosure for use of location data...</em> | ||
</p> | ||
|
||
<p> | ||
Place completed file in <code>assets/html/passive_data_kit/generator_location_disclosure.html</code> in your project to override this placeholder. | ||
</p> | ||
</body> | ||
</html> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<TextView android:text="@string/message_location_accuracy_randomized" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="16dp" | ||
android:layout_marginLeft="24dp" | ||
android:layout_marginRight="24dp" /> | ||
|
||
<EditText android:id="@+id/random_range" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="16dp" | ||
android:inputType="number"/> | ||
</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:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<TextView android:text="@string/message_location_accuracy_user" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="16dp" | ||
android:layout_marginLeft="24dp" | ||
android:layout_marginRight="24dp" /> | ||
|
||
<EditText android:id="@+id/user_location" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="16dp" | ||
android:inputType="textCapWords" /> | ||
</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,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<FrameLayout android:id="@+id/data_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight="1"> | ||
</FrameLayout> | ||
<View android:id="@+id/splitter" | ||
android:layout_width="match_parent" | ||
android:layout_height="8dp" | ||
android:background="@color/colorPrimary" /> | ||
<ListView android:id="@+id/disclosure_actions" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight="1" /> | ||
</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,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
<FrameLayout android:id="@+id/data_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight="1"> | ||
<TextView android:text="@string/pdk_message_select_disclosure" | ||
android:gravity="center" | ||
android:padding="32dp" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
</FrameLayout> | ||
<View android:id="@+id/splitter" | ||
android:layout_width="match_parent" | ||
android:layout_height="8dp" | ||
android:background="@color/colorPrimary" /> | ||
<FrameLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:layout_weight="1"> | ||
<android.support.v7.widget.RecyclerView | ||
android:id="@+id/list_view" | ||
android:scrollbars="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="#ffffff"/> | ||
</FrameLayout> | ||
</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,19 @@ | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:id="@+id/data_collection_description" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingLeft="16dp" | ||
android:paddingRight="16dp" | ||
android:paddingTop="8dp" | ||
android:paddingBottom="8dp"> | ||
<TextView android:id="@+id/action_title" | ||
android:textSize="16sp" | ||
android:textStyle="bold" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
<TextView android:id="@+id/action_description" | ||
android:textSize="14sp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
</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 @@ | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingLeft="16dp" | ||
android:paddingRight="16dp" | ||
android:paddingTop="8dp" | ||
android:paddingBottom="8dp"> | ||
<LinearLayout android:orientation="vertical" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1"> | ||
<TextView android:id="@+id/action_title" | ||
android:textSize="16sp" | ||
android:textStyle="bold" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
<TextView android:id="@+id/action_description" | ||
android:textSize="14sp" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
</LinearLayout> | ||
<CheckBox android:id="@+id/action_checked" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" /> | ||
</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,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
<LinearLayout android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingLeft="16dp" | ||
android:background="#ffffff"> | ||
<TextView android:id="@+id/label_generator" | ||
android:gravity="center_vertical" | ||
android:textSize="20sp" | ||
android:layout_width="0dp" | ||
android:layout_height="48dp" | ||
android:layout_weight="1"/> | ||
<ImageView android:id="@+id/button_disclosure_item" | ||
android:src="@drawable/ic_button_disclosure_setting" | ||
android:layout_width="48dp" | ||
android:layout_height="48dp" /> | ||
</LinearLayout> | ||
<View android:layout_width="match_parent" | ||
android:layout_height="1dp" | ||
android:background="#e0e0e0" /> | ||
</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
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
44 changes: 44 additions & 0 deletions
44
src/com/audacious_software/passive_data_kit/activities/DataDisclosureActivity.java
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,44 @@ | ||
package com.audacious_software.passive_data_kit.activities; | ||
|
||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.support.v7.widget.LinearLayoutManager; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.view.MenuItem; | ||
import android.widget.FrameLayout; | ||
|
||
import com.audacious_software.passive_data_kit.activities.generators.GeneratorsAdapter; | ||
import com.audacious_software.pdk.passivedatakit.R; | ||
|
||
public class DataDisclosureActivity extends AppCompatActivity { | ||
private GeneratorsAdapter mAdapter = null; | ||
|
||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
this.setContentView(R.layout.layout_data_disclosure_pdk); | ||
this.getSupportActionBar().setTitle(R.string.title_data_disclosure); | ||
this.getSupportActionBar().setDisplayHomeAsUpEnabled(true); | ||
|
||
FrameLayout dataView = (FrameLayout) this.findViewById(R.id.data_view); | ||
|
||
this.mAdapter = new GeneratorsAdapter(); | ||
this.mAdapter.setContext(this.getApplicationContext()); | ||
this.mAdapter.setDataView(dataView); | ||
|
||
RecyclerView listView = (RecyclerView) this.findViewById(R.id.list_view); | ||
|
||
listView.setLayoutManager(new LinearLayoutManager(this)); | ||
|
||
listView.setAdapter(this.mAdapter); | ||
} | ||
|
||
public boolean onOptionsItemSelected(MenuItem item) | ||
{ | ||
if (item.getItemId() == android.R.id.home) | ||
{ | ||
this.finish(); | ||
} | ||
|
||
return true; | ||
} | ||
} |
Oops, something went wrong.