diff --git a/app/build.gradle b/app/build.gradle index 0355073..792c875 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,5 +31,5 @@ dependencies { compile 'com.astuetz:pagerslidingtabstrip:1.0.1' compile 'com.github.amlcurran.showcaseview:library:5.0.0' compile 'com.google.android.gms:play-services-analytics:9.0.2' - + compile 'com.github.hotchemi:android-rate:1.0.1' } diff --git a/app/src/main/java/com/manateams/android/manateams/CoursesActivity.java b/app/src/main/java/com/manateams/android/manateams/CoursesActivity.java index c53ca10..842c348 100644 --- a/app/src/main/java/com/manateams/android/manateams/CoursesActivity.java +++ b/app/src/main/java/com/manateams/android/manateams/CoursesActivity.java @@ -10,6 +10,7 @@ import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; +import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -25,6 +26,11 @@ import com.manateams.android.manateams.views.DrawerAdapter; import com.manateams.scraper.data.Course; +import hotchemi.android.rate.AppRate; +import hotchemi.android.rate.OnClickButtonListener; + +import static android.content.DialogInterface.BUTTON_POSITIVE; + public class CoursesActivity extends AppCompatActivity { @@ -157,6 +163,9 @@ public boolean onOptionsItemSelected(MenuItem item) { startActivity(intent); finish(); break; + case R.id.action_share: + sendShareIntent(); + break; } if (mDrawerToggle.onOptionsItemSelected(item)) { return true; @@ -171,6 +180,13 @@ public void onItemClick(AdapterView parent, View view, int position, long id) } } + public void sendShareIntent() { + Intent sendIntent = new Intent(); + sendIntent.setAction(Intent.ACTION_SEND); + sendIntent.putExtra(Intent.EXTRA_TEXT, "Check your grades with manaTEAMS http://manateams.com"); + sendIntent.setType("text/plain"); + startActivity(sendIntent); + } public void onNeilWebsiteClick(View v) { String url = "http://patil215.github.io"; diff --git a/app/src/main/java/com/manateams/android/manateams/MainActivity.java b/app/src/main/java/com/manateams/android/manateams/MainActivity.java index 908f237..c97208a 100644 --- a/app/src/main/java/com/manateams/android/manateams/MainActivity.java +++ b/app/src/main/java/com/manateams/android/manateams/MainActivity.java @@ -6,6 +6,7 @@ import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; +import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; @@ -26,6 +27,9 @@ import com.manateams.scraper.data.ClassGrades; import com.manateams.scraper.data.Course; +import hotchemi.android.rate.AppRate; +import hotchemi.android.rate.OnClickButtonListener; + public class MainActivity extends AppCompatActivity implements AsyncTaskCompleteListener { @@ -76,6 +80,7 @@ protected void onCreate(Bundle savedInstanceState) { login(); } } + } @Override diff --git a/app/src/main/res/menu/courses.xml b/app/src/main/res/menu/courses.xml index 660e31e..cc675e7 100644 --- a/app/src/main/res/menu/courses.xml +++ b/app/src/main/res/menu/courses.xml @@ -1,6 +1,13 @@ + + + Grades not updated - pull down to refresh Grades not updated yet Logout + Share If you use separate credentials for your TEAMS account, enter them below Secondary Login GPA: 4.205 / 3.057 @@ -81,5 +82,11 @@ Log in with the credentials you use to sign into my.austinisd.org. Refresh + Share this app + If you enjoy playing this app, would you mind taking a moment to share it with your friends? It won\'t take more than a minute. Thanks for your support! + Share It Now + Remind Me Later + No, Thanks +