Search in sources :

Example 1 with HttpClientNetworkStateHandler

use of com.microsoft.appcenter.http.HttpClientNetworkStateHandler in project mobile-center-sdk-android by Microsoft.

the class Distribute method getLatestReleaseDetails.

/**
 * Get latest release details from server.
 *
 * @param distributionGroupId distribution group id.
 * @param updateToken         token to secure API call.
 */
@VisibleForTesting
synchronized void getLatestReleaseDetails(String distributionGroupId, String updateToken) {
    AppCenterLog.debug(LOG_TAG, "Get latest release details...");
    HttpClientRetryer retryer = new HttpClientRetryer(new DefaultHttpClient());
    NetworkStateHelper networkStateHelper = NetworkStateHelper.getSharedInstance(mContext);
    HttpClient httpClient = new HttpClientNetworkStateHandler(retryer, networkStateHelper);
    String releaseHash = computeReleaseHash(mPackageInfo);
    String url = mApiUrl;
    if (updateToken == null) {
        url += String.format(GET_LATEST_PUBLIC_RELEASE_PATH_FORMAT, mAppSecret, distributionGroupId, releaseHash, getReportingParametersForUpdatedRelease(true, ""));
    } else {
        url += String.format(GET_LATEST_PRIVATE_RELEASE_PATH_FORMAT, mAppSecret, releaseHash, getReportingParametersForUpdatedRelease(false, distributionGroupId));
    }
    Map<String, String> headers = new HashMap<>();
    if (updateToken != null) {
        headers.put(HEADER_API_TOKEN, updateToken);
    }
    final Object releaseCallId = mCheckReleaseCallId = new Object();
    mCheckReleaseApiCall = httpClient.callAsync(url, METHOD_GET, headers, new HttpClient.CallTemplate() {

        @Override
        public String buildRequestBody() throws JSONException {
            /* Only GET is used by Distribute service. This method is never getting called. */
            return null;
        }

        @Override
        public void onBeforeCalling(URL url, Map<String, String> headers) {
            if (AppCenterLog.getLogLevel() <= VERBOSE) {
                /* Log url. */
                String urlString = url.toString().replaceAll(mAppSecret, HttpUtils.hideSecret(mAppSecret));
                AppCenterLog.verbose(LOG_TAG, "Calling " + urlString + "...");
                /* Log headers. */
                Map<String, String> logHeaders = new HashMap<>(headers);
                String apiToken = logHeaders.get(HEADER_API_TOKEN);
                if (apiToken != null) {
                    logHeaders.put(HEADER_API_TOKEN, HttpUtils.hideSecret(apiToken));
                }
                AppCenterLog.verbose(LOG_TAG, "Headers: " + logHeaders);
            }
        }
    }, new ServiceCallback() {

        @Override
        public void onCallSucceeded(final String payload) {
            /* onPostExecute is not always called on UI thread due to an old Android bug. */
            HandlerUtils.runOnUiThread(new Runnable() {

                @Override
                public void run() {
                    try {
                        handleApiCallSuccess(releaseCallId, payload, ReleaseDetails.parse(payload));
                    } catch (JSONException e) {
                        onCallFailed(e);
                    }
                }
            });
        }

        @Override
        public void onCallFailed(Exception e) {
            handleApiCallFailure(releaseCallId, e);
        }
    });
}
Also used : HashMap(java.util.HashMap) JSONException(org.json.JSONException) DefaultHttpClient(com.microsoft.appcenter.http.DefaultHttpClient) DEFAULT_INSTALL_URL(com.microsoft.appcenter.distribute.DistributeConstants.DEFAULT_INSTALL_URL) DEFAULT_API_URL(com.microsoft.appcenter.distribute.DistributeConstants.DEFAULT_API_URL) URL(java.net.URL) JSONException(org.json.JSONException) URISyntaxException(java.net.URISyntaxException) HttpException(com.microsoft.appcenter.http.HttpException) ActivityNotFoundException(android.content.ActivityNotFoundException) ServiceCallback(com.microsoft.appcenter.http.ServiceCallback) HttpClientRetryer(com.microsoft.appcenter.http.HttpClientRetryer) DefaultHttpClient(com.microsoft.appcenter.http.DefaultHttpClient) HttpClient(com.microsoft.appcenter.http.HttpClient) NetworkStateHelper(com.microsoft.appcenter.utils.NetworkStateHelper) HttpClientNetworkStateHandler(com.microsoft.appcenter.http.HttpClientNetworkStateHandler) Map(java.util.Map) HashMap(java.util.HashMap) VisibleForTesting(android.support.annotation.VisibleForTesting)

Example 2 with HttpClientNetworkStateHandler

use of com.microsoft.appcenter.http.HttpClientNetworkStateHandler in project mobile-center-sdk-android by Microsoft.

the class DistributeBeforeApiSuccessTest method happyPathUntilHangingCallWithToken.

@Test
public void happyPathUntilHangingCallWithToken() throws Exception {
    /* Setup mock. */
    HttpClientNetworkStateHandler httpClient = mock(HttpClientNetworkStateHandler.class);
    whenNew(HttpClientNetworkStateHandler.class).withAnyArguments().thenReturn(httpClient);
    UUID requestId = UUID.randomUUID();
    when(UUIDUtils.randomUUID()).thenReturn(requestId);
    when(PreferencesStorage.getString(PREFERENCE_KEY_REQUEST_ID)).thenReturn(requestId.toString());
    when(mPackageManager.getPackageInfo(DistributeUtils.TESTER_APP_PACKAGE_NAME, 0)).thenThrow(new PackageManager.NameNotFoundException());
    /* Mock install id from AppCenter. */
    UUID installId = UUID.randomUUID();
    when(mAppCenterFuture.get()).thenReturn(installId);
    when(AppCenter.getInstallId()).thenReturn(mAppCenterFuture);
    /* Start and resume: open browser. */
    start();
    Distribute.getInstance().onActivityResumed(mActivity);
    verifyStatic();
    String url = DistributeConstants.DEFAULT_INSTALL_URL;
    url += String.format(UPDATE_SETUP_PATH_FORMAT, "a");
    url += "?" + PARAMETER_RELEASE_HASH + "=" + TEST_HASH;
    url += "&" + PARAMETER_REDIRECT_ID + "=" + mContext.getPackageName();
    url += "&" + PARAMETER_REDIRECT_SCHEME + "=" + "appcenter";
    url += "&" + PARAMETER_REQUEST_ID + "=" + requestId.toString();
    url += "&" + PARAMETER_PLATFORM + "=" + PARAMETER_PLATFORM_VALUE;
    url += "&" + PARAMETER_ENABLE_UPDATE_SETUP_FAILURE_REDIRECT_KEY + "=" + "true";
    url += "&" + PARAMETER_INSTALL_ID + "=" + installId.toString();
    BrowserUtils.openBrowser(url, mActivity);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_REQUEST_ID, requestId.toString());
    /* If browser already opened, activity changed must not recall it. */
    Distribute.getInstance().onActivityPaused(mActivity);
    Distribute.getInstance().onActivityResumed(mActivity);
    verifyStatic();
    BrowserUtils.openBrowser(url, mActivity);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_REQUEST_ID, requestId.toString());
    /* Store token. */
    Distribute.getInstance().storeRedirectionParameters(requestId.toString(), "g", "some token");
    /* Verify behavior. */
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_UPDATE_TOKEN, "some token");
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID, "g");
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_REQUEST_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    verify(mDistributeInfoTracker).updateDistributionGroupId("g");
    HashMap<String, String> headers = new HashMap<>();
    headers.put(DistributeConstants.HEADER_API_TOKEN, "some token");
    verify(httpClient).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
    /* If call already made, activity changed must not recall it. */
    Distribute.getInstance().onActivityPaused(mActivity);
    Distribute.getInstance().onActivityResumed(mActivity);
    /* Verify behavior. */
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_UPDATE_TOKEN, "some token");
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID, "g");
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_REQUEST_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    verify(mDistributeInfoTracker).updateDistributionGroupId("g");
    verify(httpClient).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
    /* Call is still in progress. If we restart app, nothing happens we still wait. */
    restartResumeLauncher(mActivity);
    /* Verify behavior not changed. */
    verifyStatic();
    BrowserUtils.openBrowser(url, mActivity);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_UPDATE_TOKEN, "some token");
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID, "g");
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_REQUEST_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    verify(mDistributeInfoTracker).updateDistributionGroupId("g");
    verify(httpClient).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
    /* If process is restarted, a new call will be made. Need to mock storage for that. */
    when(PreferencesStorage.getString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID)).thenReturn("g");
    when(PreferencesStorage.getString(PREFERENCE_KEY_UPDATE_TOKEN)).thenReturn("some token");
    restartProcessAndSdk();
    Distribute.getInstance().onActivityResumed(mActivity);
    verify(httpClient, times(2)).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
}
Also used : ServiceCallback(com.microsoft.appcenter.http.ServiceCallback) PackageManager(android.content.pm.PackageManager) HashMap(java.util.HashMap) ArgumentMatcher(org.mockito.ArgumentMatcher) Matchers.anyString(org.mockito.Matchers.anyString) HttpClientNetworkStateHandler(com.microsoft.appcenter.http.HttpClientNetworkStateHandler) UUID(java.util.UUID) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 3 with HttpClientNetworkStateHandler

use of com.microsoft.appcenter.http.HttpClientNetworkStateHandler in project mobile-center-sdk-android by Microsoft.

