Commit 9fb2698c authored by Anuththara18's avatar Anuththara18

Android App Added

parent 70b494a1
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Default ignored files
/shelf/
/workspace.xml
AttentionAssessment
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="disableWrapperSourceDistributionNotification" value="true" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/drawable-nodpi/gradient8.xml" value="0.214" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/drawable/gradient1.xml" value="0.1045" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/drawable/gradient2.xml" value="0.105" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/drawable/gradient3.xml" value="0.105" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/drawable/gradient4.xml" value="0.105" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/drawable/gradient5.xml" value="0.105" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/drawable/image_shadow.xml" value="0.1325" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_age.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_attention_deficiencies.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_attention_milestones.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_attention_spans.xml" value="0.2" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_attention_types.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_des1.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_doctor_list.xml" value="0.18072916666666666" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_link.xml" value="0.17708333333333334" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_main_gaze_ui.xml" value="0.17708333333333334" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_map2.xml" value="0.1" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_milestones_description.xml" value="0.2375" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_navigation_drawer.xml" value="0.4" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_parent_details.xml" value="0.2515625" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_pre_school.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_preliminary_guidance.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_selective_attention_game1.xml" value="0.2515625" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_task1_instruction.xml" value="0.136" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_task1_upload_video.xml" value="0.136" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_task2_instruction.xml" value="0.152" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_task2_upload_video.xml" value="0.176" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_task_instructions.xml" value="0.176" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_task_map.xml" value="0.264" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/activity_understanding_adhdactivity.xml" value="0.2" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/fragment_main.xml" value="0.17552083333333332" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/layout/green_card.xml" value="0.17552083333333332" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment - Preschool/app/src/main/res/menu/drawermenu.xml" value="0.2526041666666667" />
<entry key="..\:/Education/SLIIT/Year 04/IT4010 - Research Project/04. Game Implementation/Game/AttentionAssessment/app/src/main/res/layout/activity_navigation_drawer.xml" value="0.17864583333333334" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.application'
}
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.anuththara18.attentionassessment"
minSdkVersion 24
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'com.google.firebase:firebase-storage:19.1.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation "androidx.cardview:cardview:1.0.0"
// giff images
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.17'
implementation 'com.opencsv:opencsv:4.6' // Here is opencsv library
implementation files('libs\\YouTubeAndroidPlayerApi.jar')
implementation platform('com.google.firebase:firebase-bom:29.3.1')
implementation 'com.google.firebase:firebase-auth'
implementation 'com.android.volley:volley:1.2.0'
}
\ No newline at end of file
{
"project_info": {
"project_number": "642347843728",
"project_id": "attention-assessment",
"storage_bucket": "attention-assessment.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:642347843728:android:c7e91fc87a80c3a5b61815",
"android_client_info": {
"package_name": "com.anuththara18.attentionassessment"
}
},
"oauth_client": [
{
"client_id": "642347843728-u7co8a3vsktblmr57r5r6ees4uof65d4.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDth7XK-DMLvkNCziMz55eQkSuNCPzWsZk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "642347843728-u7co8a3vsktblmr57r5r6ees4uof65d4.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.anuththara18.attentionassessment;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.anuththara18.attentionassessment", appContext.getPackageName());
}
}
\ No newline at end of file
This diff is collapsed.
package com.anuththara18.attentionassessment;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import com.anuththara18.attentionassessment.focused.FACompleteScreen;
import com.anuththara18.attentionassessment.home.NavigationDrawerActivity;
import java.util.Random;
public class CompleteScreen extends AppCompatActivity {
Random random;
ImageView complete, gifImageView;
int gifs[] = {R.drawable.complete_gif, R.drawable.complete_gif2, R.drawable.complete_gif3,
R.drawable.complete_gif4, R.drawable.complete_gif5, R.drawable.complete_gif6,
R.drawable.complete_gif7, R.drawable.complete_gif8};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_complete_screen);
complete = findViewById(R.id.complete);
gifImageView = findViewById(R.id.gifImageView);
random = new Random();
gifImageView.setImageResource(gifs[random.nextInt(8)]);
/*
new Runnable() {
@Override
public void run() {
gifImageView.postDelayed(this, 3000);
complete.setVisibility(View.VISIBLE);
}
}.run();
*/
complete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(), NavigationDrawerActivity.class);
finish();
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.anuththara18.attentionassessment;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import com.anuththara18.attentionassessment.home.NavigationDrawerActivity;
import java.util.Random;
public class CompleteScreen2 extends AppCompatActivity {
Random random;
ImageView complete, gifImageView;
int gifs[] = {R.drawable.complete_gif, R.drawable.complete_gif2, R.drawable.complete_gif3,
R.drawable.complete_gif4, R.drawable.complete_gif5, R.drawable.complete_gif6,
R.drawable.complete_gif7, R.drawable.complete_gif8};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_complete_screen2);
complete = findViewById(R.id.complete);
gifImageView = findViewById(R.id.gifImageView);
random = new Random();
gifImageView.setImageResource(gifs[random.nextInt(8)]);
complete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(), NavigationDrawerActivity.class);
finish();
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.anuththara18.attentionassessment;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Response;
import com.android.volley.toolbox.HttpHeaderParser;
import com.android.volley.toolbox.JsonRequest;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.UnsupportedEncodingException;
public class MyJsonArrayRequest extends JsonRequest<JSONArray> {
public MyJsonArrayRequest(int method, String url, JSONObject jsonRequest,
Response.Listener<JSONArray> listener, Response.ErrorListener errorListener) {
super(method, url, (jsonRequest == null) ? null : jsonRequest.toString(), listener,
errorListener);
}
@Override
protected Response<JSONArray> parseNetworkResponse(NetworkResponse response) {
try {
String jsonString = new String(response.data,
HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET));
return Response.success(new JSONArray(jsonString),
HttpHeaderParser.parseCacheHeaders(response));
} catch (UnsupportedEncodingException e) {
return Response.error(new ParseError(e));
} catch (JSONException je) {
return Response.error(new ParseError(je));
}
}
}
\ No newline at end of file
package com.anuththara18.attentionassessment.alternating;
public class Alternating {
private int id;
private int childID;
private String sequence_of_responses;
private String sequence_of_stimuli;
private String sequence_of_sides;
private int totalCorrectResponses;
private int noOfCorrectResponses;
private int noOfCommissionErrors;
private int noOfOmmissionErrors;
private int meanReactionTime;
private int totalDuration;
private String diagnosis;
public Alternating(int id, int childID, String sequence_of_responses, String sequence_of_stimuli, String sequence_of_sides, int totalCorrectResponses, int noOfCorrectResponses, int noOfCommissionErrors, int noOfOmmissionErrors, int meanReactionTime, int totalDuration, String diagnosis) {
this.id = id;
this.childID = childID;
this.sequence_of_responses = sequence_of_responses;
this.sequence_of_stimuli = sequence_of_stimuli;
this.sequence_of_sides = sequence_of_sides;
this.totalCorrectResponses = totalCorrectResponses;
this.noOfCorrectResponses = noOfCorrectResponses;
this.noOfCommissionErrors = noOfCommissionErrors;
this.noOfOmmissionErrors = noOfOmmissionErrors;
this.meanReactionTime = meanReactionTime;
this.totalDuration = totalDuration;
this.diagnosis = diagnosis;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getChildID() {
return childID;
}
public void setChildID(int childID) {
this.childID = childID;
}
public String getSequence_of_responses() {
return sequence_of_responses;
}
public void setSequence_of_responses(String sequence_of_responses) {
this.sequence_of_responses = sequence_of_responses;
}
public String getSequence_of_stimuli() {
return sequence_of_stimuli;
}
public void setSequence_of_stimuli(String sequence_of_stimuli) {
this.sequence_of_stimuli = sequence_of_stimuli;
}
public String getSequence_of_sides() {
return sequence_of_sides;
}
public void setSequence_of_sides(String sequence_of_sides) {
this.sequence_of_sides = sequence_of_sides;
}
public int getTotalCorrectResponses() {
return totalCorrectResponses;
}
public void setTotalCorrectResponses(int totalCorrectResponses) {
this.totalCorrectResponses = totalCorrectResponses;
}
public int getNoOfCorrectResponses() {
return noOfCorrectResponses;
}
public void setNoOfCorrectResponses(int noOfCorrectResponses) {
this.noOfCorrectResponses = noOfCorrectResponses;
}
public int getNoOfCommissionErrors() {
return noOfCommissionErrors;
}
public void setNoOfCommissionErrors(int noOfCommissionErrors) {
this.noOfCommissionErrors = noOfCommissionErrors;
}
public int getNoOfOmmissionErrors() {
return noOfOmmissionErrors;
}
public void setNoOfOmmissionErrors(int noOfOmmissionErrors) {
this.noOfOmmissionErrors = noOfOmmissionErrors;
}
public int getMeanReactionTime() {
return meanReactionTime;
}
public void setMeanReactionTime(int meanReactionTime) {
this.meanReactionTime = meanReactionTime;
}
public int getTotalDuration() {
return totalDuration;
}
public void setTotalDuration(int totalDuration) {
this.totalDuration = totalDuration;
}
public String getDiagnosis() {
return diagnosis;
}
public void setDiagnosis(String diagnosis) {
this.diagnosis = diagnosis;
}
/*
CREATE TABLE sustainedAttention (
id int NOT NULL AUTO_INCREMENT,
childID int NOT NULL,
totalCorrectResponses int NOT NULL,
noOfCorrectResponses int NOT NULL,
noOfCommissionErrors int NOT NULL,
noOfOmmissionErrors int NOT NULL,
meanReactionTime int NOT NULL,
totalDuration int NOT NULL,
CONSTRAINT sustainedAttention_pk PRIMARY KEY (id)
);
*/
}
package com.anuththara18.attentionassessment.consentform;
public class ConsentForm {
private String title;
private String description;
private boolean expanded;
public ConsentForm(String title, String description) {
this.title = title;
this.description = description;
this.expanded = false;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public boolean isExpanded() {
return expanded;
}
public void setExpanded(boolean expanded) {
this.expanded = expanded;
}
@Override
public String toString() {
return "ConsentForm{" +
"title='" + title + '\'' +
", description='" + description + '\'' +
", expanded=" + expanded +
'}';
}
}
package com.anuththara18.attentionassessment.consentform;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.anuththara18.attentionassessment.R;
import com.anuththara18.attentionassessment.age.PreSchool;
import com.anuththara18.attentionassessment.details.ParentDetailsActivity;
import com.anuththara18.attentionassessment.home.NavigationDrawerActivity;
import com.anuththara18.attentionassessment.language.LanguageSetter;
import com.anuththara18.attentionassessment.splashscreen.SplashActivity;
import java.util.ArrayList;
import java.util.List;
public class ConsentFormActivity extends AppCompatActivity {
RecyclerView recyclerView;
List<ConsentForm> consentFormList;
private Boolean[] chkArr;
TextView textView;
ImageButton next;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_consent_form);
recyclerView = findViewById(R.id.recyclerView);
textView = findViewById(R.id.textView);
next = findViewById(R.id.next);
/*
if (SplashActivity.sh.getInt("consent", 0) == 0) {
Intent intent = new Intent(getApplicationContext(), GetParentsConsentActivity.class);
startActivity(intent);
}
else {
Intent intent = new Intent(getApplicationContext(), NavigationDrawerActivity.class);
startActivity(intent);
}
*/
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
Animation animZoomOut = AnimationUtils.loadAnimation(getApplicationContext(),R.anim.zoom_out);
next.startAnimation(animZoomOut);
handler.postDelayed(this, 750);
}
});
}
}, 0);
if (ParentDetailsActivity.nav == 0) {
next.setVisibility(View.INVISIBLE);
next.setEnabled(false);
}
else {
next.setVisibility(View.VISIBLE);
next.setEnabled(true);
}
textView.setText(LanguageSetter.getresources().getString(R.string.consentForm));
initData();
initRecyclerView();
next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
Intent intent = new Intent(getApplicationContext(), GetParentsConsentActivity.class);
startActivity(intent);
}
});
}
private void initRecyclerView() {
ConsentFormAdapter consentFormAdapter = new ConsentFormAdapter(consentFormList);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(consentFormAdapter);
}
private void initData() {
consentFormList = new ArrayList<>();
consentFormList.add(new ConsentForm("Introduction", "Your child is being asked to participate in a research study. This research is being conducted to observe the behaviour of your child in order to develop an automated tool for screening attention impairments in young children. When you are invited to participate in research, you have the right to be informed about the study procedures so that you can decide whether you want to consent to participation. This form may contain words that you do not know. Please ask the researcher to explain any words or information that you do not understand. \n\n" +
"You have the right to know what you will be asked to do so that you can decide whether or not to be in the study. Your participation is voluntary . Your participation is not mandatory. You may refuse to be in the study, and it is your right. If you do not want to continue to be in the study, you may withdraw at any time without penalty or loss of benefits to which you are otherwise entitled."));
consentFormList.add(new ConsentForm("Why is this study being done?", "The purpose of this research is to observe the behaviour of your child in order to help children who are not yet diagnosed in order to develop an automated screening tool for children with attention impairments. The child’s attention will be monitored through attention analysis."));
consentFormList.add(new ConsentForm("What am I being asked to do?", "You will be asked to provide consent in order to collect data related to the attention of your child. Furthermore, your data will be confidential, and it will not be shared with anyone else and your child’s identity will not be revealed at any cost."));
consentFormList.add(new ConsentForm("What are the benefits of being in the study?", "Your participation will benefit the country since this is the first time a technology-based solution is proposed and developed in Sri Lanka for children with attention impairments."));
consentFormList.add(new ConsentForm("What are the risks of being in the study?", "There are no risks involved to the child when participating to this research."));
consentFormList.add(new ConsentForm("What are the costs of being in the study?", "There is no cost to you."));
consentFormList.add(new ConsentForm("Confidentiality", "The data collected will be stored securely in a dedicated storage device at Sri Lanka Institute of Information Technology. Only the research team has the access to data. The researchers will ensure the confidentiality of the information collected where the child’s identity will not be revealed at any instance and the data will be used only for research purposes and will be destroyed in a secure manner once the research is complete."));
consentFormList.add(new ConsentForm("Will I be compensated for participating in the study?", "You will receive no payment for taking part in this study."));
consentFormList.add(new ConsentForm("What are my rights as a participant?", "Participation in this study is voluntary. Your participation is not mandatory. You will also be informed of any new information discovered during the course of this study that might influence your child’s health, welfare, or willingness to be in this study."));
consentFormList.add(new ConsentForm("Who do I contact if I have questions, concerns, or complaints?", "Please contact the research assistant or the research team if you have questions about the research."));
consentFormList.add(new ConsentForm("Whom do I call if I have questions or problems?", "If you have any questions regarding your rights as a participant in this research and/or concerns about the study, or if you feel under any pressure to enroll or to continue to participate in this study, you may contact the Dr Pradeepa Samarasinghe, Principle Investigator at Sri Lanka Institute of Information Technology at 0723537952 or pradeepa.s@sliit.lk ."));
}
/*************************************************************************************************/
@Override
public void onBackPressed() {
super.onBackPressed();
alert();
}
/*************************************************************************************************/
private void alert() {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("Do you really want to quit the game?");
alertDialogBuilder.setPositiveButton("yes",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
finish();
}
});
alertDialogBuilder.setNegativeButton("No",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//finish();
}
});
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
}
\ No newline at end of file
package com.anuththara18.attentionassessment.consentform;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.anuththara18.attentionassessment.R;
import java.util.List;
public class ConsentFormAdapter extends RecyclerView.Adapter<ConsentFormAdapter.ConsentFormVH> {
private static final String TAG = "ConsentFormAdapter";
List<ConsentForm> consentFormList;
/**********************************************************************************************************/
public ConsentFormAdapter(List<ConsentForm> consentFormList) {
this.consentFormList = consentFormList;
}
/**********************************************************************************************************/
@NonNull
@Override
public ConsentFormVH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.consent_form_data_rows, parent, false);
return new ConsentFormVH(view);
}
/**********************************************************************************************************/
@Override
public void onBindViewHolder(@NonNull ConsentFormVH holder, int position) {
ConsentForm movie = consentFormList.get(position);
holder.titleTextView.setText(movie.getTitle());
holder.descriptions.setText(movie.getDescription());
boolean isExpanded = consentFormList.get(position).isExpanded();
holder.expandableLayout.setVisibility(isExpanded ? View.VISIBLE : View.GONE);
}
/**********************************************************************************************************/
@Override
public int getItemCount() {
return consentFormList.size();
}
/**********************************************************************************************************/
class ConsentFormVH extends RecyclerView.ViewHolder {
private static final String TAG = "ConsentFormVH";
ConstraintLayout expandableLayout;
TextView titleTextView, descriptions;
public ConsentFormVH(@NonNull final View itemView) {
super(itemView);
titleTextView = itemView.findViewById(R.id.titleTextView);
descriptions = itemView.findViewById(R.id.descriptions);
expandableLayout = itemView.findViewById(R.id.expandableLayout);
titleTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ConsentForm consentForm = consentFormList.get(getAdapterPosition());
consentForm.setExpanded(!consentForm.isExpanded());
notifyItemChanged(getAdapterPosition());
}
});
}
}
}
package com.anuththara18.attentionassessment.consentform;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteStatement;
public class ParentsConsentDatabaseHelper extends SQLiteOpenHelper {
public ParentsConsentDatabaseHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
public void queryData(String sql){
SQLiteDatabase database = getWritableDatabase();
database.execSQL(sql);
}
public void insertData(byte[] image){
SQLiteDatabase database = getWritableDatabase();
String sql = "INSERT INTO ParentsConsent VALUES (?)";
SQLiteStatement statement = database.compileStatement(sql);
statement.clearBindings();
statement.bindBlob(1, image);
statement.executeInsert();
}
public Cursor getData(String sql){
SQLiteDatabase database = getReadableDatabase();
return database.rawQuery(sql, null);
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
}
}
package com.anuththara18.attentionassessment.consentform;
import java.io.Serializable;
public class ParentsConsentModel implements Serializable {
private byte[] signature;
public ParentsConsentModel(byte[] signature) {
this.signature = signature;
}
public byte[] getSignature() {
return signature;
}
public void setSignature(byte[] signature) {
this.signature = signature;
}
}
package com.anuththara18.attentionassessment.db;
public class Api {
private static final String ROOT_URL = "http://192.168.43.104/AttentionAssessment/SustainedAttention/v1/Api.php?apicall=";
private static final String ROOT_URL2 = "http://192.168.43.104/AttentionAssessment/FocusedAttention/v1/Api.php?apicall=";
private static final String ROOT_URL3 = "http://192.168.43.104/AttentionAssessment/DividedAttention/v1/Api.php?apicall=";
private static final String ROOT_URL4 = "http://192.168.43.104/AttentionAssessment/SelectiveAttention/v1/Api.php?apicall=";
public static final String URL_SUSTAINED_ATTENTION = ROOT_URL + "insertdata";
public static final String URL_FOCUSED_ATTENTION = ROOT_URL2 + "insertdata";
public static final String URL_DIVIDED_ATTENTION = ROOT_URL3 + "insertdata";
public static final String URL_SELECTIVE_ATTENTION = ROOT_URL4 + "insertdata";
}
package com.anuththara18.attentionassessment.db;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import javax.net.ssl.HttpsURLConnection;
public class RequestHandler {
//Method to send httpPostRequest
//This method is taking two arguments
//First argument is the URL of the script to which we will send the request
//Other is an HashMap with name value pairs containing the data to be send with the request
public String sendPostRequest(String requestURL,
HashMap<String, Integer> postDataParams) {
//Creating a URL
URL url;
//StringBuilder object to store the message retrieved from the server
StringBuilder sb = new StringBuilder();
try {
//Initializing Url
url = new URL(requestURL);
//Creating an httmlurl connection
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
//Configuring connection properties
conn.setReadTimeout(20000);
conn.setConnectTimeout(20000);
conn.setRequestMethod("POST");
conn.setDoInput(true);
conn.setDoOutput(true);
//Creating an output stream
OutputStream os = conn.getOutputStream();
//Writing parameters to the request
//We are using a method getPostDataString which is defined below
BufferedWriter writer = new BufferedWriter(
new OutputStreamWriter(os, "UTF-8"));
writer.write(getPostDataString(postDataParams));
writer.flush();
writer.close();
os.close();
int responseCode = conn.getResponseCode();
if (responseCode == HttpsURLConnection.HTTP_OK) {
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
sb = new StringBuilder();
String response;
//Reading server response
while ((response = br.readLine()) != null) {
sb.append(response);
}
}
} catch (Exception e) {
e.printStackTrace();
}
return sb.toString();
}
public String sendGetRequest(String requestURL) {
StringBuilder sb = new StringBuilder();
try {
URL url = new URL(requestURL);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));
String s;
while ((s = bufferedReader.readLine()) != null) {
sb.append(s + "\n");
}
} catch (Exception e) {
}
return sb.toString();
}
private String getPostDataString(HashMap<String, Integer> params) throws UnsupportedEncodingException {
StringBuilder result = new StringBuilder();
boolean first = true;
for (Map.Entry<String, Integer> entry : params.entrySet()) {
if (first)
first = false;
else
result.append("&");
result.append(URLEncoder.encode(entry.getKey(), "UTF-8"));
result.append("=");
result.append(URLEncoder.encode(String.valueOf(entry.getValue()), "UTF-8"));
}
return result.toString();
}
}
\ No newline at end of file
package com.anuththara18.attentionassessment.details;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Patterns;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import com.anuththara18.attentionassessment.R;
import com.anuththara18.attentionassessment.age.AgeActivity;
import com.anuththara18.attentionassessment.age.PreSchool;
import com.anuththara18.attentionassessment.consentform.ConsentFormActivity;
import com.anuththara18.attentionassessment.consentform.SinhalaConsentFormActivity;
import com.anuththara18.attentionassessment.gender.GenderActivity;
import com.anuththara18.attentionassessment.home.NavigationDrawerActivity;
import com.anuththara18.attentionassessment.language.LanguageActivity;
import com.anuththara18.attentionassessment.language.LanguageSetter;
import com.anuththara18.attentionassessment.splashscreen.SplashActivity;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ParentDetailsActivity extends AppCompatActivity {
TextView name, email, contact, opt1, opt2, opt3, req, diag;
EditText childName, parentEmail, parentContact;
public static String child_name, parent_email, parent_contact, diagnosis = "";
RadioGroup radioGroup;
RadioButton genderradioButton;
ImageButton next, previous;
public static int nav = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_parent_details);
name = findViewById(R.id.name);
email = findViewById(R.id.email);
contact = findViewById(R.id.contact);
next = findViewById(R.id.next);
previous = findViewById(R.id.previous);
opt1 = findViewById(R.id.opt1);
opt2 = findViewById(R.id.opt2);
opt3 = findViewById(R.id.opt3);
req = findViewById(R.id.req);
diag = findViewById(R.id.diag);
radioGroup=(RadioGroup)findViewById(R.id.radioGroup);
childName = findViewById(R.id.childName);
parentEmail = findViewById(R.id.parentEmail);
parentContact = findViewById(R.id.parentContact);
/*
if (SplashActivity.sh.getString("diagnosis", "").equals("")) {
ParentDetailsActivity.diagnosis = SplashActivity.sh.getString("diagnosis", "");
if (SplashActivity.sh.getString("lang", "").equals("English")) {
finish();
Intent intent = new Intent(ParentDetailsActivity.this, ConsentFormActivity.class);
startActivity(intent);
}
else {
finish();
Intent intent = new Intent(ParentDetailsActivity.this, SinhalaConsentFormActivity.class);
startActivity(intent);
}
}
*/
name.setText(LanguageSetter.getresources().getString(R.string.childName));
email.setText(LanguageSetter.getresources().getString(R.string.parentEmail));
contact.setText(LanguageSetter.getresources().getString(R.string.parentContact));
opt1.setText(LanguageSetter.getresources().getString(R.string.optional));
opt2.setText(LanguageSetter.getresources().getString(R.string.optional));
opt3.setText(LanguageSetter.getresources().getString(R.string.optional));
req.setText(LanguageSetter.getresources().getString(R.string.req));
diag.setText(LanguageSetter.getresources().getString(R.string.diagnosis));
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
Animation animZoomOut = AnimationUtils.loadAnimation(getApplicationContext(),R.anim.zoom_out);
next.startAnimation(animZoomOut);
handler.postDelayed(this, 750);
}
});
}
}, 0);
child_name = childName.getText().toString();
parent_email = parentEmail.getText().toString();
parent_contact = parentContact.getText().toString();
previous.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(ParentDetailsActivity.this, PreSchool.class);
startActivity(intent);
}
});
next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int selectedId = radioGroup.getCheckedRadioButtonId();
genderradioButton = (RadioButton) findViewById(selectedId);
if (!isEmail(parentEmail)) {
Toast.makeText(ParentDetailsActivity.this, LanguageSetter.getresources().getString(R.string.email), Toast.LENGTH_SHORT).show();
parentEmail.setError(LanguageSetter.getresources().getString(R.string.email));
}
else if (!isPhone(parentContact)) {
Toast.makeText(ParentDetailsActivity.this, LanguageSetter.getresources().getString(R.string.contact), Toast.LENGTH_SHORT).show();
parentContact.setError(LanguageSetter.getresources().getString(R.string.contact));
}
else if(selectedId == -1){
Toast.makeText(ParentDetailsActivity.this,LanguageSetter.getresources().getString(R.string.empty), Toast.LENGTH_SHORT).show();
}
else{
diagnosis = (String) genderradioButton.getText();
//Toast.makeText(ParentDetailsActivity.this,genderradioButton.getText(), Toast.LENGTH_SHORT).show();
nav = 1;
//finish();
//startActivity(new Intent(ParentDetailsActivity.this, NavigationDrawerActivity.class));
if (LanguageActivity.text.equals("English")) {
finish();
startActivity(new Intent(ParentDetailsActivity.this, ConsentFormActivity.class));
} else {
finish();
startActivity(new Intent(ParentDetailsActivity.this, SinhalaConsentFormActivity.class));
}
}
}
});
}
boolean isEmail(EditText text) {
CharSequence email = text.getText().toString();
return (TextUtils.isEmpty(email) || Patterns.EMAIL_ADDRESS.matcher(email).matches());
}
boolean isPhone(EditText text) {
CharSequence phone = text.getText().toString();
Pattern p = Pattern.compile("(07/91)?[0-9]{10}");
Matcher m = p.matcher(phone);
return TextUtils.isEmpty(phone) || (m.find() && m.group().equals(phone));
}
/*************************************************************************************************/
@Override
public void onBackPressed() {
super.onBackPressed();
alert();
}
/*************************************************************************************************/
private void alert() {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("Do you really want to quit the game?");
alertDialogBuilder.setPositiveButton("yes",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
finish();
}
});
alertDialogBuilder.setNegativeButton("No",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//finish();
}
});
AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();
}
}
\ No newline at end of file
package com.anuththara18.attentionassessment.emailfiles;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.FileProvider;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.view.View;
import android.widget.Button;
import com.anuththara18.attentionassessment.R;
import com.anuththara18.attentionassessment.language.LanguageSetter;
import java.io.File;
import java.util.ArrayList;
public class EmailDataFilesActivity extends AppCompatActivity {
Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_email_data_files);
Context context = getApplicationContext(); ;
button = findViewById(R.id.button);
button.setText(LanguageSetter.getresources().getString(R.string.send));
String csv = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/SelectiveAttention.csv");
String pdf = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/SelectiveAttention.pdf");
String csv1 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/AlternatingAttention.csv");
String pdf1 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/AlternatingAttention.pdf");
String csv2 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/DividedAttention.csv");
String pdf2 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/DividedAttention.pdf");
String csv3 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/FocusedAttention.csv");
String pdf3 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/FocusedAttention.pdf");
String csv4 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/SustainedAttention.csv");
String pdf4 = (Environment.getExternalStorageDirectory().getAbsolutePath() + "/SustainedAttention.pdf");
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent emailIntent = new Intent(Intent.ACTION_SEND_MULTIPLE);
emailIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
emailIntent.setType("text/plain");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"it19114040@my.sliit.lk"});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Attention Assessment Data");
emailIntent.putExtra(Intent.EXTRA_TEXT, "body text");
File file = new File(csv);
File file1 = new File(pdf);
File file2 = new File(csv1);
File file3 = new File(pdf1);
File file4 = new File(csv2);
File file5 = new File(pdf2);
File file6 = new File(csv3);
File file7 = new File(pdf3);
File file8 = new File(csv4);
File file9 = new File(pdf4);
Uri uri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file);
Uri uri1 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file1);
Uri uri2 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file2);
Uri uri3 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file3);
Uri uri4 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file4);
Uri uri5 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file5);
Uri uri6 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file6);
Uri uri7 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file7);
Uri uri8 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file8);
Uri uri9 = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", file9);
ArrayList<Uri> uris = new ArrayList<Uri>();
uris.add(uri);
uris.add(uri1);
uris.add(uri2);
uris.add(uri3);
uris.add(uri4);
uris.add(uri5);
uris.add(uri6);
uris.add(uri7);
uris.add(uri8);
uris.add(uri9);
emailIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
//startActivityForResult(Intent.createChooser(emailIntent, "Sending multiple attachment"), 12345);
//emailIntent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(emailIntent, "Pick an Email provider"));
}
});
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="400"
/>
</set>
<!--android:repeatMode="reverse"
android:repeatCount="infinite"-->
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment