Android Open Source - utexas-utilities U Tilities Application






From Project

Back to project page utexas-utilities.

License

The source code is released under:

Apache License

If you think the Android project utexas-utilities listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.nasageek.utexasutilities;
/*from w  w w  .j a v  a 2  s . co  m*/
import android.app.Application;

import com.nasageek.utexasutilities.fragments.BlackboardFragment;

import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.annotation.ReportsCrashes;

import java.net.CookieHandler;
import java.net.CookieManager;
import java.util.HashMap;
import java.util.Map;

@ReportsCrashes(formKey = "", // This is required for backward compatibility but
// not used
customReportContent = {
        ReportField.ANDROID_VERSION, ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME,
        ReportField.BRAND, ReportField.BUILD, ReportField.PACKAGE_NAME,
        ReportField.INSTALLATION_ID, ReportField.PHONE_MODEL, ReportField.PRODUCT,
        ReportField.REPORT_ID, ReportField.STACK_TRACE, ReportField.USER_APP_START_DATE,
        ReportField.USER_CRASH_DATE, ReportField.CUSTOM_DATA
}, httpMethod = org.acra.sender.HttpSender.Method.PUT, reportType = org.acra.sender.HttpSender.Type.JSON, formUri = "http://utexasutilities.cloudant.com/acra-utexasutilities/_design/acra-storage/_update/report", formUriBasicAuthLogin = "spereacedidayestallynner", formUriBasicAuthPassword = "UAIwd5vciiGtWOGqsqYMJxnY"

// formUriBasicAuthLogin = "releasereporter",
// formUriBasicAuthPassword = "raebpcorterpxayszsword"

)
public class UTilitiesApplication extends Application {

    public static final String UTD_AUTH_COOKIE_KEY = "utd_auth_cookie";
    public static final String PNA_AUTH_COOKIE_KEY = "pna_auth_cookie";
    public static final String BB_AUTH_COOKIE_KEY = "bb_auth_cookie";

    private Map<String, AuthCookie> authCookies;

    @Override
    public void onCreate() {
        super.onCreate();
        authCookies = new HashMap<String, AuthCookie>();
        authCookies.put(UTD_AUTH_COOKIE_KEY, new UtdAuthCookie(this));

        authCookies.put(PNA_AUTH_COOKIE_KEY, new PnaAuthCookie(this));

        authCookies.put(BB_AUTH_COOKIE_KEY, new AuthCookie(BB_AUTH_COOKIE_KEY,
                    "s_session_id",
                    BlackboardFragment.BLACKBOARD_DOMAIN + "/webapps/login/",
                    "user_id",
                    "password",
                    this));

        CookieManager cookieManager = new CookieManager();
        CookieHandler.setDefault(cookieManager);

        // The following line triggers the initialization of ACRA
        ACRA.init(this);
    }

    public AuthCookie getAuthCookie(String key) {
        return authCookies.get(key);
    }

    public void putAuthCookie(String key, AuthCookie cookie) {
        authCookies.put(key, cookie);
    }

    public boolean allCookiesSet() {
        for (AuthCookie cookie : authCookies.values()) {
            if (!cookie.hasCookieBeenSet()) {
                return false;
            }
        }
        return !authCookies.isEmpty();
    }

    public String getUtdAuthCookieVal() {
        return authCookies.get(UTD_AUTH_COOKIE_KEY).getAuthCookieVal();
    }

    public String getPnaAuthCookieVal() {
        return authCookies.get(PNA_AUTH_COOKIE_KEY).getAuthCookieVal();
    }

    public String getBbAuthCookieVal() {
        return authCookies.get(BB_AUTH_COOKIE_KEY).getAuthCookieVal();
    }

    public void logoutAll() {
        for (AuthCookie authCookie : authCookies.values()) {
            authCookie.logout();
        }
    }
}




Java Source Code List