the class DistributeBeforeApiSuccessTest method storeBetterEncryptedToken.

@Test
public void storeBetterEncryptedToken() throws Exception {
    /* Mock we already have token. */
    when(PreferencesStorage.getString(PREFERENCE_KEY_UPDATE_TOKEN)).thenReturn("some encrypted token");
    when(mCryptoUtils.decrypt(eq("some encrypted token"), anyBoolean())).thenReturn(new CryptoUtils.DecryptedData("some token", "some better encrypted token"));
    HttpClientNetworkStateHandler httpClient = mock(HttpClientNetworkStateHandler.class);
    whenNew(HttpClientNetworkStateHandler.class).withAnyArguments().thenReturn(httpClient);
    HashMap<String, String> headers = new HashMap<>();
    headers.put(DistributeConstants.HEADER_API_TOKEN, "some token");
    /* Trigger call. */
    start();
    Distribute.getInstance().onActivityResumed(mock(Activity.class));
    verify(httpClient).callAsync(anyString(), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
    /* Verify storage was updated with new encrypted value. */
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_UPDATE_TOKEN, "some better encrypted token");
}
Also used : ServiceCallback(com.microsoft.appcenter.http.ServiceCallback) HashMap(java.util.HashMap) Activity(android.app.Activity) Matchers.anyString(org.mockito.Matchers.anyString) CryptoUtils(com.microsoft.appcenter.utils.crypto.CryptoUtils) HttpClientNetworkStateHandler(com.microsoft.appcenter.http.HttpClientNetworkStateHandler) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 4 with HttpClientNetworkStateHandler

use of com.microsoft.appcenter.http.HttpClientNetworkStateHandler in project mobile-center-sdk-android by Microsoft.

the class DistributeBeforeApiSuccessTest method storePublicRedirectionBeforeStart.

@Test
public void storePublicRedirectionBeforeStart() throws Exception {
    /* Setup mock. */
    when(PreferencesStorage.getString(PREFERENCE_KEY_REQUEST_ID)).thenReturn("r");
    HttpClientNetworkStateHandler httpClient = mock(HttpClientNetworkStateHandler.class);
    whenNew(HttpClientNetworkStateHandler.class).withAnyArguments().thenReturn(httpClient);
    /* Store token before start, start in background, no storage access. */
    Distribute.getInstance().storeRedirectionParameters("r", "g", null);
    start();
    verifyStatic(never());
    PreferencesStorage.putString(anyString(), anyString());
    verifyStatic(never());
    PreferencesStorage.remove(anyString());
    /* Unlock the processing by going into foreground. */
    Distribute.getInstance().onActivityResumed(mock(Activity.class));
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_UPDATE_TOKEN);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID, "g");
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_REQUEST_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    verify(mDistributeInfoTracker).updateDistributionGroupId("g");
    HashMap<String, String> headers = new HashMap<>();
    verify(httpClient).callAsync(anyString(), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
}
Also used : ServiceCallback(com.microsoft.appcenter.http.ServiceCallback) HashMap(java.util.HashMap) Activity(android.app.Activity) Matchers.anyString(org.mockito.Matchers.anyString) HttpClientNetworkStateHandler(com.microsoft.appcenter.http.HttpClientNetworkStateHandler) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Example 5 with HttpClientNetworkStateHandler

use of com.microsoft.appcenter.http.HttpClientNetworkStateHandler in project mobile-center-sdk-android by Microsoft.

the class DistributeBeforeApiSuccessTest method happyPathUntilHangingCallWithoutToken.

