Skip to content

Commit 5ac523f

Browse files
committed
Production version 1.0.0
1 parent a1e18a4 commit 5ac523f

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
22
apply plugin: 'com.google.gms.google-services'
33
apply plugin: 'com.google.firebase.firebase-perf'
44
apply plugin: 'com.google.firebase.crashlytics'
5+
56
android {
67
compileSdkVersion 29
78

app/src/main/java/com/techknightsrtu/crosstalks/app/feature/auth/LoginActivity.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.google.android.gms.tasks.OnSuccessListener;
1717
import com.google.android.gms.tasks.Task;
1818
import com.google.android.material.snackbar.Snackbar;
19+
import com.google.firebase.analytics.FirebaseAnalytics;
1920
import com.google.firebase.auth.AuthCredential;
2021
import com.google.firebase.auth.AuthResult;
2122
import com.google.firebase.auth.FirebaseAuth;
@@ -42,6 +43,7 @@ public class LoginActivity extends AppCompatActivity {
4243
//Firebase Auth
4344
private FirebaseAuth mAuth;
4445
private GoogleSignInClient mGoogleSignInClient;
46+
private FirebaseAnalytics mFirebaseAnalytics;
4547

4648
//Progress Dialog
4749
private ProgressDialog progressDialog;
@@ -64,6 +66,8 @@ protected void onCreate(Bundle savedInstanceState) {
6466
// Initialize Firebase Auth
6567
mAuth = FirebaseAuth.getInstance();
6668

69+
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
70+
6771
setupGoogleSignInClient();
6872

6973
}
@@ -213,6 +217,10 @@ public void onSuccess(String token) {
213217

214218
FirebaseCloudMessagingService.addTokenToFirebase(token);
215219

220+
Bundle bundle = new Bundle();
221+
bundle.putString(FirebaseAnalytics.Param.METHOD, "google-sign-in");
222+
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.LOGIN, bundle);
223+
216224
Intent i = new Intent(LoginActivity.this, HomeActivity.class);
217225
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
218226
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);

app/src/main/java/com/techknightsrtu/crosstalks/app/feature/auth/RegistrationActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ public void onCallback(boolean done) {
333333

334334
if(done){
335335

336+
Bundle bundle = new Bundle();
337+
bundle.putString(FirebaseAnalytics.Param.METHOD, "google-sign-in");
338+
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SIGN_UP, bundle);
339+
336340
mFirebaseAnalytics.setUserProperty("college_name", prefs.getCollegeName());
337341
Intent i = new Intent(RegistrationActivity.this, HomeActivity.class);
338342
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

app/src/main/java/com/techknightsrtu/crosstalks/app/feature/profile/BlockUserActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ private void init() {
4747

4848
rvBlockedChats = findViewById(R.id.rvBlockedChats);
4949

50+
btBack.setVisibility(View.GONE);
51+
5052
btBack.setOnClickListener(new View.OnClickListener() {
5153
@Override
5254
public void onClick(View view) {

app/src/main/java/com/techknightsrtu/crosstalks/app/feature/profile/ProfileActivity.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import android.widget.TextView;
2020

2121
import com.bumptech.glide.Glide;
22+
import com.google.firebase.analytics.FirebaseAnalytics;
2223
import com.techknightsrtu.crosstalks.BuildConfig;
2324
import com.techknightsrtu.crosstalks.R;
2425
import com.techknightsrtu.crosstalks.app.SplashActivity;
@@ -37,6 +38,8 @@ public class ProfileActivity extends AppCompatActivity {
3738

3839
private boolean isUpdateAvailable = false;
3940

41+
private FirebaseAnalytics mFirebaseAnalytics;
42+
4043
// Widgets
4144
private ImageView ivBack, ivUserAvatar;
4245
private ImageView ivUpdateIndicator;
@@ -57,6 +60,8 @@ protected void onCreate(Bundle savedInstanceState) {
5760
super.onCreate(savedInstanceState);
5861
setContentView(R.layout.activity_profile);
5962

63+
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
64+
6065
init();
6166

6267
// For Loading Ads
@@ -122,6 +127,11 @@ public void onClick(View view) {
122127
String shareMessage= "\nBored in this Quarantine ??? Let's have some fun, Download CrossTalks and chat with your mates anonymously. \n\n";
123128
shareMessage = shareMessage + "https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID +"\n\n";
124129
shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);
130+
131+
Bundle bundle = new Bundle();
132+
bundle.putString("Invite", "done");
133+
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SHARE, bundle);
134+
125135
startActivity(Intent.createChooser(shareIntent, "Invite your friends"));
126136
} catch(Exception e) {
127137
//e.toString();

0 commit comments

Comments
 (0)