com.google.maps.android.ui.MyIconGenerator.java
com.mapsaurus.paneslayout.ActivityDelegate.java
com.mapsaurus.paneslayout.FragmentLauncher.java
com.mapsaurus.paneslayout.MenuItemWrapper.java
com.mapsaurus.paneslayout.MySlidingPaneLayout.java
com.mapsaurus.paneslayout.PanesActivity.java
com.mapsaurus.paneslayout.PanesLayout.java
com.mapsaurus.paneslayout.PanesSizer.java
com.mapsaurus.paneslayout.PhoneDelegate.java
com.mapsaurus.paneslayout.SimpleScrollView.java
com.mapsaurus.paneslayout.TabletDelegate.java
com.nasageek.utexasutilities.AsyncTask.java
com.nasageek.utexasutilities.AttachmentDownloadService.java
com.nasageek.utexasutilities.AuthCookie.java
com.nasageek.utexasutilities.BlackboardDashboardXmlParser.java
com.nasageek.utexasutilities.BuildingDatabase.java
com.nasageek.utexasutilities.BuildingProvider.java
com.nasageek.utexasutilities.BuildingSaxHandler.java
com.nasageek.utexasutilities.ChangeLog.java
com.nasageek.utexasutilities.ChangeableContextTask.java
com.nasageek.utexasutilities.CourseMapSaxHandler.java
com.nasageek.utexasutilities.FixedListPreference.java
com.nasageek.utexasutilities.LoginWebViewClient.java
com.nasageek.utexasutilities.MarkerManager.java
com.nasageek.utexasutilities.MyPair.java
com.nasageek.utexasutilities.MyScrollView.java
com.nasageek.utexasutilities.PlacemarkSaxHandler.java
com.nasageek.utexasutilities.PnaAuthCookie.java
com.nasageek.utexasutilities.RouteSaxHandler.java
com.nasageek.utexasutilities.SecurePreferences.java
com.nasageek.utexasutilities.TempLoginException.java
com.nasageek.utexasutilities.UTilitiesApplication.java
com.nasageek.utexasutilities.UtdAuthCookie.java
com.nasageek.utexasutilities.Utility.java
com.nasageek.utexasutilities.WrappedViewPager.java
com.nasageek.utexasutilities.WrappingSlidingDrawer.java
com.nasageek.utexasutilities.activities.AboutMeActivity.java
com.nasageek.utexasutilities.activities.BalanceActivity.java
com.nasageek.utexasutilities.activities.BlackboardPanesActivity.java
com.nasageek.utexasutilities.activities.CampusMapActivity.java
com.nasageek.utexasutilities.activities.DataUsageActivity.java
com.nasageek.utexasutilities.activities.LoginActivity.java
com.nasageek.utexasutilities.activities.MenuActivity.java
com.nasageek.utexasutilities.activities.NutritionInfoActivity.java
com.nasageek.utexasutilities.activities.Preferences.java
com.nasageek.utexasutilities.activities.ScheduleActivity.java
com.nasageek.utexasutilities.activities.UTilitiesActivity.java
com.nasageek.utexasutilities.adapters.BBClassAdapter.java
com.nasageek.utexasutilities.adapters.CourseMapAdapter.java
com.nasageek.utexasutilities.adapters.MultiPanePagerAdapter.java
com.nasageek.utexasutilities.adapters.MyFragmentPagerAdapter.java
com.nasageek.utexasutilities.adapters.ScheduleClassAdapter.java
com.nasageek.utexasutilities.adapters.TransactionAdapter.java
com.nasageek.utexasutilities.fragments.ActionModeFragment.java
com.nasageek.utexasutilities.fragments.BlackboardAnnouncementsFragment.java
com.nasageek.utexasutilities.fragments.BlackboardCourseListFragment.java
com.nasageek.utexasutilities.fragments.BlackboardCourseMapFragment.java
com.nasageek.utexasutilities.fragments.BlackboardDashboardFragment.java
com.nasageek.utexasutilities.fragments.BlackboardDownloadableItemFragment.java
com.nasageek.utexasutilities.fragments.BlackboardExternalItemFragment.java
com.nasageek.utexasutilities.fragments.BlackboardFragment.java
com.nasageek.utexasutilities.fragments.BlackboardGradesFragment.java
com.nasageek.utexasutilities.fragments.BlackboardPagerFragment.java
com.nasageek.utexasutilities.fragments.CourseScheduleFragment.java
com.nasageek.utexasutilities.fragments.DatePickerFragment.java
com.nasageek.utexasutilities.fragments.DoubleDatePickerDialogFragment.java
com.nasageek.utexasutilities.fragments.ExamScheduleFragment.java
com.nasageek.utexasutilities.fragments.MenuFragment.java
com.nasageek.utexasutilities.fragments.NutritionInfoFragment.java
com.nasageek.utexasutilities.fragments.PickCalendarDialogFragment.java
com.nasageek.utexasutilities.fragments.TransactionsFragment.java
com.nasageek.utexasutilities.model.BBClass.java
com.nasageek.utexasutilities.model.Building.java
com.nasageek.utexasutilities.model.Classtime.java
com.nasageek.utexasutilities.model.CourseMapItem.java
com.nasageek.utexasutilities.model.FeedItem.java
com.nasageek.utexasutilities.model.Placemark.java
com.nasageek.utexasutilities.model.Transaction.java
com.nasageek.utexasutilities.model.UTClass.java
com.viewpagerindicator.MyTabPageIndicator.java