@Test
public void happyPathUntilHangingCallWithoutToken() throws Exception {
    /* Setup mock. */
    HttpClientNetworkStateHandler httpClient = mock(HttpClientNetworkStateHandler.class);
    whenNew(HttpClientNetworkStateHandler.class).withAnyArguments().thenReturn(httpClient);
    UUID requestId = UUID.randomUUID();
    when(UUIDUtils.randomUUID()).thenReturn(requestId);
    when(PreferencesStorage.getString(PREFERENCE_KEY_REQUEST_ID)).thenReturn(requestId.toString());
    when(mPackageManager.getPackageInfo(DistributeUtils.TESTER_APP_PACKAGE_NAME, 0)).thenThrow(new PackageManager.NameNotFoundException());
    /* Mock install id from AppCenter. */
    UUID installId = UUID.randomUUID();
    when(mAppCenterFuture.get()).thenReturn(installId);
    when(AppCenter.getInstallId()).thenReturn(mAppCenterFuture);
    /* Start and resume: open browser. */
    start();
    Distribute.getInstance().onActivityResumed(mActivity);
    verifyStatic();
    String url = DistributeConstants.DEFAULT_INSTALL_URL;
    url += String.format(UPDATE_SETUP_PATH_FORMAT, "a");
    url += "?" + PARAMETER_RELEASE_HASH + "=" + TEST_HASH;
    url += "&" + PARAMETER_REDIRECT_ID + "=" + mContext.getPackageName();
    url += "&" + PARAMETER_REDIRECT_SCHEME + "=" + "appcenter";
    url += "&" + PARAMETER_REQUEST_ID + "=" + requestId.toString();
    url += "&" + PARAMETER_PLATFORM + "=" + PARAMETER_PLATFORM_VALUE;
    url += "&" + PARAMETER_ENABLE_UPDATE_SETUP_FAILURE_REDIRECT_KEY + "=" + "true";
    url += "&" + PARAMETER_INSTALL_ID + "=" + installId.toString();
    BrowserUtils.openBrowser(url, mActivity);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_REQUEST_ID, requestId.toString());
    /* If browser already opened, activity changed must not recall it. */
    Distribute.getInstance().onActivityPaused(mActivity);
    Distribute.getInstance().onActivityResumed(mActivity);
    verifyStatic();
    BrowserUtils.openBrowser(url, mActivity);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_REQUEST_ID, requestId.toString());
    /* Store token. */
    Distribute.getInstance().storeRedirectionParameters(requestId.toString(), "g", null);
    /* Verify behavior. */
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_UPDATE_TOKEN);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID, "g");
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_REQUEST_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    verify(mDistributeInfoTracker).updateDistributionGroupId("g");
    HashMap<String, String> headers = new HashMap<>();
    verify(httpClient).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
    /* If call already made, activity changed must not recall it. */
    Distribute.getInstance().onActivityPaused(mActivity);
    Distribute.getInstance().onActivityResumed(mActivity);
    /* Verify behavior. */
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_UPDATE_TOKEN);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID, "g");
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_REQUEST_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    verify(mDistributeInfoTracker).updateDistributionGroupId("g");
    verify(httpClient).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
    /* Call is still in progress. If we restart app, nothing happens we still wait. */
    restartResumeLauncher(mActivity);
    /* Verify behavior not changed. */
    verifyStatic();
    BrowserUtils.openBrowser(url, mActivity);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_UPDATE_TOKEN);
    verifyStatic();
    PreferencesStorage.putString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID, "g");
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_REQUEST_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_ID);
    verifyStatic();
    PreferencesStorage.remove(PREFERENCE_KEY_DOWNLOAD_STATE);
    verify(mDistributeInfoTracker).updateDistributionGroupId("g");
    verify(httpClient).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
    /* If process is restarted, a new call will be made. Need to mock storage for that. */
    when(PreferencesStorage.getString(PREFERENCE_KEY_DISTRIBUTION_GROUP_ID)).thenReturn("g");
    restartProcessAndSdk();
    Distribute.getInstance().onActivityResumed(mActivity);
    verify(httpClient, times(2)).callAsync(argThat(new ArgumentMatcher<String>() {

        @Override
        public boolean matches(Object argument) {
            return argument.toString().startsWith(DistributeConstants.DEFAULT_API_URL);
        }
    }), anyString(), eq(headers), any(HttpClient.CallTemplate.class), any(ServiceCallback.class));
}
Also used : ServiceCallback(com.microsoft.appcenter.http.ServiceCallback) PackageManager(android.content.pm.PackageManager) HashMap(java.util.HashMap) ArgumentMatcher(org.mockito.ArgumentMatcher) Matchers.anyString(org.mockito.Matchers.anyString) HttpClientNetworkStateHandler(com.microsoft.appcenter.http.HttpClientNetworkStateHandler) UUID(java.util.UUID) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

HttpClientNetworkStateHandler (com.microsoft.appcenter.http.HttpClientNetworkStateHandler)84 ServiceCallback (com.microsoft.appcenter.http.ServiceCallback)82 Matchers.anyString (org.mockito.Matchers.anyString)80 Test (org.junit.Test)66 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)66 HashMap (java.util.HashMap)54 ServiceCall (com.microsoft.appcenter.http.ServiceCall)52 InvocationOnMock (org.mockito.invocation.InvocationOnMock)50 Activity (android.app.Activity)46 UUID (java.util.UUID)20 ArgumentMatcher (org.mockito.ArgumentMatcher)18 DialogInterface (android.content.DialogInterface)16 Context (android.content.Context)14 AtomicReference (java.util.concurrent.atomic.AtomicReference)12 Semaphore (java.util.concurrent.Semaphore)8 PackageInfo (android.content.pm.PackageInfo)6 PackageManager (android.content.pm.PackageManager)6 LogSerializer (com.microsoft.appcenter.ingestion.models.json.LogSerializer)6 NetworkStateHelper (com.microsoft.appcenter.utils.NetworkStateHelper)6 JSONException (org.json.JSONException)6