├── AndroidOnline2 ├── .gitignore ├── .idea │ ├── .name │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations.xml │ └── vcs.xml ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── hussienalrubaye │ │ │ └── youtubebroacast │ │ │ └── ApplicationTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── hussienalrubaye │ │ │ │ └── youtubebroacast │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ ├── correct.png │ │ │ └── error.png │ │ │ ├── layout │ │ │ └── activity_main.xml │ │ │ ├── menu │ │ │ └── mainmen.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-ar │ │ │ └── strings.xml │ │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── hussienalrubaye │ │ └── youtubebroacast │ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── AndroidOnline3 ├── Agenda.txt ├── DatabaseHelper.java ├── ManageDataBase.java └── intents.java └── README.md /AndroidOnline2/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /AndroidOnline2/.idea/.name: -------------------------------------------------------------------------------- 1 | YoutubeBroaCast -------------------------------------------------------------------------------- /AndroidOnline2/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AndroidOnline2/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /AndroidOnline2/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /AndroidOnline2/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | -------------------------------------------------------------------------------- /AndroidOnline2/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AndroidOnline2/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /AndroidOnline2/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AndroidOnline2/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /AndroidOnline2/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | applicationId "com.example.hussienalrubaye.youtubebroacast" 9 | minSdkVersion 12 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:23.2.0' 26 | } 27 | -------------------------------------------------------------------------------- /AndroidOnline2/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/hussienalrubaye/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /AndroidOnline2/app/src/androidTest/java/com/example/hussienalrubaye/youtubebroacast/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.example.hussienalrubaye.youtubebroacast; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /AndroidOnline2/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AndroidOnline2/app/src/main/java/com/example/hussienalrubaye/youtubebroacast/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.hussienalrubaye.youtubebroacast; 2 | 3 | import android.database.Cursor; 4 | import android.net.Uri; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.os.Bundle; 7 | import android.view.Menu; 8 | import android.view.MenuItem; 9 | import android.view.View; 10 | import android.widget.Button; 11 | import android.widget.TextView; 12 | import android.widget.Toast; 13 | 14 | 15 | public class MainActivity extends AppCompatActivity { 16 | 17 | TextView txtv; 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.activity_main); 22 | txtv=(TextView) findViewById(R.id.txtv); 23 | Button bulcik= (Button) findViewById(R.id.buClick); 24 | bulcik.setText("Change button text"); 25 | bulcik.setOnClickListener(new View.OnClickListener() { 26 | @Override 27 | public void onClick(View v) { 28 | 29 | try{ 30 | //define variable to hold all messages data 31 | String sms = ""; 32 | //set inbox direct to read message from 33 | Uri uriSMSURI = Uri.parse("content://sms/inbox"); 34 | //get all messages and load it in Cursor 35 | Cursor cur = getContentResolver().query(uriSMSURI, null, null, null, null); 36 | //move Cursor to first message 37 | cur.moveToPosition(0); 38 | //read all messages one by one 39 | while (cur.moveToNext()) { 40 | //load sender and the message content 41 | sms += "From :" + cur.getString(cur.getColumnIndex("address")) + " : " + cur.getString(cur.getColumnIndex("body"))+"\n"; 42 | } 43 | //display message in Textbox 44 | txtv.setText(sms); 45 | } catch(Exception ex){ 46 | 47 | } 48 | 49 | 50 | } 51 | }); 52 | Toast.makeText(this,"onCreate",Toast.LENGTH_LONG).show(); 53 | } 54 | 55 | protected void onStart(){ 56 | super.onStart(); 57 | Toast.makeText(this,"Onstart",Toast.LENGTH_LONG).show(); 58 | } 59 | 60 | 61 | protected void onResume(){ 62 | super.onResume(); 63 | Toast.makeText(this,"onResume",Toast.LENGTH_LONG).show(); 64 | } 65 | 66 | protected void onPause(){ 67 | super.onPause(); 68 | Toast.makeText(this,"onPause",Toast.LENGTH_LONG).show(); 69 | } 70 | 71 | 72 | protected void onStop(){ 73 | super.onStop(); 74 | 75 | } 76 | 77 | @Override 78 | public boolean onCreateOptionsMenu(Menu menu) 79 | { 80 | getMenuInflater().inflate(R.menu.mainmen,menu); 81 | 82 | return true; 83 | } 84 | 85 | @Override 86 | public boolean onOptionsItemSelected(MenuItem item) { 87 | int id = item.getItemId(); 88 | 89 | //noinspection SimplifiableIfStatement 90 | if (id == R.id.goback) { 91 | 92 | Toast.makeText(this,"go back",Toast.LENGTH_LONG).show(); 93 | 94 | 95 | } 96 | //noinspection SimplifiableIfStatement 97 | if (id == R.id.gobackforod) { 98 | 99 | Toast.makeText(this,"go gobackforod",Toast.LENGTH_LONG).show(); 100 | 101 | 102 | } 103 | return true; 104 | } 105 | 106 | } 107 | -------------------------------------------------------------------------------- /AndroidOnline2/app/src/main/res/drawable/correct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hussien89aa/OnlineTutorials/1d29b1bcbc2db5c6e853be91acbaff487e69d532/AndroidOnline2/app/src/main/res/drawable/correct.png -------------------------------------------------------------------------------- /AndroidOnline2/app/src/main/res/drawable/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hussien89aa/OnlineTutorials/1d29b1bcbc2db5c6e853be91acbaff487e69d532/AndroidOnline2/app/src/main/res/drawable/error.png -------------------------------------------------------------------------------- /AndroidOnline2/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 18 | 19 |