Content-Length: 257674 | pFad | https://github.com/Chan4077/StudyBuddy/commit/23f1f5ef93fdabb0fe41b256c611f4f20f81fca1

197 fix: Update prefix of IntroActivity · EdricChan03/studybuddy-android@23f1f5e · GitHub
Skip to content

Commit

Permalink
fix: Update prefix of IntroActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
EdricChan03 committed Dec 13, 2017
1 parent 183535a commit 23f1f5e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions app/src/main/java/com/edricchan/studybuddy/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.StringJoiner;

import static java.lang.System.out;

Expand All @@ -65,12 +66,12 @@ public class MainActivity extends AppCompatActivity implements GoogleApiClient.O
private int testInt, RC_SIGN_IN;
private FirebaseAuth mAuth;
private GoogleApiClient mGoogleApiClient;

private String userName;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
view = (View) findViewById(R.id.content);
view = (View) findViewById(R.id.todo_content);
// Declare a new thread to do a preference check
Thread t = new Thread(new Runnable() {
@Override
Expand All @@ -86,7 +87,7 @@ public void run() {
if (isFirstStart) {

// Launch app intro
final Intent i = new Intent(MainActivity.this, IntroActivity.class);
final Intent i = new Intent(MainActivity.this, MyIntroActivity.class);

runOnUiThread(new Runnable() {
@Override
Expand Down Expand Up @@ -197,8 +198,16 @@ public void onClick(View view) {
signInDialog.show();
} else {
// Logged in
// TODO: Add database
// TODO: Add firestore
Log.d("Tag", "Successfully logged in!");
String emailAddr = currentUser.getEmail();
String[] userNameDots = emailAddr.substring(0, emailAddr.lastIndexOf("@"))
.split(".");
StringJoiner joiner = new StringJoiner("");
for (String string:userNameDots) joiner.add(string);
userName = joiner.toString();
out.println(userName);
// userName = userNameDots.join("");
}
}

Expand Down Expand Up @@ -226,7 +235,7 @@ public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Log.d("Tag", "signInWithCredential:success");
FirebaseUser user = mAuth.getCurrentUser();
// FirebaseUser user = mAuth.getCurrentUser();
// AlertDialog.Builder builder = new AlertDialog.Builder(context);
// builder.setMessage(user.toString())
// .setPositiveButton("Close", new DialogInterface.OnClickListener() {
Expand Down

0 comments on commit 23f1f5e

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/Chan4077/StudyBuddy/commit/23f1f5ef93fdabb0fe41b256c611f4f20f81fca1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy