Last active
July 5, 2018 04:15
-
-
Save shikto1/cb64b78fd2e1e693aa6833d2b57a6cee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.crashlytics.android.Crashlytics; | |
import io.fabric.sdk.android.Fabric; | |
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Fabric.with(this, new Crashlytics()); | |
// TODO: Move this to where you establish a user session | |
logUser(); | |
setContentView(R.layout.activity_main); | |
} | |
private void logUser() { | |
// TODO: Use the current user's information | |
// You can call any combination of these three methods | |
Crashlytics.setUserIdentifier("12345"); | |
Crashlytics.setUserEmail("[email protected]"); | |
Crashlytics.setUserName("Test User"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment