// Path: app/src/main/java/org/swistowski/vaulthelper/Application.java
// public class Application extends android.app.Application {
//     private Tracker mTracker;
//     private ClientWebView mWebView;
// 
//     @Override
//     public void onCreate()
//     {
//         mWebView = new ClientWebView(getApplicationContext());
//         ImageStorage.getInstance().setContext(getApplicationContext());
//         Data.getInstance().setContext(getApplicationContext());
//         super.onCreate();
//     }
// 
//     public ClientWebView getWebView() {
//         return mWebView;
//     }
// 
// 
//     public synchronized Tracker getTracker() {
//         if(mTracker==null){
//             GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
//             mTracker = analytics.newTracker(R.xml.global_tracker);
//         }
//         return mTracker;
//     }
// }


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.text.Html;
import android.view.View;
import android.widget.TextView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import org.swistowski.vaulthelper.Application;
import org.swistowski.vaulthelper.R;
        intent.putExtra(XONE_URL_ID, xBoxUrl);
        intent.putExtra(PSN_URL_ID, psnUrl);
        c.startActivityForResult(intent, LoginActivity.LOGIN_REQUEST);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();
        String url = intent.getStringExtra(XONE_URL_ID);
        if(url!=null){
            xone_url = url;
        }
        url = intent.getStringExtra(PSN_URL_ID);
        if(url!=null){
            psn_url = url;
        }

        setContentView(R.layout.activity_login);
        TextView loginInformation = (TextView)findViewById(R.id.loginDetailInformation);
        loginInformation.setText(Html.fromHtml(getString(R.string.login_information)));
    }

    void goToUrl(String url){
        Intent i = new Intent(getApplicationContext(), WebViewActivity.class);
        i.putExtra(URL, url);
        startActivityForResult(i, LOGIN_REQUEST);
    }

    private Tracker getTracker(){
// Path: app/src/main/java/org/swistowski/vaulthelper/Application.java
// public class Application extends android.app.Application {
//     private Tracker mTracker;
//     private ClientWebView mWebView;
// 
//     @Override
//     public void onCreate()
//     {
//         mWebView = new ClientWebView(getApplicationContext());
//         ImageStorage.getInstance().setContext(getApplicationContext());
//         Data.getInstance().setContext(getApplicationContext());
//         super.onCreate();
//     }
// 
//     public ClientWebView getWebView() {
//         return mWebView;
//     }
// 
// 
//     public synchronized Tracker getTracker() {
//         if(mTracker==null){
//             GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
//             mTracker = analytics.newTracker(R.xml.global_tracker);
//         }
//         return mTracker;
//     }
// }


// Path: app/src/main/java/org/swistowski/vaulthelper/activities/LoginActivity.java
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.text.Html;
import android.view.View;
import android.widget.TextView;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import org.swistowski.vaulthelper.Application;
import org.swistowski.vaulthelper.R;

        intent.putExtra(XONE_URL_ID, xBoxUrl);
        intent.putExtra(PSN_URL_ID, psnUrl);
        c.startActivityForResult(intent, LoginActivity.LOGIN_REQUEST);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();
        String url = intent.getStringExtra(XONE_URL_ID);
        if(url!=null){
            xone_url = url;
        }
        url = intent.getStringExtra(PSN_URL_ID);
        if(url!=null){
            psn_url = url;
        }

        setContentView(R.layout.activity_login);
        TextView loginInformation = (TextView)findViewById(R.id.loginDetailInformation);
        loginInformation.setText(Html.fromHtml(getString(R.string.login_information)));
    }

    void goToUrl(String url){
        Intent i = new Intent(getApplicationContext(), WebViewActivity.class);
        i.putExtra(URL, url);
        startActivityForResult(i, LOGIN_REQUEST);
    }

    private Tracker getTracker(){
        return  ((Application) getApplication()).getTracker();