GithubHelp home page GithubHelp logo

jony1993 / screenlife-capture-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from screenlife-capture-team/app

0.0 0.0 0.0 442 KB

Source code for the ScreenLife Capture Android application. Please consult the researcher guide available at https://www.andrewzhyee.com/screenlifec/ for more information on how to set this up without programming knowledge. The full paper piloting this app can be found at https://link.springer.com/article/10.3758/s13428-022-02006-z

Java 100.00%

screenlife-capture-android's Introduction

ScreenLife Capture Android App

Changelog

v. 1.1.0

  • Fixed multiple bugs regarding QR scanner, starting issue on Pixel devices
  • Added a descriptor field in file names

v. 1.1.0

28 Feb 2023

  • Added notice screens when user intentionally pause/resume recording
  • Updated gradle for SDK 32 (Android 12), fixed issue with intent passing for android 12
  • Updated gradle and fixed method calls for notification and datetime utils for SDK 25 and below (Android 7 and below)

This repo contains the Android Application used in the ScreenLife Capture study. The application allows participants to record and upload screenshots taken every X number of seconds. The general layout of the code is explained below.

Usage guide

Installing via Android Studio (debug mode)

Refer to the official guide here for running an app on a physical device.

Summary of steps:

  • Ensure your Android device has USB debugging mode turned on.
  • Connect your Android device using data cable and select file transfer mode. Android Studio should automatically register your device.
  • In Android Studio, select your device from the device list on the top toolbar. Click "Run app". The app should be installed in your device.

Packaging APK for distribution

App structure

Activities

Activity Name Purpose
RegisterActivity Handles registration for new users.
MainActivity Contains the main interface of the app, allowing participants to start/stop the screen capture.
DevToolsActivity Contains tools to tweak how the app works, including the number of images to send per batch, the number of batches to send in parallel etc.

Service

Service Name Purpose
CaptureService Responsible for capturing screenshots every X number of seconds. Runs continously throughout the duration of the study.
UploadService Responsible for uploading of screenshots to the cloud functions. Is triggered at certain times by UploadScheduler

Other Files

File Name Purpose
Constants Contains the constants used throughout the application.
Batch Contains a "batch" of files, used by UploadService.
Encryptor Used during the encryption process by CaptureService.
InfoDialog The dialog that is shown when the "information" button is pressed on the main activity.
InternetConnection A set of functions to check if the device is connected to the internet, and through what type of connection (WiFi vs mobile data).
Logger Utility functions to save logs to SharedPreferences.
UploadScheduler Schedules the UploadService at certain times a day.

Constants

Most app-related constants are located in the Constants file. The constants are explained below.

Constant Name Explanation
REGISTER_ADDRESS The address of the "register" cloud function.
UPLOAD_ADDRESS The address of the "upload" cloud function.
COUNT_ADDRESS The address of the "count" cloud function.
BATCH_SIZE_DEFAULT TODO
MAX_TO_SEND_DEFAULT TODO
MAX_BATCHES_TO_SEND TODO
REQ_TIMEOUT TODO

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

screenlife-capture-android's People

Contributors

ryan-gr avatar dangn511 avatar andrewzhyee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.