1515import android .view .Menu ;
1616import android .view .MenuItem ;
1717
18- import com .google .android .gms .appinvite .AppInviteInvitation ;
19- import com .google .firebase .analytics .FirebaseAnalytics ;
2018import com .tomatodev .timerdroid .R ;
2119import com .tomatodev .timerdroid .fragments .AboutDialogFragment ;
2220import com .tomatodev .timerdroid .fragments .CategoriesFragment ;
@@ -40,8 +38,6 @@ public class HomeActivity extends AppCompatActivity {
4038 */
4139 private ViewPager mViewPager ;
4240
43- private FirebaseAnalytics mFirebaseAnalytics ;
44-
4541 @ Override
4642 protected void onCreate (Bundle savedInstanceState ) {
4743 super .onCreate (savedInstanceState );
@@ -77,8 +73,6 @@ protected void onCreate(Bundle savedInstanceState) {
7773 break ;
7874 }
7975 });
80-
81- mFirebaseAnalytics = FirebaseAnalytics .getInstance (this );
8276 }
8377
8478 @ Override
@@ -120,10 +114,11 @@ public boolean onOptionsItemSelected(MenuItem item) {
120114 }
121115
122116 private void onInviteClicked () {
123- Intent intent = new AppInviteInvitation .IntentBuilder (getString (R .string .menu_share ))
124- .setMessage (getString (R .string .menu_share_subject ))
125- .build ();
126- startActivityForResult (intent , 100 );
117+ Intent shareIntent = new Intent (android .content .Intent .ACTION_SEND );
118+ shareIntent .setType ("text/plain" );
119+ shareIntent .putExtra (Intent .EXTRA_SUBJECT , getString (R .string .menu_share_subject ));
120+ shareIntent .putExtra (Intent .EXTRA_TEXT , getString (R .string .menu_share_url ));
121+ startActivity (Intent .createChooser (shareIntent , getResources ().getString (R .string .feedback_chooser_title )));
127122 }
128123
129124 /**
0 commit comments