mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add EventLogging for Login success / failure
This commit is contained in:
parent
6e2c3341b7
commit
34eb356108
2 changed files with 9 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ public class CommonsApplication extends Application {
|
|||
public static final String EVENTLOG_URL = "https://bits.wikimedia.org/event.gif";
|
||||
|
||||
public static final Object[] EVENT_UPLOAD_ATTEMPT = {"MobileAppUploadAttempts", 5241449L};
|
||||
public static final Object[] EVENT_LOGIN_ATTEMPT = {"MobileAppLoginAttempts", 5240393L};
|
||||
public static final Object[] EVENT_LOGIN_ATTEMPT = {"MobileAppLoginAttempts", 5254859L};
|
||||
|
||||
public static final String DEFAULT_EDIT_SUMMARY = "Uploaded using Android Commons app";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.io.IOException;
|
|||
|
||||
import android.content.ContentResolver;
|
||||
import org.wikimedia.commons.CommonsApplication;
|
||||
import org.wikimedia.commons.EventLog;
|
||||
import org.wikimedia.commons.R;
|
||||
import org.wikimedia.commons.R.id;
|
||||
import org.wikimedia.commons.R.layout;
|
||||
|
|
@ -47,6 +48,12 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
protected void onPostExecute(String result) {
|
||||
super.onPostExecute(result);
|
||||
Log.d("Commons", "Login done!");
|
||||
|
||||
EventLog.schema(CommonsApplication.EVENT_LOGIN_ATTEMPT)
|
||||
.param("username", username)
|
||||
.param("result", result)
|
||||
.log();
|
||||
|
||||
if (result.equals("Success")) {
|
||||
dialog.dismiss();
|
||||
Toast successToast = Toast.makeText(context, R.string.login_success, Toast.LENGTH_SHORT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue