diff --git a/labs/Lab5_DatamangementLab/.gitignore b/labs/Lab5_DatamangementLab/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..603b14077394cd2294ac6922fe619669630ef3ab --- /dev/null +++ b/labs/Lab5_DatamangementLab/.gitignore @@ -0,0 +1,14 @@ +*.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 diff --git a/labs/Lab5_DatamangementLab/.idea/.name b/labs/Lab5_DatamangementLab/.idea/.name new file mode 100644 index 0000000000000000000000000000000000000000..fd683110eab89c9b574c15f2e44874ccf11f0a43 --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/.name @@ -0,0 +1 @@ +Lab5DataLab \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/.idea/codeStyles/Project.xml b/labs/Lab5_DatamangementLab/.idea/codeStyles/Project.xml new file mode 100644 index 0000000000000000000000000000000000000000..3cc336b9349299395940823dfc3e3725bc394c07 --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/codeStyles/Project.xml @@ -0,0 +1,138 @@ +<component name="ProjectCodeStyleConfiguration"> + <code_scheme name="Project" version="173"> + <JetCodeStyleSettings> + <option name="PACKAGES_TO_USE_STAR_IMPORTS"> + <value> + <package name="java.util" alias="false" withSubpackages="false" /> + <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" /> + <package name="io.ktor" alias="false" withSubpackages="true" /> + </value> + </option> + <option name="PACKAGES_IMPORT_LAYOUT"> + <value> + <package name="" alias="false" withSubpackages="true" /> + <package name="java" alias="false" withSubpackages="true" /> + <package name="javax" alias="false" withSubpackages="true" /> + <package name="kotlin" alias="false" withSubpackages="true" /> + <package name="" alias="true" withSubpackages="true" /> + </value> + </option> + <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> + </JetCodeStyleSettings> + <codeStyleSettings language="XML"> + <indentOptions> + <option name="CONTINUATION_INDENT_SIZE" value="4" /> + </indentOptions> + <arrangement> + <rules> + <section> + <rule> + <match> + <AND> + <NAME>xmlns:android</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>xmlns:.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + <order>BY_NAME</order> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*:id</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*:name</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>name</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>style</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>^$</XML_NAMESPACE> + </AND> + </match> + <order>BY_NAME</order> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> + </AND> + </match> + <order>ANDROID_ATTRIBUTE_ORDER</order> + </rule> + </section> + <section> + <rule> + <match> + <AND> + <NAME>.*</NAME> + <XML_ATTRIBUTE /> + <XML_NAMESPACE>.*</XML_NAMESPACE> + </AND> + </match> + <order>BY_NAME</order> + </rule> + </section> + </rules> + </arrangement> + </codeStyleSettings> + <codeStyleSettings language="kotlin"> + <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> + </codeStyleSettings> + </code_scheme> +</component> \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/.idea/codeStyles/codeStyleConfig.xml b/labs/Lab5_DatamangementLab/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000000000000000000000000000000000000..79ee123c2b23e069e35ed634d687e17f731cc702 --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ +<component name="ProjectCodeStyleConfiguration"> + <state> + <option name="USE_PER_PROJECT_SETTINGS" value="true" /> + </state> +</component> \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/.idea/gradle.xml b/labs/Lab5_DatamangementLab/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..5cd135a064522bbb757161b1eee5a7d65de1989e --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/gradle.xml @@ -0,0 +1,20 @@ +<?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="PLATFORM" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + <option name="resolveModulePerSourceSet" value="false" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/.idea/jarRepositories.xml b/labs/Lab5_DatamangementLab/.idea/jarRepositories.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5f05cd8c87d4a72b0242026524cb32639fca7f0 --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ +<?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 diff --git a/labs/Lab5_DatamangementLab/.idea/misc.xml b/labs/Lab5_DatamangementLab/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..37a750962da6f2b31810e85c8acae1081de7f58c --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" 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 diff --git a/labs/Lab5_DatamangementLab/.idea/runConfigurations.xml b/labs/Lab5_DatamangementLab/.idea/runConfigurations.xml new file mode 100644 index 0000000000000000000000000000000000000000..7f68460d8b38ac04e3a3224d7c79ef719b1991a9 --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RunConfigurationProducerService"> + <option name="ignoredProducers"> + <set> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" /> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" /> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" /> + </set> + </option> + </component> +</project> \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/.idea/vcs.xml b/labs/Lab5_DatamangementLab/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c0b8635858dc7ad44b93df54b762707ce49eefc --- /dev/null +++ b/labs/Lab5_DatamangementLab/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?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 diff --git a/labs/Lab5_DatamangementLab/DataManagementLab.mp4 b/labs/Lab5_DatamangementLab/DataManagementLab.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..fbfe84756b924872ae32cf78868d7cd0f265803b Binary files /dev/null and b/labs/Lab5_DatamangementLab/DataManagementLab.mp4 differ diff --git a/labs/Lab5_DatamangementLab/DataManagementLab.pdf b/labs/Lab5_DatamangementLab/DataManagementLab.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c0a0c907e308cf0dd3dc5310be95206f39064e40 Binary files /dev/null and b/labs/Lab5_DatamangementLab/DataManagementLab.pdf differ diff --git a/labs/Lab5_DatamangementLab/app/.gitignore b/labs/Lab5_DatamangementLab/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..796b96d1c402326528b4ba3c12ee9d92d0e212e9 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/labs/Lab5_DatamangementLab/app/build.gradle b/labs/Lab5_DatamangementLab/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..8ec6903259808fee1c76a7c3894a82e4a59d35c7 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/build.gradle @@ -0,0 +1,37 @@ +apply plugin: 'com.android.application' + +apply plugin: 'kotlin-android' + +apply plugin: 'kotlin-android-extensions' + +android { + compileSdkVersion 29 + defaultConfig { + applicationId "course.labs.lab5_datalab" + minSdkVersion 15 + 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' + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.core:core-ktx:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation 'androidx.test:rules:1.1.0' + implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' + androidTestImplementation 'org.mockito:mockito-android:2.24.5' +} \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/app/proguard-rules.pro b/labs/Lab5_DatamangementLab/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..f1b424510da51fd82143bc74a0a801ae5a1e2fcd --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 diff --git a/labs/Lab5_DatamangementLab/app/src/androidTest/java/course/labs/lab5_datalab/ExternalTest.kt b/labs/Lab5_DatamangementLab/app/src/androidTest/java/course/labs/lab5_datalab/ExternalTest.kt new file mode 100644 index 0000000000000000000000000000000000000000..e8f9fc302b9897c561c79389c410e41f650f894b --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/androidTest/java/course/labs/lab5_datalab/ExternalTest.kt @@ -0,0 +1,84 @@ +package course.labs.lab5_datalab + +import org.junit.Assert.* +import android.content.Context +import android.content.pm.ActivityInfo +import androidx.test.espresso.Espresso.onView +import androidx.test.espresso.ViewAction +import androidx.test.espresso.action.ViewActions.* +import androidx.test.espresso.assertion.ViewAssertions.matches +import androidx.test.espresso.matcher.ViewMatchers.* +import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation +import org.junit.Before +import org.junit.Rule +//import junit.framework.Assert; +import org.junit.Assert.assertEquals +import org.junit.Assert; +import androidx.test.rule.ActivityTestRule +import androidx.test.runner.AndroidJUnit4 +import org.junit.Test +import org.junit.runner.RunWith +import android.content.SharedPreferences +import android.widget.EditText +import android.widget.TextView +import org.mockito.ArgumentMatchers.anyInt +import org.mockito.ArgumentMatchers.anyString +import org.mockito.Mockito +import androidx.test.InstrumentationRegistry.getTargetContext +import course.labs.lab5_datalab.External +import course.labs.lab5_datalab.R +import org.junit.After +import java.io.File + + +/** + * Instrumented test, which will execute on an Android device. + * + * @see [Testing documentation](http://d.android.com/tools/testing) + */ +@RunWith(AndroidJUnit4::class) +class ExternalTest { + @Rule + @JvmField + var activityTestRule = ActivityTestRule(External::class.java) + + private val PREFS_NAME = "mypref" + private val KEY_PREF = "nameKey" + private var sharedPreferences: SharedPreferences? = null + + @Before + fun before() { + val context = getInstrumentation().getTargetContext() + sharedPreferences = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE) + } + + + + @Test + fun checkNameUID() { +// onView(withId(R.id.button2)).perform(click()) + lateinit var myExternalFile: File + val context = getInstrumentation().getTargetContext() + val filename = "SampleFile.txt" + val filepath = "MyFileStorage" + onView(withId(R.id.myInputText)).perform(clearText(), typeText("Test Name")); + myExternalFile = File(context.getExternalFilesDir(filepath), filename) + onView(withId(R.id.saveExternalStorage)).perform(click()) + val targetContext = getInstrumentation().targetContext + val str = myExternalFile.readText() + assertEquals(str, "Test Name") + + } + + @Test + fun checkRetrieve() { +// onView(withId(R.id.button2)).perform(click()) + onView(withId(R.id.getExternalStorage)).perform(click()) +// Thread.sleep(5000) + val textView: TextView = activityTestRule.activity.findViewById(R.id.myInputText) + assertEquals(textView.text.toString(), "Test Name") + + } + + +} diff --git a/labs/Lab5_DatamangementLab/app/src/androidTest/java/course/labs/lab5_datalab/SharedPrefTest.kt b/labs/Lab5_DatamangementLab/app/src/androidTest/java/course/labs/lab5_datalab/SharedPrefTest.kt new file mode 100644 index 0000000000000000000000000000000000000000..f721af580cda9def384f9b19d52fc14860b17cb2 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/androidTest/java/course/labs/lab5_datalab/SharedPrefTest.kt @@ -0,0 +1,100 @@ +package course.labs.lab5_datalab + +import android.content.Context +import android.content.pm.ActivityInfo +import androidx.test.espresso.Espresso.onView +import androidx.test.espresso.ViewAction +import androidx.test.espresso.action.ViewActions.* +import androidx.test.espresso.assertion.ViewAssertions.matches +import androidx.test.espresso.matcher.ViewMatchers.* +import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation +import org.junit.Before +import org.junit.Rule +//import junit.framework.Assert; +import org.junit.Assert.assertEquals +import org.junit.Assert; +import androidx.test.rule.ActivityTestRule +import androidx.test.runner.AndroidJUnit4 +import org.junit.Test +import org.junit.runner.RunWith +import android.content.SharedPreferences +import android.widget.EditText +import android.widget.TextView +import org.mockito.ArgumentMatchers.anyInt +import org.mockito.ArgumentMatchers.anyString +import org.mockito.Mockito +import androidx.test.InstrumentationRegistry.getTargetContext +import course.labs.lab5_datalab.MainActivity +import course.labs.lab5_datalab.R +import org.junit.After + + +/** + * Instrumented test, which will execute on an Android device. + * + * @see [Testing documentation](http://d.android.com/tools/testing) + */ +@RunWith(AndroidJUnit4::class) +class SharedPrefTest { + @Rule + @JvmField + var activityTestRule = ActivityTestRule(MainActivity::class.java) + + private val PREFS_NAME = "mypref" + private val KEY_PREF = "nameKey" + private var sharedPreferences: SharedPreferences? = null + + @Before + fun before() { + val context = getInstrumentation().getTargetContext() + sharedPreferences = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE) + } + + +// @After +// fun after() { +// sharedPreferences!!.edit().putString(KEY_PREF, null).apply() +// } + + @Test + fun acheckNameUID() { + onView(withId(R.id.etName)).perform(clearText(), typeText("Test Name")); + onView(withId(R.id.etUid)).perform(clearText(), typeText("1234568")); + onView(withId(R.id.btnSave)).perform(click()) + Thread.sleep(2000) + val targetContext = getInstrumentation().targetContext + + val context = getInstrumentation().getTargetContext() + sharedPreferences = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE) + val string2 = sharedPreferences!!.getString("nameKey", "") + assertEquals("Test Name", string2) + val string3 = sharedPreferences!!.getString("uidkey", "") + assertEquals("1234568", string3) + } + + @Test + fun bcheckClear() { + onView(withId(R.id.btnClear)).perform(click()) + Thread.sleep(2000) + val textView: TextView = activityTestRule.activity.findViewById(R.id.etName) + assertEquals(textView.text.toString(), "") + val textView2: TextView = activityTestRule.activity.findViewById(R.id.etUid) + assertEquals(textView2.text.toString(), "") + } + + @Test + fun ccheckEditText() { + onView(withId(R.id.btnRetr)).perform(click()) + Thread.sleep(2000) + val textView: TextView = activityTestRule.activity.findViewById(R.id.etName) + assertEquals(textView.text.toString(), "Test Name") + val textView2: TextView = activityTestRule.activity.findViewById(R.id.etUid) + assertEquals(textView2.text.toString(), "1234568") + + } + + + + + +} diff --git a/labs/Lab5_DatamangementLab/app/src/main/AndroidManifest.xml b/labs/Lab5_DatamangementLab/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..f7f50212f3cbb1b31c6761c0d390f9b7ea01f633 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="course.labs.lab5_datalab"> + +<!-- // Todo : Mention Permissions required for External Storage--> + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/AppTheme"> + <activity android:name=".External"></activity> + <activity android:name=".MainActivity"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/app/src/main/java/course/labs/lab5_datalab/External.kt b/labs/Lab5_DatamangementLab/app/src/main/java/course/labs/lab5_datalab/External.kt new file mode 100644 index 0000000000000000000000000000000000000000..25f86230e2637680f2e96b50db4dbe9904fcabbc --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/java/course/labs/lab5_datalab/External.kt @@ -0,0 +1,46 @@ +package course.labs.lab5_datalab + +import android.view.View.OnClickListener +import androidx.appcompat.app.AppCompatActivity + +import android.os.Bundle +import android.os.Environment +import android.util.Log +import android.view.View +import android.widget.Button +import android.widget.EditText +import android.widget.TextView +import java.io.* + +class External : AppCompatActivity() { + protected lateinit var inputText: EditText + protected lateinit var response: TextView + protected lateinit var saveButton: Button + protected lateinit var readButton: Button + + private val filename = "SampleFile.txt" + private val filepath = "MyFileStorage" + protected lateinit var myExternalFile: File + internal var myData = "" + private val isExternalStorageReadOnly: Boolean + get() { + val extStorageState = Environment.getExternalStorageState() + return if (Environment.MEDIA_MOUNTED_READ_ONLY == extStorageState) { + true + } else false + } + + private val isExternalStorageAvailable: Boolean + get() { + val extStorageState = Environment.getExternalStorageState() + return if (Environment.MEDIA_MOUNTED == extStorageState) { + true + } else false + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_external) + + } +} diff --git a/labs/Lab5_DatamangementLab/app/src/main/java/course/labs/lab5_datalab/MainActivity.kt b/labs/Lab5_DatamangementLab/app/src/main/java/course/labs/lab5_datalab/MainActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..7dca174d4590dd4babb82121318eede5ae84e8ed --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/java/course/labs/lab5_datalab/MainActivity.kt @@ -0,0 +1,49 @@ +package course.labs.lab5_datalab + +import androidx.appcompat.app.AppCompatActivity + +import android.content.Context +import android.content.Intent +import android.content.SharedPreferences +import android.os.Bundle +import android.view.Menu +import android.view.View +import android.widget.TextView +import androidx.core.content.ContextCompat.startActivity +//import javax.swing.text.View + +class MainActivity : AppCompatActivity() { + + protected lateinit var sharedpreferences: SharedPreferences + protected lateinit var name: TextView + protected lateinit var uidtv: TextView + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + } + + fun Save(view: View) { + + } + + fun clear(view: View) { + + } + + fun Get(view: View) { + + } + + fun goToAnActivity(view: View) { + val intent = Intent(this, External::class.java) + startActivity(intent) + } + + companion object { + val mypreference = "mypref" + val Name = "nameKey" + val uid = "uidkey" + } +} diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/labs/Lab5_DatamangementLab/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..1f6bb290603d7caa16c5fb6f61bbfdc750622f5c --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillType="evenOdd" + android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z" + android:strokeWidth="1" + android:strokeColor="#00000000"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="78.5885" + android:endY="90.9159" + android:startX="48.7653" + android:startY="61.0927" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/drawable/ic_launcher_background.xml b/labs/Lab5_DatamangementLab/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..0d025f9bf6b67c63044a36a9ff44fbc69e5c5822 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#008577" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/layout/activity_external.xml b/labs/Lab5_DatamangementLab/app/src/main/res/layout/activity_external.xml new file mode 100644 index 0000000000000000000000000000000000000000..42d7f401b18575a2a1d02e8626f3215f83b902d2 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/layout/activity_external.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +xmlns:tools="http://schemas.android.com/tools" +android:layout_width="fill_parent" android:layout_height="fill_parent" +android:orientation="vertical" +tools:context=".External"> + +<TextView android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="Reading and Writing to External Storage" + android:textSize="24sp"/> + +<EditText android:id="@+id/myInputText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ems="10" android:lines="5" + android:minLines="3" android:gravity="top|left" + android:inputType="textMultiLine"> + + <requestFocus /> +</EditText> + +<LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" + android:orientation="horizontal" + android:weightSum="1.0" + android:layout_marginTop="20dp"> + + <Button android:id="@+id/saveExternalStorage" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="SAVE" + android:layout_weight="0.5"/> + + <Button android:id="@+id/getExternalStorage" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0.5" + android:text="READ" /> + +</LinearLayout> + +<TextView android:id="@+id/response" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:padding="5dp" + android:text="" + android:textAppearance="?android:attr/textAppearanceMedium" /> + +</LinearLayout> diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/layout/activity_main.xml b/labs/Lab5_DatamangementLab/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..c399d687496969abbb1141e3a56a53d9d673cdd5 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,73 @@ + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="20dp" + android:paddingLeft="20dp" + android:paddingRight="20dp" + android:paddingTop="150dp" > + + <Button + android:id="@+id/btnSave" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:onClick="Save" + android:text="Save" /> + + <Button + android:id="@+id/btnRetr" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:onClick="Get" + android:text="Retrieve" /> + + <Button + android:id="@+id/btnClear" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignRight="@+id/etUid" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:onClick="clear" + android:text="Clear" /> + + <EditText + android:id="@+id/etUid" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ems="10" + android:hint="UID" + android:inputType="textEmailAddress" + android:layout_below="@+id/etName" + android:layout_marginTop="20dp" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" /> + + <EditText + android:id="@+id/etName" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ems="10" + android:hint="Name" + android:inputType="text" + android:layout_alignParentTop="true" + android:layout_alignLeft="@+id/etUid" + android:layout_alignStart="@+id/etUid" /> + + <Button + android:id="@+id/button2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@+id/btnClear" + android:layout_marginTop="40dp" + android:onClick="goToAnActivity" + android:layout_alignParentRight="true" + android:text="External Storage" /> + +</RelativeLayout> diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..eca70cfe52eac1ba66ba280a68ca7be8fcf88a16 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-hdpi/ic_launcher.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..898f3ed59ac9f3248734a00e5902736c9367d455 Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..dffca3601eba7bf5f409bdd520820e2eb5122c75 Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-mdpi/ic_launcher.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..64ba76f75e9ce021aa3d95c213491f73bcacb597 Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..dae5e082342fcdeee5db8a6e0b27028e2d2808f5 Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..e5ed46597ea8447d91ab1786a34e30f1c26b18bd Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..14ed0af35023e4f1901cf03487b6c524257b8483 Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..b0907cac3bfd8fbfdc46e1108247f0a1055387ec Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..d8ae03154975f397f8ed1b84f2d4bf9783ecfa26 Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..2c18de9e66108411737e910f5c1972476f03ddbf Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..beed3cdd2c32af5114a7dc70b9ef5b698eb8797e Binary files /dev/null and b/labs/Lab5_DatamangementLab/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/values/colors.xml b/labs/Lab5_DatamangementLab/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..69b22338c6510250df3b43672635120dbce2fa49 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="colorPrimary">#008577</color> + <color name="colorPrimaryDark">#00574B</color> + <color name="colorAccent">#D81B60</color> +</resources> diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/values/strings.xml b/labs/Lab5_DatamangementLab/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..7914aeeee8beeea7f3187db7782a38389b7785a7 --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">Lab5DataLab</string> +</resources> diff --git a/labs/Lab5_DatamangementLab/app/src/main/res/values/styles.xml b/labs/Lab5_DatamangementLab/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000000000000000000000000000000000..5885930df6d10edf3d6df40d6556297d11f953da --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> + <!-- Customize your theme here. --> + <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="colorAccent">@color/colorAccent</item> + </style> + +</resources> diff --git a/labs/Lab5_DatamangementLab/app/src/test/java/course/labs/lab5_datalab/ExampleUnitTest.kt b/labs/Lab5_DatamangementLab/app/src/test/java/course/labs/lab5_datalab/ExampleUnitTest.kt new file mode 100644 index 0000000000000000000000000000000000000000..683d7f72cf9f999a4fd194d85f36920c2aa1543a --- /dev/null +++ b/labs/Lab5_DatamangementLab/app/src/test/java/course/labs/lab5_datalab/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package course.labs.lab5_datalab + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/labs/Lab5_DatamangementLab/build.gradle b/labs/Lab5_DatamangementLab/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..7c0d19a7ff3250d2552260b8a10a0512690ad48b --- /dev/null +++ b/labs/Lab5_DatamangementLab/build.gradle @@ -0,0 +1,28 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + ext.kotlin_version = '1.3.41' + repositories { + google() + jcenter() + + } + dependencies { + classpath 'com.android.tools.build:gradle:4.0.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/labs/Lab5_DatamangementLab/gradle.properties b/labs/Lab5_DatamangementLab/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..23339e0df69d1fe76df74d7cc6c861fced84e98c --- /dev/null +++ b/labs/Lab5_DatamangementLab/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Automatically convert third-party libraries to use AndroidX +android.enableJetifier=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official diff --git a/labs/Lab5_DatamangementLab/gradle/wrapper/gradle-wrapper.jar b/labs/Lab5_DatamangementLab/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f6b961fd5a86aa5fbfe90f707c3138408be7c718 Binary files /dev/null and b/labs/Lab5_DatamangementLab/gradle/wrapper/gradle-wrapper.jar differ diff --git a/labs/Lab5_DatamangementLab/gradle/wrapper/gradle-wrapper.properties b/labs/Lab5_DatamangementLab/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..349d7500972812b71311c32ac0b5aa4f4c1a557c --- /dev/null +++ b/labs/Lab5_DatamangementLab/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Oct 05 10:07:56 EDT 2020 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/labs/Lab5_DatamangementLab/gradlew b/labs/Lab5_DatamangementLab/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..cccdd3d517fc5249beaefa600691cf150f2fa3e6 --- /dev/null +++ b/labs/Lab5_DatamangementLab/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/labs/Lab5_DatamangementLab/gradlew.bat b/labs/Lab5_DatamangementLab/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..e95643d6a2ca62258464e83c72f5156dc941c609 --- /dev/null +++ b/labs/Lab5_DatamangementLab/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/labs/Lab5_DatamangementLab/settings.gradle b/labs/Lab5_DatamangementLab/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..1153c4f69ab1552eb74cd4c828c3cdad2a9e9e80 --- /dev/null +++ b/labs/Lab5_DatamangementLab/settings.gradle @@ -0,0 +1,2 @@ +include ':app' +rootProject.name='Lab5DataLab' diff --git a/labs/Lab5_NotificationsLab/.gitignore b/labs/Lab5_NotificationsLab/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ceff37eff0e621e8f96607f26a6bced4727fb5a5 --- /dev/null +++ b/labs/Lab5_NotificationsLab/.gitignore @@ -0,0 +1,39 @@ +# built application files +*.apk +*.ap_ + +# files for the dex VM +*.dex + +# Java class files +*.class + +# generated files +bin/ +gen/ + +# Local configuration file (sdk path, etc) +local.properties + +# Eclipse project files +.classpath +.settings + +# Proguard folder generated by Eclipse +proguard/ + +# Intellij project files +*.iml +*.ipr +*.iws +.idea +.idea/workspace.xml +.gradle +build/ +captures/ + +# Mac files +.DS_Store + +# Windows thumbnail db +Thumbs.db diff --git a/labs/Lab5_NotificationsLab/Lab-Notifications.pdf b/labs/Lab5_NotificationsLab/Lab-Notifications.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cc48210273da06e542f8d3db57827aca72d588dc Binary files /dev/null and b/labs/Lab5_NotificationsLab/Lab-Notifications.pdf differ diff --git a/labs/Lab5_NotificationsLab/NotificationsLab.mp4 b/labs/Lab5_NotificationsLab/NotificationsLab.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..c59695f7319587390ff79384a80e91f420fc7e96 Binary files /dev/null and b/labs/Lab5_NotificationsLab/NotificationsLab.mp4 differ diff --git a/labs/Lab5_NotificationsLab/app/build.gradle b/labs/Lab5_NotificationsLab/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..64077354064731ffdf6c6a39372c3ee22e1275f3 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/build.gradle @@ -0,0 +1,26 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 26 + buildToolsVersion '29.0.3' + + defaultConfig { + applicationId "course.labs.notificationslab" + minSdkVersion 21 + targetSdkVersion 26 + + testApplicationId "course.labs.notificationslab.tests" + testInstrumentationRunner "android.test.InstrumentationTestRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + } + } +} + +dependencies { + androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.6.3' +} diff --git a/labs/Lab5_NotificationsLab/app/lint.xml b/labs/Lab5_NotificationsLab/app/lint.xml new file mode 100644 index 0000000000000000000000000000000000000000..68283755f390a4fd31fa87cb12fde79e270cab01 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/lint.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<lint> + <issue id="NewApi"> + <ignore path="src/course/labs/notificationslab/DownloaderTask.java" /> + </issue> +</lint> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/NewFeedTest.java b/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/NewFeedTest.java new file mode 100644 index 0000000000000000000000000000000000000000..1e64214f1f9ce022ade26cd361a574774b996ce3 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/NewFeedTest.java @@ -0,0 +1,77 @@ +package course.labs.notificationslab.tests; + +import android.test.ActivityInstrumentationTestCase2; +import android.view.View; + +import com.robotium.solo.Condition; +import com.robotium.solo.Solo; + +import course.labs.notificationslab.TestFrontEndActivity; + +public class NewFeedTest extends + ActivityInstrumentationTestCase2<TestFrontEndActivity> { + private Solo solo; + + public NewFeedTest() { + super(TestFrontEndActivity.class); + } + + public void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + @Override + public void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + public void testRun() { + int shortDelay = 5000; + int longDelay = 10000; + + // Wait for activity: + // 'course.labs.notificationslab.TestFrontEndActivity' + solo.waitForActivity( + course.labs.notificationslab.TestFrontEndActivity.class, + shortDelay); + + // Click on Make Tweets New + solo.clickOnView(solo + .getView(course.labs.notificationslab.R.id.rejuv_tweets_button)); + + // Click on Start Main Activity + solo.clickOnView(solo + .getView(course.labs.notificationslab.R.id.start_main_button)); + + // Wait for activity: + // 'course.labs.threadslab.MainActivity' + solo.waitForActivity(course.labs.notificationslab.MainActivity.class, + shortDelay); + + String msg = getActivity().getString(course.labs.notificationslab.R.string.download_in_progress_string); + assertFalse("'" + msg + " ' is shown!", + solo.searchText(msg)); + + solo.waitForView(android.R.id.list); + + final View listView = solo.getView(android.R.id.list); + solo.waitForCondition(new Condition() { + @Override + public boolean isSatisfied() { + return listView.isEnabled(); + } + }, longDelay); + + // Click on taylorswift13 + solo.clickOnView(solo.getView(android.R.id.text1)); + + // Assert that: 'feed_view' is shown + assertTrue("feed_view not shown!", solo.waitForView(solo + .getView(course.labs.notificationslab.R.id.feed_view))); + + // Assert that: 'Taylor Swift' is shown + assertTrue("'Taylor Swift' is not shown!", + solo.searchText("Taylor Swift")); + + } +} \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/OldFeedNoNotificationTest.java b/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/OldFeedNoNotificationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..fd95ebceee2e6116f16f775101b3c1ae7f2327c0 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/OldFeedNoNotificationTest.java @@ -0,0 +1,77 @@ +package course.labs.notificationslab.tests; + +import android.test.ActivityInstrumentationTestCase2; +import android.view.View; + +import com.robotium.solo.Condition; +import com.robotium.solo.Solo; + +import course.labs.notificationslab.TestFrontEndActivity; + +public class OldFeedNoNotificationTest extends + ActivityInstrumentationTestCase2<TestFrontEndActivity> { + private Solo solo; + + public OldFeedNoNotificationTest() { + super(TestFrontEndActivity.class); + } + + public void setUp() throws Exception { + solo = new Solo(getInstrumentation(), getActivity()); + } + + @Override + public void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + public void testRun() { + int shortDelay = 2000; + int longDelay = 10000; + + // Wait for activity: + // 'course.labs.notificationslab.TestFrontEndActivity' + solo.waitForActivity( + course.labs.notificationslab.TestFrontEndActivity.class, shortDelay); + + // Click on Make Tweets Old + solo.clickOnView(solo + .getView(course.labs.notificationslab.R.id.age_tweets_button)); + + // Click on Start Main Activty + solo.clickOnView(solo + .getView(course.labs.notificationslab.R.id.start_main_button)); + + // Wait for activity: 'course.labs.notificationslab.MainActivity' + assertTrue("course.labs.notificationslab.MainActivity is not found!", + solo.waitForActivity( + course.labs.notificationslab.MainActivity.class, shortDelay)); + + // Assert that: Toast message is shown + String msg = getActivity().getString(course.labs.notificationslab.R.string.download_in_progress_string); + assertTrue("'" + msg + " ' is not shown!", + solo.searchText(msg)); + + solo.waitForView(android.R.id.list); + + final View listView = solo.getView(android.R.id.list); + solo.waitForCondition(new Condition() { + @Override + public boolean isSatisfied() { + return listView.isEnabled(); + } + }, longDelay); + + String failMsg = getActivity().getString(course.labs.notificationslab.R.string.download_failed_string); + String successMsg = getActivity().getString(course.labs.notificationslab.R.string.download_succes_string); + assertTrue("Toast message did not appear", solo.searchText("(" + failMsg + "|" + successMsg + ")")); + + // Click on taylorswift13 + solo.clickOnView(solo.getView(android.R.id.text1)); + + // Assert that: 'feed_view' is shown + assertTrue("feed_view' is not shown!", solo.waitForView(solo + .getView(course.labs.notificationslab.R.id.feed_view))); + + } +} \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/OldFeedWithNotificationTest.java b/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/OldFeedWithNotificationTest.java new file mode 100644 index 0000000000000000000000000000000000000000..faaed3d21d12296e46c4912d018d264c994f9ebd --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/androidTest/java/course/labs/notificationslab/tests/OldFeedWithNotificationTest.java @@ -0,0 +1,68 @@ + package course.labs.notificationslab.tests; + + import android.test.ActivityInstrumentationTestCase2; + + import com.robotium.solo.Solo; + + import course.labs.notificationslab.TestFrontEndActivity; + + public class OldFeedWithNotificationTest extends + ActivityInstrumentationTestCase2<TestFrontEndActivity> { + private Solo solo; + + public OldFeedWithNotificationTest() { + super(TestFrontEndActivity.class); + } + + public void setUp() throws Exception { + solo = new Solo(getInstrumentation()); + getActivity(); + } + + @Override + public void tearDown() throws Exception { + solo.finishOpenedActivities(); + } + + public void testRun() { + + int shortDelay = 2000; + + // Clear the log + solo.clearLog(); + + // Wait for activity: + // 'course.labs.notificationslab.TestFrontEndActivity' + solo.waitForActivity( + course.labs.notificationslab.TestFrontEndActivity.class, + shortDelay); + + // Click on Make Tweets Old + solo.clickOnView(solo + .getView(course.labs.notificationslab.R.id.age_tweets_button)); + + // Click on Start Main Activity + solo.clickOnView(solo + .getView(course.labs.notificationslab.R.id.start_main_button)); + + // Wait for activity: 'course.labs.notificationslab.MainActivity' + assertTrue( + "course.labs.notificationslab.MainActivity is not found!", + solo.waitForActivity(course.labs.notificationslab.MainActivity.class)); + + // Press menu back key + solo.goBackToActivity("TestFrontEndActivity"); + +/* + // Wait for activity: + // 'course.labs.notificationslab.TestFrontEndActivity' + // assertTrue( + // "course.labs.notificationslab.TestFrontEndActivity is not found!", + // solo.waitForActivity(course.labs.notificationslab.TestFrontEndActivity.class)); +*/ + + // Robotium can't check notification area directly + String msg = getActivity().getString(course.labs.notificationslab.R.string.notification_sent_string); + assertTrue("Notification was not sent", solo.waitForText(msg)); + } + } diff --git a/labs/Lab5_NotificationsLab/app/src/androidTest/res/.gitignore b/labs/Lab5_NotificationsLab/app/src/androidTest/res/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/labs/Lab5_NotificationsLab/app/src/main/AndroidManifest.xml b/labs/Lab5_NotificationsLab/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..6575da9d8626dbaf51b9b1408e1c1a84c5e07af6 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/AndroidManifest.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="course.labs.notificationslab" + android:versionCode="1" + android:versionName="1.0" > + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:theme="@style/AppTheme" > + <activity + android:name="course.labs.notificationslab.MainActivity" + android:label="@string/app_name" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity + android:name="course.labs.notificationslab.TestFrontEndActivity" + android:label="@string/title_activity_test_front_end" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/DownloadFinishedListener.java b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/DownloadFinishedListener.java new file mode 100644 index 0000000000000000000000000000000000000000..ad80c3fa329d16551ef3ac8678edf87409dbe9c1 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/DownloadFinishedListener.java @@ -0,0 +1,5 @@ +package course.labs.notificationslab; + +interface DownloadFinishedListener { + void notifyDataRefreshed(String[] feeds); +} diff --git a/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/DownloaderTaskFragment.java b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/DownloaderTaskFragment.java new file mode 100644 index 0000000000000000000000000000000000000000..78b2374ed5762988811c650a25cb7ff84ea94b89 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/DownloaderTaskFragment.java @@ -0,0 +1,257 @@ +package course.labs.notificationslab; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.util.ArrayList; + +import android.app.Activity; +import android.app.Fragment; +import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.os.AsyncTask; +import android.os.Build; +import android.os.Bundle; +import android.util.Log; +import android.widget.RemoteViews; +import android.widget.Toast; + +public class DownloaderTaskFragment extends Fragment { + + private DownloadFinishedListener mCallback; + private Context mContext; + private final int MY_NOTIFICATION_ID = 11151990; + + @SuppressWarnings("unused") + private static final String TAG = "Lab-Notifications"; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // Preserve across reconfigurations + setRetainInstance(true); + + // TODO: Create new DownloaderTask that "downloads" data + + // TODO: Retrieve arguments from DownloaderTaskFragment + // Prepare them for use with DownloaderTask. + + + // TODO: Start the DownloaderTask + + } + + // Assign current hosting Activity to mCallback + // Store application context for use by downloadTweets() + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + + mContext = activity.getApplicationContext(); + + // Make sure that the hosting activity has implemented + // the correct callback interface. + try { + mCallback = (DownloadFinishedListener) activity; + } catch (ClassCastException e) { + throw new ClassCastException(activity.toString() + + " must implement DownloadFinishedListener"); + } + } + + // Null out mCallback + @Override + public void onDetach() { + super.onDetach(); + mCallback = null; + } + + + public class DownloaderTask extends AsyncTask<Integer, Void, String[]> { + + @Override + protected String[] doInBackground(Integer... resourceIDs) { + return downloadTweets(resourceIDs); + } + + // Simulates downloading Twitter data from the network + private String[] downloadTweets(Integer resourceIDS[]) { + final int simulatedDelay = 2000; + String[] feeds = new String[resourceIDS.length]; + boolean downLoadCompleted = false; + + try { + for (int idx = 0; idx < resourceIDS.length; idx++) { + InputStream inputStream; + BufferedReader in; + try { + // Pretend downloading takes a long time + Thread.sleep(simulatedDelay); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + inputStream = mContext.getResources().openRawResource( + resourceIDS[idx]); + in = new BufferedReader(new InputStreamReader(inputStream)); + + String readLine; + StringBuffer buf = new StringBuffer(); + + while ((readLine = in.readLine()) != null) { + buf.append(readLine); + } + + feeds[idx] = buf.toString(); + + if (null != in) { + in.close(); + } + } + + downLoadCompleted = true; + saveTweetsToFile(feeds); + + } catch (IOException e) { + e.printStackTrace(); + } + + // Notify user that downloading has finished + notify(downLoadCompleted); + + return feeds; + + } + + // If necessary, notifies the user that the tweet downloads are + // complete. Sends an ordered broadcast back to the BroadcastReceiver in + // MainActivity to determine whether the notification is necessary. + + private void notify(final boolean success) { + final Intent restartMainActivityIntent = new Intent(mContext, + MainActivity.class); + restartMainActivityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + + // Sends an ordered broadcast to determine whether MainActivity is + // active and in the foreground. Creates a new BroadcastReceiver + // to receive a result indicating the state of MainActivity + + // The Action for this broadcast Intent is + // MainActivity.DATA_REFRESHED_ACTION + // The result, MainActivity.IS_ALIVE, indicates that MainActivity is + // active and in the foreground. + + mContext.sendOrderedBroadcast(new Intent( + MainActivity.DATA_REFRESHED_ACTION), null, + new BroadcastReceiver() { + + final String failMsg = mContext + .getString(R.string.download_failed_string); + final String successMsg = mContext + .getString(R.string.download_succes_string); + final String notificationSentMsg = mContext + .getString(R.string.notification_sent_string); + + @Override + public void onReceive(Context context, Intent intent) { + + // TODO: Change the if condition (false) to Check whether or not the MainActivity + // received the broadcast + + if (false) { + + // TODO: If not, create a PendingIntent using + // the + // restartMainActivityIntent and set its flags + // to FLAG_UPDATE_CURRENT + + final PendingIntent pendingIntent = null; + + // Uses R.layout.custom_notification for the + // layout of the notification View. The xml + // file is in res/layout/custom_notification.xml + + + + // TODO: Set the notification View's text to + // reflect whether the download completed + // successfully + + + + // TODO: Use the Notification.Builder class to + // create the Notification. You will have to set + // several pieces of information. You can use + // android.R.drawable.stat_sys_warning + // for the small icon. You should also + // setAutoCancel(true). + // To support API level 26, implement the TODOs in createNotificationChannel() + createNotificationChannel(); + + // TODO: Send the notification and create a toast with notificationSentMsg text + + } else { + Toast.makeText(mContext, + success ? successMsg : failMsg, + Toast.LENGTH_LONG).show(); + } + } + }, null, 0, null, null); + } + private String channelID = "my_channel_01"; + + private void createNotificationChannel() + { + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + // TODO: Create Notification Channel with id channelID, + // name R.string.channel_name + // and description R.string.channel_description of high importance + + } + } + // Saves the tweets to a file + private void saveTweetsToFile(String[] result) { + PrintWriter writer = null; + try { + FileOutputStream fos = mContext.openFileOutput( + MainActivity.TWEET_FILENAME, Context.MODE_PRIVATE); + writer = new PrintWriter(new BufferedWriter( + new OutputStreamWriter(fos))); + + for (String s : result) { + writer.println(s); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (null != writer) { + writer.close(); + } + } + } + + // Pass newly available data back to hosting Activity + // using the DownloadFinishedListener interface + @Override + protected void onPostExecute(String[] result) { + super.onPostExecute(result); + + if (null != mCallback) { + mCallback.notifyDataRefreshed(result); + } + } + } + + +} \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/FeedFragment.java b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/FeedFragment.java new file mode 100644 index 0000000000000000000000000000000000000000..135ac3e22bf0f2a69053dedbed0779e5bb464ba5 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/FeedFragment.java @@ -0,0 +1,26 @@ +package course.labs.notificationslab; + +import android.app.Fragment; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +public class FeedFragment extends Fragment { + + private TextView mTextView; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + return inflater.inflate(R.layout.feed, container, false); + } + + @Override + public void onActivityCreated(Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + mTextView = (TextView) getView().findViewById(R.id.feed_view); + mTextView.setText(getArguments().getString(MainActivity.TAG_TWEET_DATA)); + } +} \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/FriendsFragment.java b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/FriendsFragment.java new file mode 100644 index 0000000000000000000000000000000000000000..70be2dea7186e7d3cb30c44bf3c97d3c68bff995 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/FriendsFragment.java @@ -0,0 +1,64 @@ +package course.labs.notificationslab; + +import android.app.Activity; +import android.app.ListFragment; +import android.graphics.Color; +import android.os.Bundle; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.ListView; + +public class FriendsFragment extends ListFragment { + + // HostingActivity + private SelectionListener mCallback; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setListAdapter(new ArrayAdapter<String>(getActivity(), + android.R.layout.simple_list_item_1, MainActivity.FRIENDS_NAMES)); + } + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + + // Make sure that the hosting Activity has implemented + // the callback interface. + try { + mCallback = (SelectionListener) activity; + } catch (ClassCastException e) { + throw new ClassCastException(activity.toString() + + " must implement SelectionListener"); + } + } + + @Override + public void onActivityCreated(Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + + // Enable user interaction only if data is available + setAllowUserClicks(mCallback.canAllowUserClicks()); + + } + + // Enable/disable user interaction + void setAllowUserClicks(boolean allowUserInteraction) { + getListView().setEnabled(allowUserInteraction); + if (allowUserInteraction) { + getListView().setBackgroundColor(Color.WHITE); + } else { + getListView().setBackgroundColor(Color.DKGRAY); + } + } + + @Override + public void onListItemClick(ListView l, View view, int position, long id) { + // Inform hosting Activity of user's selection + if (null != mCallback) { + mCallback.onItemSelected(position); + } + } + +} diff --git a/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/MainActivity.java b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/MainActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..340c9a048ba24e1740c0fc116dc6821e38232654 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/MainActivity.java @@ -0,0 +1,330 @@ +package course.labs.notificationslab; + +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Arrays; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import android.app.Activity; +import android.app.FragmentManager; +import android.app.FragmentTransaction; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.Bundle; +import android.util.Log; +import android.widget.Toast; + +public class MainActivity extends Activity implements SelectionListener, + DownloadFinishedListener { + + private static final String TAG_NAME = "name"; + private static final String TAG_USER = "user"; + private static final String TAG_TEXT = "text"; + private static final String TAG_FRIENDS_FRAGMENT = "friends_fragment"; + private static final String TAG_FEED_FRAGMENT = "feed_fragment"; + private static final String TAG_DOWNLOADER_FRAGMENT = "downloader_fragment"; + private static final String TAG_IS_DATA_AVAILABLE = "is_data_available"; + private static final String TAG_PROCESSED_FEEDS = "processed_feeds"; + static final String TAG_TWEET_DATA = "data"; + static final String TAG_FRIEND_RES_IDS = "friends"; + + public static final String TWEET_FILENAME = "tweets.txt"; + public final static String[] FRIENDS_NAMES = { "taylorswift13", + "msrebeccablack", "ladygaga" }; + public static final int IS_ALIVE = Activity.RESULT_FIRST_USER; + public static final String DATA_REFRESHED_ACTION = "course.labs.notificationslabnew.DATA_REFRESHED"; + private static final String TAG = "Lab-Notifications"; + + // Raw feed file IDs used to reference stored tweet data + public static final ArrayList<Integer> sRawTextFeedIds = new ArrayList<Integer>( + Arrays.asList(R.raw.tswift, R.raw.rblack, R.raw.lgaga)); + + private FragmentManager mFragmentManager; + private FriendsFragment mFriendsFragment; + private FeedFragment mFeedFragment; + private DownloaderTaskFragment mDownloaderFragment; + private boolean mIsInteractionEnabled; + private String[] mFormattedFeeds = new String[sRawTextFeedIds.size()];; + private boolean mIsFresh; + private BroadcastReceiver mRefreshReceiver; + private static final long TWO_MIN = 2 * 60 * 1000; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + mFragmentManager = getFragmentManager(); + + // Reset instance state on reconfiguration + if (null != savedInstanceState) { + restoreState(savedInstanceState); + } else { + setupFragments(); + } + } + + // One time setup of UI and retained (headless) Fragment + private void setupFragments() { + installFriendsFragment(); + + // The feed is fresh if it was downloaded less than 2 minutes ago + mIsFresh = (System.currentTimeMillis() - getFileStreamPath( + TWEET_FILENAME).lastModified()) < TWO_MIN; + if (!mIsFresh) { + installDownloaderTaskFragment(); + + // TODO: Show a Toast message displaying + // R.string.download_in_progress string + + + // Set up a BroadcastReceiver to receive an Intent when download + // finishes. + mRefreshReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + + // TODO: + // Check to make sure this is an ordered broadcast + // Let sender know that the Intent was received + // by setting result code to MainActivity.IS_ALIVE + + + } + }; + + } else { + // Process Twitter data taken from stored file + parseJSON(loadTweetsFromFile()); + + // Enable user interaction + mIsInteractionEnabled = true; + } + } + + // Add Friends Fragment to Activity + private void installFriendsFragment() { + + // Make new Fragment + mFriendsFragment = new FriendsFragment(); + + // Give Fragment to the FragmentManager + FragmentTransaction transaction = mFragmentManager.beginTransaction(); + transaction.replace(R.id.fragment_container, mFriendsFragment, + TAG_FRIENDS_FRAGMENT); + transaction.commit(); + } + + // Add DownloaderTaskFragment to Activity + private void installDownloaderTaskFragment() { + + // Make new Fragment + mDownloaderFragment = new DownloaderTaskFragment(); + + // Set DownloaderTaskFragment arguments + Bundle args = new Bundle(); + args.putIntegerArrayList(TAG_FRIEND_RES_IDS, sRawTextFeedIds); + mDownloaderFragment.setArguments(args); + + // Give Fragment to the FragmentManager + mFragmentManager.beginTransaction() + .add(mDownloaderFragment, TAG_DOWNLOADER_FRAGMENT).commit(); + } + + // Register the BroadcastReceiver + @Override + protected void onResume() { + super.onResume(); + + // TODO: + // Register the BroadcastReceiver to receive a + // DATA_REFRESHED_ACTION broadcast + + + } + + @Override + protected void onPause() { + + // TODO: + // Unregister the BroadcastReceiver if it has been registered + // Note: check that mRefreshReceiver is not null before attempting to + // unregister in order to work around an Instrumentation issue + + + super.onPause(); + + } + + /* + * DownloadFinishedListener method + */ + + // Called back by DownloaderTask after data has been loaded + public void notifyDataRefreshed(String[] feeds) { + + // Process downloaded data + parseJSON(feeds); + + // Enable user interaction + mIsInteractionEnabled = true; + allowUserClicks(); + + }; + + // Enable user interaction with FriendFragment + private void allowUserClicks() { + mFriendsFragment.setAllowUserClicks(true); + } + + /* + * SelectionListener methods + */ + + // Report whether users interaction is enabled + public boolean canAllowUserClicks() { + return mIsInteractionEnabled; + } + + // Installs the FeedFragment when a Friend name is + // selected in the FriendsFragment + @Override + public void onItemSelected(int position) { + installFeedFragment(mFormattedFeeds[position]); + } + + // Add FeedFragment to Activity + private void installFeedFragment(String tweetData) { + // Make new Fragment + mFeedFragment = new FeedFragment(); + + // Set Fragment arguments + Bundle args = new Bundle(); + args.putString(TAG_TWEET_DATA, tweetData); + mFeedFragment.setArguments(args); + + // Give Fragment to the FragmentManager + FragmentTransaction transaction = mFragmentManager.beginTransaction(); + transaction.replace(R.id.fragment_container, mFeedFragment, + TAG_FEED_FRAGMENT); + transaction.addToBackStack(null); + transaction.commit(); + } + + @Override + protected void onSaveInstanceState(Bundle savedInstanceState) { + if (null != mFriendsFragment) { + savedInstanceState.putString(TAG_FRIENDS_FRAGMENT, + mFriendsFragment.getTag()); + } + if (null != mFeedFragment) { + savedInstanceState.putString(TAG_FEED_FRAGMENT, + mFeedFragment.getTag()); + } + if (null != mDownloaderFragment) { + savedInstanceState.putString(TAG_DOWNLOADER_FRAGMENT, + mDownloaderFragment.getTag()); + } + savedInstanceState.putBoolean(TAG_IS_DATA_AVAILABLE, + mIsInteractionEnabled); + savedInstanceState.putStringArray(TAG_PROCESSED_FEEDS, mFormattedFeeds); + + super.onSaveInstanceState(savedInstanceState); + + } + + // Restore saved instance state + private void restoreState(Bundle savedInstanceState) { + + // Fragments tags were saved in onSavedInstanceState + mFriendsFragment = (FriendsFragment) mFragmentManager + .findFragmentByTag(savedInstanceState + .getString(TAG_FRIENDS_FRAGMENT)); + + mFeedFragment = (FeedFragment) mFragmentManager + .findFragmentByTag(savedInstanceState + .getString(TAG_FEED_FRAGMENT)); + + mDownloaderFragment = (DownloaderTaskFragment) mFragmentManager + .findFragmentByTag(savedInstanceState + .getString(TAG_DOWNLOADER_FRAGMENT)); + + mIsInteractionEnabled = savedInstanceState + .getBoolean(TAG_IS_DATA_AVAILABLE); + if (mIsInteractionEnabled) { + mFormattedFeeds = savedInstanceState + .getStringArray(TAG_PROCESSED_FEEDS); + } + } + + // Convert raw data (in JSON format) into text for display + private void parseJSON(String[] feeds) { + JSONArray[] JSONFeeds = new JSONArray[feeds.length]; + for (int i = 0; i < JSONFeeds.length; i++) { + try { + JSONFeeds[i] = new JSONArray(feeds[i]); + } catch (JSONException e) { + e.printStackTrace(); + } + + String name = ""; + String tweet = ""; + JSONArray tmp = JSONFeeds[i]; + + // string buffer for feeds + StringBuffer tweetRec = new StringBuffer(""); + for (int j = 0; j < tmp.length(); j++) { + try { + tweet = tmp.getJSONObject(j).getString(TAG_TEXT); + JSONObject user = (JSONObject) tmp.getJSONObject(j).get( + TAG_USER); + name = user.getString(TAG_NAME); + } catch (JSONException e) { + e.printStackTrace(); + } + tweetRec.append(name + " - " + tweet + "\n\n"); + } + mFormattedFeeds[i] = tweetRec.toString(); + } + } + + // Retrieve feeds text from a file + // Store them in mRawTextFeed[] + + private String[] loadTweetsFromFile() { + BufferedReader reader = null; + ArrayList<String> rawFeeds = new ArrayList<String>(); + try { + FileInputStream fis = openFileInput(TWEET_FILENAME); + reader = new BufferedReader(new InputStreamReader(fis)); + String s = null; + int i = 0; + while (null != (s = reader.readLine())) { + rawFeeds.add(i, s); + i++; + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + if (null != reader) { + try { + reader.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return rawFeeds.toArray(new String[rawFeeds.size()]); + } +} diff --git a/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/SelectionListener.java b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/SelectionListener.java new file mode 100644 index 0000000000000000000000000000000000000000..37bc846ea7411188b96082a8fdec23cb5a627c9a --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/SelectionListener.java @@ -0,0 +1,6 @@ +package course.labs.notificationslab; + +interface SelectionListener { + public void onItemSelected(int position); + public boolean canAllowUserClicks(); +} \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/TestFrontEndActivity.java b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/TestFrontEndActivity.java new file mode 100644 index 0000000000000000000000000000000000000000..bad35dcc340c441c042f7601b36d8e1fe56568be --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/java/course/labs/notificationslab/TestFrontEndActivity.java @@ -0,0 +1,127 @@ +package course.labs.notificationslab; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.res.Resources; +import android.os.Bundle; +import android.view.View; +import android.view.View.OnClickListener; +import android.widget.Button; + +public class TestFrontEndActivity extends Activity { + + private final static long DAWN_OF_TIME = 0; + static final String NOTIFICATION_POSTED = "notification_posted"; + + @SuppressWarnings("unused") + private static final String TAG = "TestFrontEndActivity"; + private static String sFileName; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_test_front_end); + + sFileName = getFilesDir() + "/" + MainActivity.TWEET_FILENAME; + + Button ageTweetsButton = (Button) findViewById(R.id.age_tweets_button); + ageTweetsButton.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + setFileAge(DAWN_OF_TIME); + } + + }); + + Button rejuvTweetsButton = (Button) findViewById(R.id.rejuv_tweets_button); + rejuvTweetsButton.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + setFileAge(System.currentTimeMillis()); + } + + }); + + Button startMainActivityButton = (Button) findViewById(R.id.start_main_button); + startMainActivityButton.setOnClickListener(new OnClickListener() { + + @Override + public void onClick(View v) { + startActivity(new Intent(TestFrontEndActivity.this, + MainActivity.class)); + } + }); + + createTweetFileIfMissing(); + + } + + private void createTweetFileIfMissing() { + + File file = new File(sFileName); + if (!file.exists()) { + + PrintWriter out = null; + BufferedReader in = null; + + try { + out = new PrintWriter(new BufferedWriter( + new OutputStreamWriter(openFileOutput( + MainActivity.TWEET_FILENAME, + Context.MODE_PRIVATE)))); + + for (int resId : MainActivity.sRawTextFeedIds) { + in = new BufferedReader(new InputStreamReader( + getResources().openRawResource(resId))); + + String line; + StringBuffer buffer = new StringBuffer(); + + while ((line = in.readLine()) != null) { + buffer.append(line); + } + + out.println(buffer); + + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (Resources.NotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + if (null != in) { + in.close(); + } + if (null != out) { + out.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + private void setFileAge(long timestamp) { + File file = new File(sFileName); + if (file.exists()) { + file.setLastModified(timestamp); + } + } + +} diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/layout/activity_main.xml b/labs/Lab5_NotificationsLab/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9ee9c50e096ff73da7eaa006c8a44d75add7b28 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/fragment_container" + android:layout_width="match_parent" + android:layout_height="match_parent" /> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/layout/activity_test_front_end.xml b/labs/Lab5_NotificationsLab/app/src/main/res/layout/activity_test_front_end.xml new file mode 100644 index 0000000000000000000000000000000000000000..e691b0213763ba0f0fc45eeb0fb5c32a77618136 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/layout/activity_test_front_end.xml @@ -0,0 +1,36 @@ +<LinearLayout 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:orientation="vertical" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context=".TestFrontEndActivity" > + + <Button + android:id="@+id/rejuv_tweets_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_margin="@dimen/base_margin" + android:text="@string/make_tweets_new" /> + + <Button + android:id="@+id/age_tweets_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_margin="@dimen/base_margin" + android:text="@string/make_tweets_old" /> + + <Button + android:id="@+id/start_main_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_margin="@dimen/base_margin" + android:text="@string/start_main_activity" /> + +</LinearLayout> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/layout/custom_notification.xml b/labs/Lab5_NotificationsLab/app/src/main/res/layout/custom_notification.xml new file mode 100644 index 0000000000000000000000000000000000000000..b2b22aae743e65f1e7fe023526236278c64ac9df --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/layout/custom_notification.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/toast_layout_root" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#7777" + android:padding="3dp"> + + <ImageView + android:id="@+id/image" + android:layout_width="44dp" + android:layout_height="44dp" + android:layout_marginEnd="10dp" + android:contentDescription="@string/alert_string" + android:src="@android:drawable/ic_dialog_info" /> + + <TextView + android:id="@+id/text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="#FFF" + android:textSize="24sp" /> + +</LinearLayout> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/layout/feed.xml b/labs/Lab5_NotificationsLab/app/src/main/res/layout/feed.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8163f98a8e7489fb993f2d616ac990a6819d158 --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/layout/feed.xml @@ -0,0 +1,13 @@ +<ScrollView 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" + tools:context=".FeedFragment" > + + <TextView + android:id="@+id/feed_view" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="8dp"/> + +</ScrollView> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-hdpi/ic_launcher.png b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..0e79b184fcf8cc47dede6d7ccde00d1a1e2d9c23 Binary files /dev/null and b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-ldpi/ic_launcher.png b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-ldpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..ebfac7d78b9e17c113f734d10af74bd2b100beba Binary files /dev/null and b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-ldpi/ic_launcher.png differ diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-mdpi/ic_launcher.png b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..1183441937efcae0151b75099bec444d034886e9 Binary files /dev/null and b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c8ab2a114716b712ec0c5122f9e9524afaa60b52 Binary files /dev/null and b/labs/Lab5_NotificationsLab/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/raw/lgaga.txt b/labs/Lab5_NotificationsLab/app/src/main/res/raw/lgaga.txt new file mode 100644 index 0000000000000000000000000000000000000000..d3ee9f90638238efeff71c8f2355f6ebb3d23eec --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/raw/lgaga.txt @@ -0,0 +1,13 @@ +[{"created_at":"Mon Aug 26 16:26:59 +0000 2013","id":372032436278132736,"id_str":"372032436278132736","text":"Go to http:\/\/t.co\/W2NqZiTtOo to see @Terry_World Terry Richardson's photos of me getting ready for the show!","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":3306,"favorite_count":2703,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/W2NqZiTtOo","expanded_url":"http:\/\/www.terrysdiary.com","display_url":"terrysdiary.com","indices":[6,28]}],"user_mentions":[{"screen_name":"Terry_World","name":"Terry Richardson","id":53184837,"id_str":"53184837","indices":[36,48]}]},"favorited":false,"retweeted":false,"possibly_sensitive":true,"lang":"en"}, +{"created_at":"Mon Aug 26 16:05:26 +0000 2013","id":372027012497825792,"id_str":"372027012497825792","text":"I love u! RT @BoyGeorge: Comeback? Babe I had no idea u went anywhere The 1st part was very Liza I loved it! Such rich tones More of that! x","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":2698,"favorite_count":2649,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"BoyGeorge","name":"Boy George","id":149103331,"id_str":"149103331","indices":[13,23]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:38:00 +0000 2013","id":372020111299051520,"id_str":"372020111299051520","text":"@TrollMarkus I felt so alive! All I remember is the audience cheering! I could barely hear! Hands in the air, smiles & flashes everywhere!","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372019416890105857,"in_reply_to_status_id_str":"372019416890105857","in_reply_to_user_id":1403042244,"in_reply_to_user_id_str":"1403042244","in_reply_to_screen_name":"TrollMarkus","user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1878,"favorite_count":1753,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"TrollMarkus","name":"Markus | Lady Gaga","id":1403042244,"id_str":"1403042244","indices":[0,12]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:32:32 +0000 2013","id":372018733973528576,"id_str":"372018733973528576","text":"@gabicorradin30 breathing","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372018554880933888,"in_reply_to_status_id_str":"372018554880933888","in_reply_to_user_id":163632802,"in_reply_to_user_id_str":"163632802","in_reply_to_screen_name":"gabicorradin30","user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1872,"favorite_count":2027,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"gabicorradin30","name":"gabi \u0950","id":163632802,"id_str":"163632802","indices":[0,15]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:29:03 +0000 2013","id":372017855531077632,"id_str":"372017855531077632","text":"That is correct. RT @dope_cinema: only @LadyGaga would purposely put booing in her performance hahah","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":4099,"favorite_count":3211,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"dope_cinema","name":"H3R TR1LLNESS","id":56843246,"id_str":"56843246","indices":[20,32]},{"screen_name":"ladygaga","name":"Lady Gaga","id":14230524,"id_str":"14230524","indices":[39,48]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:23:25 +0000 2013","id":372016437843742720,"id_str":"372016437843742720","text":"@RobbyRizl it was a canvas, and I AM the canvas during this performance","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372016216056930305,"in_reply_to_status_id_str":"372016216056930305","in_reply_to_user_id":206514213,"in_reply_to_user_id_str":"206514213","in_reply_to_screen_name":"RobbyRizl","user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1297,"favorite_count":1219,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"RobbyRizl","name":"Robby","id":206514213,"id_str":"206514213","indices":[0,10]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:21:16 +0000 2013","id":372015900150726656,"id_str":"372015900150726656","text":"RT @leonardo_bv: @ladygaga The choreography was perfect, mimetizing each era, and the booing during Born This Way era was such a great stat\u2026","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Mon Aug 26 15:20:19 +0000 2013","id":372015658956906496,"id_str":"372015658956906496","text":"@ladygaga The choreography was perfect, mimetizing each era, and the booing during Born This Way era was such a great statement!","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":14230524,"in_reply_to_user_id_str":"14230524","in_reply_to_screen_name":"ladygaga","user":{"id":85364390,"id_str":"85364390","name":"Leonardo Barros","screen_name":"leonardo_bv","location":"","description":"https:\/\/t.co\/RjpZJuBO8q","url":"http:\/\/t.co\/tWgqMxpxYD","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/tWgqMxpxYD","expanded_url":"http:\/\/bedaxxler.tumblr.com\/","display_url":"bedaxxler.tumblr.com","indices":[0,22]}]},"description":{"urls":[{"url":"https:\/\/t.co\/RjpZJuBO8q","expanded_url":"https:\/\/littlemonsters.com\/leonardobarros","display_url":"littlemonsters.com\/leonardobarros","indices":[0,23]}]}},"protected":false,"followers_count":125,"friends_count":73,"listed_count":1,"created_at":"Mon Oct 26 17:18:13 +0000 2009","favourites_count":4,"utc_offset":-10800,"time_zone":"Brasilia","geo_enabled":false,"verified":false,"statuses_count":3866,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/727292926\/2796c3db0b5ecf8cb4f7450aa1828232.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/727292926\/2796c3db0b5ecf8cb4f7450aa1828232.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3349505031\/02a2c3de8912d5c24a66d62c5814291a_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3349505031\/02a2c3de8912d5c24a66d62c5814291a_normal.png","profile_link_color":"05BCFF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"FFFFFF","profile_text_color":"000000","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1470,"favorite_count":1364,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"ladygaga","name":"Lady Gaga","id":14230524,"id_str":"14230524","indices":[0,9]}]},"favorited":false,"retweeted":false,"lang":"en"},"retweet_count":1470,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"leonardo_bv","name":"Leonardo Barros","id":85364390,"id_str":"85364390","indices":[3,15]},{"screen_name":"ladygaga","name":"Lady Gaga","id":14230524,"id_str":"14230524","indices":[17,26]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:17:57 +0000 2013","id":372015065291304960,"id_str":"372015065291304960","text":"@LiamCalderone I wrote it special for this performance!","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372014874899275776,"in_reply_to_status_id_str":"372014874899275776","in_reply_to_user_id":46734283,"in_reply_to_user_id_str":"46734283","in_reply_to_screen_name":"LiamCalderone","user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1299,"favorite_count":1284,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"LiamCalderone","name":"~","id":46734283,"id_str":"46734283","indices":[0,14]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:15:58 +0000 2013","id":372014565221208064,"id_str":"372014565221208064","text":"RT @Born2BeBrave: @ladygaga competition has no place in music, if people want competition they can watch football. Music is about art and e\u2026","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Mon Aug 26 15:15:10 +0000 2013","id":372014364888293376,"id_str":"372014364888293376","text":"@ladygaga competition has no place in music, if people want competition they can watch football. Music is about art and expression not wins","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":14230524,"in_reply_to_user_id_str":"14230524","in_reply_to_screen_name":"ladygaga","user":{"id":277342406,"id_str":"277342406","name":"jstn | #RadioARTPOP","screen_name":"Born2BeBrave","location":"Paris TN","description":"Production Associate for the one and only #RadioARTPOP\nAirs weekly Monday @ 8PM EST\n\nUndisputed Biggest Little Monster in West TN -","url":"http:\/\/t.co\/WnF3t4bD3M","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/WnF3t4bD3M","expanded_url":"http:\/\/www.facebook.com\/justincoltrevel","display_url":"facebook.com\/justincoltrevel","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":417,"friends_count":194,"listed_count":1,"created_at":"Tue Apr 05 05:11:30 +0000 2011","favourites_count":13,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":false,"statuses_count":958,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/775369481\/d75e56c1d0e15c62001800d1af4002f8.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/775369481\/d75e56c1d0e15c62001800d1af4002f8.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000117282954\/1b132671c8e34f2c131004c187790c2b_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000117282954\/1b132671c8e34f2c131004c187790c2b_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/277342406\/1375112866","profile_link_color":"009999","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":2184,"favorite_count":1897,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"ladygaga","name":"Lady Gaga","id":14230524,"id_str":"14230524","indices":[0,9]}]},"favorited":false,"retweeted":false,"lang":"en"},"retweet_count":2184,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"Born2BeBrave","name":"jstn | #RadioARTPOP","id":277342406,"id_str":"277342406","indices":[3,16]},{"screen_name":"ladygaga","name":"Lady Gaga","id":14230524,"id_str":"14230524","indices":[18,27]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:15:02 +0000 2013","id":372014327408390144,"id_str":"372014327408390144","text":"@BadKid_Earthfan aisle 5","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372014214769963010,"in_reply_to_status_id_str":"372014214769963010","in_reply_to_user_id":38388324,"in_reply_to_user_id_str":"38388324","in_reply_to_screen_name":"BadKid_Earthfan","user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1126,"favorite_count":1246,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"BadKid_Earthfan","name":"erfaan","id":38388324,"id_str":"38388324","indices":[0,16]}]},"favorited":false,"retweeted":false,"lang":"pt"}, +{"created_at":"Mon Aug 26 15:13:13 +0000 2013","id":372013873811177472,"id_str":"372013873811177472","text":"@vuittonbrunette everyone always asks why? Why did she do this? Why did she do that? My answer: For the Applause!","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372013192761065472,"in_reply_to_status_id_str":"372013192761065472","in_reply_to_user_id":317262708,"in_reply_to_user_id_str":"317262708","in_reply_to_screen_name":"vuittonbrunette","user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":2019,"favorite_count":1671,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"vuittonbrunette","name":"\u03b1\u03b7ge\u2113ic\u03b1","id":317262708,"id_str":"317262708","indices":[0,16]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:04:59 +0000 2013","id":372011801216815104,"id_str":"372011801216815104","text":"@WonderBoyxGAGA for the fame monster! yellow wig from the telephone video and monsterball!","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372011592155533313,"in_reply_to_status_id_str":"372011592155533313","in_reply_to_user_id":1655827585,"in_reply_to_user_id_str":"1655827585","in_reply_to_screen_name":"WonderBoyxGAGA","user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1250,"favorite_count":1108,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"WonderBoyxGAGA","name":"HAUS OF WONDER","id":1655827585,"id_str":"1655827585","indices":[0,15]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 15:03:41 +0000 2013","id":372011473117413376,"id_str":"372011473117413376","text":"So what did monsters think of my Vma performance? Stay focused on your greatest competition: yourself! #SnatchYourOwnWeave","source":"\u003ca href=\"http:\/\/twitter.com\/#!\/download\/ipad\" rel=\"nofollow\"\u003eTwitter for iPad\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":14230524,"id_str":"14230524","name":"Lady Gaga","screen_name":"ladygaga","location":"","description":"BUY MY NEW SINGLE 'APPLAUSE' AND PRE-ORDER MY ALBUM 'ARTPOP' HERE NOW! http:\/\/t.co\/6y7xRxEuw3","url":"http:\/\/t.co\/6y7xRxEuw3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/6y7xRxEuw3","expanded_url":"http:\/\/smarturl.it\/Applause","display_url":"smarturl.it\/Applause","indices":[71,93]}]}},"protected":false,"followers_count":39883682,"friends_count":135174,"listed_count":243025,"created_at":"Wed Mar 26 22:37:48 +0000 2008","favourites_count":4,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":3039,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FAF0FA","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000050060495\/13506f61e5eb69fd109095c8d7edd701.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000280665322\/bdd8a8c3b63f6aeb83f21c77f640723f_normal.jpeg","profile_link_color":"2FC2EF","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":7095,"favorite_count":7341,"entities":{"hashtags":[{"text":"SnatchYourOwnWeave","indices":[103,122]}],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"}] diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/raw/rblack.txt b/labs/Lab5_NotificationsLab/app/src/main/res/raw/rblack.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d50cc5744e304467831d8f0cd80aee42e3181dc --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/raw/rblack.txt @@ -0,0 +1,15 @@ +[{"created_at":"Mon Aug 26 19:35:32 +0000 2013","id":372079888477339648,"id_str":"372079888477339648","text":"@JuanDirection_4","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372077635825725440,"in_reply_to_status_id_str":"372077635825725440","in_reply_to_user_id":620343755,"in_reply_to_user_id_str":"620343755","in_reply_to_screen_name":"JuanDirection_4","user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"favorite_count":2,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"JuanDirection_4","name":"Juan Rivera","id":620343755,"id_str":"620343755","indices":[0,16]}]},"favorited":false,"retweeted":false,"lang":"und"}, +{"created_at":"Mon Aug 26 18:41:30 +0000 2013","id":372066286517252096,"id_str":"372066286517252096","text":"so someone wrote this on my desk http:\/\/t.co\/nR7TMzhe31","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":795,"favorite_count":1356,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[],"media":[{"id":372066286521446400,"id_str":"372066286521446400","indices":[33,55],"media_url":"http:\/\/pbs.twimg.com\/media\/BSnYUPkCcAA7edg.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/BSnYUPkCcAA7edg.jpg","url":"http:\/\/t.co\/nR7TMzhe31","display_url":"pic.twitter.com\/nR7TMzhe31","expanded_url":"http:\/\/twitter.com\/MsRebeccaBlack\/status\/372066286517252096\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":453,"resize":"fit"},"medium":{"w":600,"h":800,"resize":"fit"},"large":{"w":768,"h":1024,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Mon Aug 26 18:15:20 +0000 2013","id":372059704953806848,"id_str":"372059704953806848","text":"@maddislifee DONT TELL ME WHAT TO DO MADDI","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":372057585936908288,"in_reply_to_status_id_str":"372057585936908288","in_reply_to_user_id":182048795,"in_reply_to_user_id_str":"182048795","in_reply_to_screen_name":"maddislifee","user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":6,"favorite_count":31,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"maddislifee","name":"Maddi Bragg","id":182048795,"id_str":"182048795","indices":[0,12]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 18:05:43 +0000 2013","id":372057285390258176,"id_str":"372057285390258176","text":"I liked a @YouTube video http:\/\/t.co\/ij6BlYiu9a CAMP TAKOTA DAY 11","source":"\u003ca href=\"http:\/\/www.google.com\/\" rel=\"nofollow\"\u003eGoogle\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":7,"favorite_count":38,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/ij6BlYiu9a","expanded_url":"http:\/\/youtu.be\/UdSN_tyoZfY?a","display_url":"youtu.be\/UdSN_tyoZfY?a","indices":[25,47]}],"user_mentions":[{"screen_name":"YouTube","name":"YouTube","id":10228272,"id_str":"10228272","indices":[10,18]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Mon Aug 26 16:35:35 +0000 2013","id":372034599540363264,"id_str":"372034599540363264","text":"so tired someone save me from school","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":151,"favorite_count":254,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 04:54:03 +0000 2013","id":371858055085830144,"id_str":"371858055085830144","text":"@idkgrapes yep lol","source":"web","truncated":false,"in_reply_to_status_id":371857907610316800,"in_reply_to_status_id_str":"371857907610316800","in_reply_to_user_id":760396748,"in_reply_to_user_id_str":"760396748","in_reply_to_screen_name":"idkgrapes","user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"favorite_count":3,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"idkgrapes","name":"nicole","id":760396748,"id_str":"760396748","indices":[0,10]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 04:53:45 +0000 2013","id":371857977906434048,"id_str":"371857977906434048","text":"@TaliaCBrown yep","source":"web","truncated":false,"in_reply_to_status_id":371857766370906113,"in_reply_to_status_id_str":"371857766370906113","in_reply_to_user_id":349711773,"in_reply_to_user_id_str":"349711773","in_reply_to_screen_name":"TaliaCBrown","user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"favorite_count":1,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"TaliaCBrown","name":"Talia","id":349711773,"id_str":"349711773","indices":[0,12]}]},"favorited":false,"retweeted":false,"lang":"und"}, +{"created_at":"Mon Aug 26 04:52:27 +0000 2013","id":371857650536820736,"id_str":"371857650536820736","text":"shout out to my sass at the 2011 vmas #throwback http:\/\/t.co\/fgk6TWyJ2j","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":72,"favorite_count":249,"entities":{"hashtags":[{"text":"throwback","indices":[38,48]}],"symbols":[],"urls":[{"url":"http:\/\/t.co\/fgk6TWyJ2j","expanded_url":"http:\/\/www.andpop.com\/wp-content\/uploads\/2013\/08\/anigif_enhanced-buzz-24708-1375982191-29.gif","display_url":"andpop.com\/wp-content\/upl\u2026","indices":[49,71]}],"user_mentions":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Mon Aug 26 03:23:28 +0000 2013","id":371835258859028480,"id_str":"371835258859028480","text":"@Maryssahhh I've known the kid for two years now. he's worked his butt off to get where he is now and he definitely does.","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":371834864720687104,"in_reply_to_status_id_str":"371834864720687104","in_reply_to_user_id":178940637,"in_reply_to_user_id_str":"178940637","in_reply_to_screen_name":"Maryssahhh","user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":2,"favorite_count":7,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"Maryssahhh","name":"Maryssahhh","id":178940637,"id_str":"178940637","indices":[0,11]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 03:20:02 +0000 2013","id":371834392156463104,"id_str":"371834392156463104","text":"@MrBlahargith it's my brothers birthday!","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":371834279023505411,"in_reply_to_status_id_str":"371834279023505411","in_reply_to_user_id":554200449,"in_reply_to_user_id_str":"554200449","in_reply_to_screen_name":"MrBlahargith","user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":2,"favorite_count":5,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"MrBlahargith","name":"Aaron Roddy","id":554200449,"id_str":"554200449","indices":[0,13]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 03:18:54 +0000 2013","id":371834107572924418,"id_str":"371834107572924418","text":"just heard @AustinMahone won a moon man tonight! its CRAAAZY to see how far you've come over the past couple of years. you deserve it!! :')","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":281,"favorite_count":478,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"AustinMahone","name":"Austin Mahone","id":196795202,"id_str":"196795202","indices":[11,24]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Mon Aug 26 03:01:22 +0000 2013","id":371829697467781120,"id_str":"371829697467781120","text":"@sarahmweyand @taylorswift13 WAIT WHAT","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":371828536216399873,"in_reply_to_status_id_str":"371828536216399873","in_reply_to_user_id":29033101,"in_reply_to_user_id_str":"29033101","in_reply_to_screen_name":"sarahmweyand","user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1,"favorite_count":5,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"sarahmweyand","name":"Sarah Weyand","id":29033101,"id_str":"29033101","indices":[0,13]},{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[14,28]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sun Aug 25 22:00:45 +0000 2013","id":371754043200110592,"id_str":"371754043200110592","text":"in case you haven't seen...im in @RickyPDillon's video this week! GO WATCH NOW AND MAYBE YOU'LL EVEN GET A FOLLOW! ;) http:\/\/t.co\/ScdijvXAXQ","source":"web","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":271,"favorite_count":457,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/ScdijvXAXQ","expanded_url":"http:\/\/www.youtube.com\/watch?v=Y500U6r_8OI","display_url":"youtube.com\/watch?v=Y500U6\u2026","indices":[118,140]}],"user_mentions":[{"screen_name":"RickyPDillon","name":"Ricky Dillon","id":73171449,"id_str":"73171449","indices":[33,46]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Sun Aug 25 20:48:15 +0000 2013","id":371735796715225088,"id_str":"371735796715225088","text":"selfieeeeee with the birthday boy http:\/\/t.co\/oWfdWegwNr","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":268479992,"id_str":"268479992","name":"Rebecca Black","screen_name":"MsRebeccaBlack","location":"Los Angeles, CA","description":"wait, what?","url":"http:\/\/t.co\/s2GVxq5Zg4","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/s2GVxq5Zg4","expanded_url":"http:\/\/youtube.com\/rebecca","display_url":"youtube.com\/rebecca","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1054276,"friends_count":6338,"listed_count":4836,"created_at":"Fri Mar 18 21:29:23 +0000 2011","favourites_count":1630,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":5690,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"FFFFFF","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/378800000055491584\/2d0652b4011e0becf461573a19a0a95e.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000152829318\/4c21bddc0e8c673575ae712cb98df39c_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/268479992\/1374455381","profile_link_color":"F00534","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"FFBEB2","profile_text_color":"FF0000","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":102,"favorite_count":523,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[],"media":[{"id":371735796719419392,"id_str":"371735796719419392","indices":[34,56],"media_url":"http:\/\/pbs.twimg.com\/media\/BSirvNHCAAAFjJx.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/BSirvNHCAAAFjJx.jpg","url":"http:\/\/t.co\/oWfdWegwNr","display_url":"pic.twitter.com\/oWfdWegwNr","expanded_url":"http:\/\/twitter.com\/MsRebeccaBlack\/status\/371735796715225088\/photo\/1","type":"photo","sizes":{"medium":{"w":600,"h":450,"resize":"fit"},"large":{"w":1024,"h":768,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":255,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"} +] diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/raw/tswift.txt b/labs/Lab5_NotificationsLab/app/src/main/res/raw/tswift.txt new file mode 100644 index 0000000000000000000000000000000000000000..b74158e89b8281c8892570d27b193d237d2ad4ba --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/raw/tswift.txt @@ -0,0 +1,15 @@ +[{"created_at":"Mon Aug 26 04:08:18 +0000 2013","id":371846538727014400,"id_str":"371846538727014400","text":"I love you guys so much.","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":28891,"favorite_count":34056,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sun Aug 25 23:55:12 +0000 2013","id":371782844135505921,"id_str":"371782844135505921","text":"Headed to the VMAs. So. Excited.","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":15734,"favorite_count":19727,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sun Aug 25 11:30:50 +0000 2013","id":371595521397628929,"id_str":"371595521397628929","text":"RT @markvillaver: Taylor Swift & Jennifer Lopez - Jenny from the Block - RED Tour - L.A. Staples Center Sat 8\/24\/2013 http:\/\/t.co\/WUtebAqJk\u2026","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sun Aug 25 10:16:54 +0000 2013","id":371576912033755139,"id_str":"371576912033755139","text":"Taylor Swift & Jennifer Lopez - Jenny from the Block - RED Tour - L.A. Staples Center Sat 8\/24\/2013 http:\/\/t.co\/WUtebAqJks via @youtube","source":"\u003ca href=\"http:\/\/twitter.com\/tweetbutton\" rel=\"nofollow\"\u003eTweet Button\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":251833625,"id_str":"251833625","name":"Mark Villaver 24\/7","screen_name":"markvillaver","location":"","description":"","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":5317,"friends_count":2239,"listed_count":42,"created_at":"Sun Feb 13 23:17:44 +0000 2011","favourites_count":1460,"utc_offset":-36000,"time_zone":"Hawaii","geo_enabled":false,"verified":false,"statuses_count":2727,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/725389249\/d0ac6d95f4718b1962632eb8d123fec8.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/725389249\/d0ac6d95f4718b1962632eb8d123fec8.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000018911688\/545dfaa8691e3bfb00de44ad1c61b269_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000018911688\/545dfaa8691e3bfb00de44ad1c61b269_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/251833625\/1371703034","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":3213,"favorite_count":3323,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/WUtebAqJks","expanded_url":"http:\/\/www.youtube.com\/watch?v=hX1GruGRefA&sns=tw","display_url":"youtube.com\/watch?v=hX1Gru\u2026","indices":[104,126]}],"user_mentions":[{"screen_name":"YouTube","name":"YouTube","id":10228272,"id_str":"10228272","indices":[131,139]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"retweet_count":3213,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"markvillaver","name":"Mark Villaver 24\/7","id":251833625,"id_str":"251833625","indices":[3,16]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sun Aug 25 06:23:01 +0000 2013","id":371518054363983872,"id_str":"371518054363983872","text":"RT @JLo: @taylorswift13 had so much fun with you tonight!!! #RedTourLA #jennyfromtheblock #hairbrushsongs","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sun Aug 25 06:20:02 +0000 2013","id":371517303713587200,"id_str":"371517303713587200","text":"@taylorswift13 had so much fun with you tonight!!! #RedTourLA #jennyfromtheblock #hairbrushsongs","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":371515507242844160,"in_reply_to_status_id_str":"371515507242844160","in_reply_to_user_id":17919972,"in_reply_to_user_id_str":"17919972","in_reply_to_screen_name":"taylorswift13","user":{"id":85603854,"id_str":"85603854","name":"Jennifer Lopez","screen_name":"JLo","location":"","description":"","url":"http:\/\/t.co\/RGbADx6cyo","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/RGbADx6cyo","expanded_url":"http:\/\/www.jenniferlopez.com\/","display_url":"jenniferlopez.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":22763808,"friends_count":330,"listed_count":47023,"created_at":"Tue Oct 27 16:24:51 +0000 2009","favourites_count":12,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":2481,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/863017380\/211d66c34680c4210534e87c8cc2ff83.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/863017380\/211d66c34680c4210534e87c8cc2ff83.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000154437136\/a91f81ffa671c0affa78db1f26b49767_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000154437136\/a91f81ffa671c0affa78db1f26b49767_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/85603854\/1367976648","profile_link_color":"A82BA8","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"A29EA8","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":4817,"favorite_count":4194,"entities":{"hashtags":[{"text":"RedTourLA","indices":[52,62]},{"text":"jennyfromtheblock","indices":[64,82]},{"text":"hairbrushsongs","indices":[83,98]}],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[0,14]}]},"favorited":false,"retweeted":false,"lang":"en"},"retweet_count":4817,"favorite_count":0,"entities":{"hashtags":[{"text":"RedTourLA","indices":[61,71]},{"text":"jennyfromtheblock","indices":[73,91]},{"text":"hairbrushsongs","indices":[92,107]}],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"JLo","name":"Jennifer Lopez","id":85603854,"id_str":"85603854","indices":[3,7]},{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[9,23]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sun Aug 25 06:12:54 +0000 2013","id":371515507242844160,"id_str":"371515507242844160","text":"Sang Jenny From the Block with @JLo tonight at Staples Center. STILL FANGIRLING OUT ABOUT IT.","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":11152,"favorite_count":13256,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"JLo","name":"Jennifer Lopez","id":85603854,"id_str":"85603854","indices":[31,35]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sun Aug 25 06:09:52 +0000 2013","id":371514745448194048,"id_str":"371514745448194048","text":"RT @JLo: #Red!!! @taylorswift13 @ STAPLES Center http:\/\/t.co\/iVbun7jXtg","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sun Aug 25 05:40:55 +0000 2013","id":371507461200838656,"id_str":"371507461200838656","text":"#Red!!! @taylorswift13 @ STAPLES Center http:\/\/t.co\/iVbun7jXtg","source":"\u003ca href=\"http:\/\/instagram.com\" rel=\"nofollow\"\u003eInstagram\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":85603854,"id_str":"85603854","name":"Jennifer Lopez","screen_name":"JLo","location":"","description":"","url":"http:\/\/t.co\/RGbADx6cyo","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/RGbADx6cyo","expanded_url":"http:\/\/www.jenniferlopez.com\/","display_url":"jenniferlopez.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":22763808,"friends_count":330,"listed_count":47023,"created_at":"Tue Oct 27 16:24:51 +0000 2009","favourites_count":12,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":2481,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/863017380\/211d66c34680c4210534e87c8cc2ff83.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/863017380\/211d66c34680c4210534e87c8cc2ff83.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000154437136\/a91f81ffa671c0affa78db1f26b49767_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000154437136\/a91f81ffa671c0affa78db1f26b49767_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/85603854\/1367976648","profile_link_color":"A82BA8","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"A29EA8","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":3581,"favorite_count":2772,"entities":{"hashtags":[{"text":"Red","indices":[0,4]}],"symbols":[],"urls":[{"url":"http:\/\/t.co\/iVbun7jXtg","expanded_url":"http:\/\/instagram.com\/p\/dbKaY7muIX\/","display_url":"instagram.com\/p\/dbKaY7muIX\/","indices":[40,62]}],"user_mentions":[{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[8,22]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"retweet_count":3581,"favorite_count":0,"entities":{"hashtags":[{"text":"Red","indices":[9,13]}],"symbols":[],"urls":[{"url":"http:\/\/t.co\/iVbun7jXtg","expanded_url":"http:\/\/instagram.com\/p\/dbKaY7muIX\/","display_url":"instagram.com\/p\/dbKaY7muIX\/","indices":[49,71]}],"user_mentions":[{"screen_name":"JLo","name":"Jennifer Lopez","id":85603854,"id_str":"85603854","indices":[3,7]},{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[17,31]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Sun Aug 25 00:28:48 +0000 2013","id":371428914037411840,"id_str":"371428914037411840","text":"Our last show in LA is tonight. Can't wait to see what's in store......","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":7441,"favorite_count":8290,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sun Aug 25 00:27:47 +0000 2013","id":371428657610244096,"id_str":"371428657610244096","text":"RT @siananderson: List of things I was put on this earth to do - this http:\/\/t.co\/7x4NjvmyhG","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sat Aug 24 21:34:05 +0000 2013","id":371384944947646464,"id_str":"371384944947646464","text":"List of things I was put on this earth to do - this \ud83d\ude02\u2764 http:\/\/t.co\/7x4NjvmyhG","source":"\u003ca href=\"http:\/\/instagram.com\" rel=\"nofollow\"\u003eInstagram\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":38649346,"id_str":"38649346","name":"Sian Anderson","screen_name":"siananderson","location":"The Wilderness","description":"Understated.","url":"http:\/\/t.co\/KilFNMDvrF","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/KilFNMDvrF","expanded_url":"http:\/\/www.siananderson.co.uk","display_url":"siananderson.co.uk","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":8009,"friends_count":627,"listed_count":82,"created_at":"Fri May 08 11:39:37 +0000 2009","favourites_count":334,"utc_offset":3600,"time_zone":"London","geo_enabled":false,"verified":false,"statuses_count":40931,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/722816322\/fb72d9d03aeed2786091bddb18e01700.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/722816322\/fb72d9d03aeed2786091bddb18e01700.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000213562407\/5b6da6fc47236e50cd876f542305e4c8_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000213562407\/5b6da6fc47236e50cd876f542305e4c8_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/38649346\/1354023086","profile_link_color":"FF0000","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"E5507E","profile_text_color":"362720","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":1389,"favorite_count":1355,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/7x4NjvmyhG","expanded_url":"http:\/\/instagram.com\/p\/daUGdGgx1b\/","display_url":"instagram.com\/p\/daUGdGgx1b\/","indices":[55,77]}],"user_mentions":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"retweet_count":1389,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/7x4NjvmyhG","expanded_url":"http:\/\/instagram.com\/p\/daUGdGgx1b\/","display_url":"instagram.com\/p\/daUGdGgx1b\/","indices":[73,95]}],"user_mentions":[{"screen_name":"siananderson","name":"Sian Anderson","id":38649346,"id_str":"38649346","indices":[3,16]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Sat Aug 24 19:27:43 +0000 2013","id":371353144187314177,"id_str":"371353144187314177","text":"Now I've seen it through, and now I know the truth... That anything could happen. http:\/\/t.co\/B1V8G55MJM","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":12523,"favorite_count":16640,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[],"media":[{"id":371353144195702784,"id_str":"371353144195702784","indices":[82,104],"media_url":"http:\/\/pbs.twimg.com\/media\/BSdPt5YCYAAETtr.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/BSdPt5YCYAAETtr.jpg","url":"http:\/\/t.co\/B1V8G55MJM","display_url":"pic.twitter.com\/B1V8G55MJM","expanded_url":"http:\/\/twitter.com\/taylorswift13\/status\/371353144187314177\/photo\/1","type":"photo","sizes":{"large":{"w":594,"h":395,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":226,"resize":"fit"},"medium":{"w":594,"h":395,"resize":"fit"}}}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Sat Aug 24 19:11:06 +0000 2013","id":371348962243919872,"id_str":"371348962243919872","text":"RT @elliegoulding: Still blown away by how incredible the @taylorswift13 show is and how lucky I feel to have been a part of that last night","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sat Aug 24 17:50:45 +0000 2013","id":371328739692793856,"id_str":"371328739692793856","text":"Still blown away by how incredible the @taylorswift13 show is and how lucky I feel to have been a part of that last night","source":"\u003ca href=\"http:\/\/www.echofon.com\/\" rel=\"nofollow\"\u003eEchofon\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":20565284,"id_str":"20565284","name":"Ellie Goulding","screen_name":"elliegoulding","location":"London","description":"Do you want my heart between your teeth?","url":"http:\/\/t.co\/wuCRjYFgLH","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/wuCRjYFgLH","expanded_url":"http:\/\/www.elliegoulding.com","display_url":"elliegoulding.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1711103,"friends_count":280,"listed_count":5462,"created_at":"Wed Feb 11 02:15:58 +0000 2009","favourites_count":13,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":9603,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000124644860\/f6360999eb47d372a235b0da3923b9d3_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000124644860\/f6360999eb47d372a235b0da3923b9d3_normal.jpeg","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":4635,"favorite_count":5536,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[39,53]}]},"favorited":false,"retweeted":false,"lang":"en"},"retweet_count":4635,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"elliegoulding","name":"Ellie Goulding","id":20565284,"id_str":"20565284","indices":[3,17]},{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[58,72]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Sat Aug 24 07:41:13 +0000 2013","id":371175345254170625,"id_str":"371175345254170625","text":"RT @elliegoulding: So.much.fun. Love that girl http:\/\/t.co\/AzmX6SsQeb","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sat Aug 24 06:46:29 +0000 2013","id":371161572628242432,"id_str":"371161572628242432","text":"So.much.fun. Love that girl http:\/\/t.co\/AzmX6SsQeb","source":"\u003ca href=\"http:\/\/instagram.com\" rel=\"nofollow\"\u003eInstagram\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":20565284,"id_str":"20565284","name":"Ellie Goulding","screen_name":"elliegoulding","location":"London","description":"Do you want my heart between your teeth?","url":"http:\/\/t.co\/wuCRjYFgLH","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/wuCRjYFgLH","expanded_url":"http:\/\/www.elliegoulding.com","display_url":"elliegoulding.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":1711103,"friends_count":280,"listed_count":5462,"created_at":"Wed Feb 11 02:15:58 +0000 2009","favourites_count":13,"utc_offset":-18000,"time_zone":"Quito","geo_enabled":false,"verified":true,"statuses_count":9603,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000124644860\/f6360999eb47d372a235b0da3923b9d3_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000124644860\/f6360999eb47d372a235b0da3923b9d3_normal.jpeg","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":4879,"favorite_count":4568,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/AzmX6SsQeb","expanded_url":"http:\/\/instagram.com\/p\/dYukOeTfdB\/","display_url":"instagram.com\/p\/dYukOeTfdB\/","indices":[28,50]}],"user_mentions":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"retweet_count":4879,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"urls":[{"url":"http:\/\/t.co\/AzmX6SsQeb","expanded_url":"http:\/\/instagram.com\/p\/dYukOeTfdB\/","display_url":"instagram.com\/p\/dYukOeTfdB\/","indices":[47,69]}],"user_mentions":[{"screen_name":"elliegoulding","name":"Ellie Goulding","id":20565284,"id_str":"20565284","indices":[3,17]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Sat Aug 24 07:11:11 +0000 2013","id":371167788435394560,"id_str":"371167788435394560","text":"So.. Anything could happen at one of our LA shows. @elliegoulding showed up to sing 'anything could happen'! 15,000 person dance party.","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":9416,"favorite_count":11018,"entities":{"hashtags":[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"elliegoulding","name":"Ellie Goulding","id":20565284,"id_str":"20565284","indices":[51,65]}]},"favorited":false,"retweeted":false,"lang":"en"}, +{"created_at":"Fri Aug 23 01:07:20 +0000 2013","id":370713835423805440,"id_str":"370713835423805440","text":"RT @MTVNews: #IKnewYouWereTrouble co-star @reevecarney takes us through @taylorswift13's #VMA-nom vid frame-by-frame! http:\/\/t.co\/3JhEJt34tH","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Thu Aug 22 23:25:36 +0000 2013","id":370688232658567168,"id_str":"370688232658567168","text":"#IKnewYouWereTrouble co-star @reevecarney takes us through @taylorswift13's #VMA-nom vid frame-by-frame! http:\/\/t.co\/3JhEJt34tH","source":"\u003ca href=\"http:\/\/www.hootsuite.com\" rel=\"nofollow\"\u003eHootSuite\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":40076725,"id_str":"40076725","name":"MTV News","screen_name":"MTVNews","location":"","description":"Music, movie and celebs news fresh to your stream. You follow?\r\nhttp:\/\/t.co\/BblMJWnRgz","url":"http:\/\/t.co\/xXjjZBisRH","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/xXjjZBisRH","expanded_url":"http:\/\/www.mtv.com\/news\/","display_url":"mtv.com\/news\/","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/BblMJWnRgz","expanded_url":"http:\/\/www.facebook.com\/mtvnews","display_url":"facebook.com\/mtvnews","indices":[64,86]}]}},"protected":false,"followers_count":2187433,"friends_count":8026,"listed_count":8371,"created_at":"Thu May 14 20:33:18 +0000 2009","favourites_count":272,"utc_offset":-14400,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"verified":true,"statuses_count":36500,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"00BBE4","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/847394289\/924b156780de156f7cbb0a2a3d778fb3.gif","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/847394289\/924b156780de156f7cbb0a2a3d778fb3.gif","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/378800000182065288\/d38422abc7ff0be9396608dda335069e_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/378800000182065288\/d38422abc7ff0be9396608dda335069e_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/40076725\/1377106011","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"C0DFEC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":2771,"favorite_count":2017,"entities":{"hashtags":[{"text":"IKnewYouWereTrouble","indices":[0,20]},{"text":"VMA","indices":[76,80]}],"symbols":[],"urls":[{"url":"http:\/\/t.co\/3JhEJt34tH","expanded_url":"http:\/\/on.mtv.com\/176Q3CJ","display_url":"on.mtv.com\/176Q3CJ","indices":[105,127]}],"user_mentions":[{"screen_name":"reevecarney","name":"Reeve Carney","id":29158294,"id_str":"29158294","indices":[29,41]},{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[59,73]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"retweet_count":2771,"favorite_count":0,"entities":{"hashtags":[{"text":"IKnewYouWereTrouble","indices":[13,33]},{"text":"VMA","indices":[89,93]}],"symbols":[],"urls":[{"url":"http:\/\/t.co\/3JhEJt34tH","expanded_url":"http:\/\/on.mtv.com\/176Q3CJ","display_url":"on.mtv.com\/176Q3CJ","indices":[118,140]}],"user_mentions":[{"screen_name":"MTVNews","name":"MTV News","id":40076725,"id_str":"40076725","indices":[3,11]},{"screen_name":"reevecarney","name":"Reeve Carney","id":29158294,"id_str":"29158294","indices":[42,54]},{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[72,86]}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"}, +{"created_at":"Thu Aug 22 04:52:01 +0000 2013","id":370407988537733120,"id_str":"370407988537733120","text":"RT @teganandsara: Remember when we played #closer with @taylorswift13 yesterday? Ya. Me too. Living the dream. Seriously. Feel so lucky. Th\u2026","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":17919972,"id_str":"17919972","name":"Taylor Swift","screen_name":"taylorswift13","location":"","description":"Happy. Free. Confused. Lonely. \nAt the same time.","url":"http:\/\/t.co\/hZtHeBu93U","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/hZtHeBu93U","expanded_url":"http:\/\/twitter.com\/taylorswift13","display_url":"twitter.com\/taylorswift13","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":33053287,"friends_count":110,"listed_count":112437,"created_at":"Sat Dec 06 10:10:54 +0000 2008","favourites_count":0,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":true,"statuses_count":1913,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/687293757\/6d2ec27f32fa8cc2fcb7e6a9eada9945.jpeg","profile_background_tile":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1825696714\/image_normal.jpg","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Thu Aug 22 04:32:22 +0000 2013","id":370403043881152512,"id_str":"370403043881152512","text":"Remember when we played #closer with @taylorswift13 yesterday? Ya. Me too. Living the dream. Seriously. Feel so lucky. Thank u. Everyone.","source":"\u003ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003eTwitter for BlackBerry\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":21362105,"id_str":"21362105","name":"Tegan and Sara","screen_name":"teganandsara","location":"Vancouver\/Montreal","description":"Our new album Heartthrob is now available worldwide! Get it on iTunes! http:\/\/t.co\/5SB6W5ga","url":"http:\/\/t.co\/UU0T3kcm64","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/UU0T3kcm64","expanded_url":"http:\/\/www.teganandsara.com","display_url":"teganandsara.com","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/5SB6W5ga","expanded_url":"http:\/\/smarturl.it\/jp19p0","display_url":"smarturl.it\/jp19p0","indices":[71,91]}]}},"protected":false,"followers_count":335942,"friends_count":965,"listed_count":6105,"created_at":"Fri Feb 20 01:32:01 +0000 2009","favourites_count":2,"utc_offset":-25200,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":true,"statuses_count":6510,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"413837","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/837575683\/a9dd1a071a99fae8d9b2419074b90601.png","profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/837575683\/a9dd1a071a99fae8d9b2419074b90601.png","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3634227844\/80ec9e2b7f34deb4723eca0b6615c061_normal.jpeg","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3634227844\/80ec9e2b7f34deb4723eca0b6615c061_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/21362105\/1365451128","profile_link_color":"7B6BA0","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":false,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":2840,"favorite_count":3188,"entities":{"hashtags":[{"text":"closer","indices":[24,31]}],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[37,51]}]},"favorited":false,"retweeted":false,"lang":"en"},"retweet_count":2840,"favorite_count":0,"entities":{"hashtags":[{"text":"closer","indices":[42,49]}],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"teganandsara","name":"Tegan and Sara","id":21362105,"id_str":"21362105","indices":[3,16]},{"screen_name":"taylorswift13","name":"Taylor Swift","id":17919972,"id_str":"17919972","indices":[55,69]}]},"favorited":false,"retweeted":false,"lang":"en"} +] diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/values/dimens.xml b/labs/Lab5_NotificationsLab/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000000000000000000000000000000000000..db7223920b6e364e706a039d75a2023333cba13e --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/values/dimens.xml @@ -0,0 +1,8 @@ +<resources> + + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> + <dimen name="base_margin">8dp</dimen> + +</resources> diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/values/strings.xml b/labs/Lab5_NotificationsLab/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..8c85c3550436e2c5566efeefbea43118f2a8327f --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/values/strings.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app_name">NotificationsLab</string> + <string name="channel_name">Notifications Channel</string> + <string name="channel_description">Display the tweets download status</string> + <string name="title_activity_test_front_end">TestFrontEndActivity</string> + <string name="start_main_activity">Start Main Activity</string> + <string name="make_tweets_old">Make Tweets Old</string> + <string name="make_tweets_new">Make Tweets New</string> + <string name="alert_string">Alert</string> + <string name="download_failed_string">Download has failed. Please retry Later.</string> + <string name="download_succes_string">Download completed successfully.</string> + <string name="download_in_progress_string">Downloading Tweets from Network</string> + <string name="notification_sent_string">Notification Area Notification Sent</string> +</resources> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/app/src/main/res/values/styles.xml b/labs/Lab5_NotificationsLab/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000000000000000000000000000000000..4a10ca492dd2610011d3979b4dc551f471fa27ab --- /dev/null +++ b/labs/Lab5_NotificationsLab/app/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ +<resources> + + <!-- + Base application theme, dependent on API level. This theme is replaced + by AppBaseTheme from res/values-vXX/styles.xml on newer devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Light"> + <!-- + Theme customizations available in newer API levels can go in + res/values-vXX/styles.xml, while customizations related to + backward-compatibility can go here. + --> + </style> + + <!-- Application theme. --> + <style name="AppTheme" parent="AppBaseTheme"> + <!-- All customizations that are NOT specific to a particular API-level can go here. --> + </style> + +</resources> \ No newline at end of file diff --git a/labs/Lab5_NotificationsLab/build.gradle b/labs/Lab5_NotificationsLab/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..7fd901d0cff7f2f011618e0c8521c0cf4d551109 --- /dev/null +++ b/labs/Lab5_NotificationsLab/build.gradle @@ -0,0 +1,19 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + ext.kotlin_version = '1.4.10' + repositories { + jcenter() + google() + } + dependencies { + classpath 'com.android.tools.build:gradle:4.0.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + jcenter() + google() + } +} diff --git a/labs/Lab5_NotificationsLab/gradle/wrapper/gradle-wrapper.jar b/labs/Lab5_NotificationsLab/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..13372aef5e24af05341d49695ee84e5f9b594659 Binary files /dev/null and b/labs/Lab5_NotificationsLab/gradle/wrapper/gradle-wrapper.jar differ diff --git a/labs/Lab5_NotificationsLab/gradle/wrapper/gradle-wrapper.properties b/labs/Lab5_NotificationsLab/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..84337ad35f1bd119483fc4b23fecc06e71b00dd8 --- /dev/null +++ b/labs/Lab5_NotificationsLab/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/labs/Lab5_NotificationsLab/gradlew b/labs/Lab5_NotificationsLab/gradlew new file mode 100755 index 0000000000000000000000000000000000000000..9d82f78915133e1c35a6ea51252590fb38efac2f --- /dev/null +++ b/labs/Lab5_NotificationsLab/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/labs/Lab5_NotificationsLab/gradlew.bat b/labs/Lab5_NotificationsLab/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..8a0b282aa6885fb573c106b3551f7275c5f17e8e --- /dev/null +++ b/labs/Lab5_NotificationsLab/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/labs/Lab5_NotificationsLab/settings.gradle b/labs/Lab5_NotificationsLab/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..e7b4def49cb53d9aa04228dd3edb14c9e635e003 --- /dev/null +++ b/labs/Lab5_NotificationsLab/settings.gradle @@ -0,0 +1 @@ +include ':app'