如果在安全的无线网络上使用应用程序崩溃

时间:2013-04-18 09:21:39

标签: android crash wifi

我已经为Android 4.0及更高版本创建了一个应用程序。我的应用几乎在所有阶段都使用互联网。在每个活动中,我已经完成了所有必要的处理,以便在与服务器通信之前检查互联网连接。

我面临的问题是,如果在2G或3G网络上使用,应用程序运行正常,但如果在安全的wifi连接中使用它会崩溃。我尝试在不安全的wifi网络中使用该应用程序,它工作正常。

应用程序的清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ica.bankpoexamination2"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
    </uses-permission>
    <uses-permission android:name="android.permission.INTERNET" >
    </uses-permission>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.READ_PHONE_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>

    <uses-sdk android:minSdkVersion="10" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name="com.ica.bankpoexamination2.SplashScreenActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.LoginActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.TakeTestActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.PracticeTestActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.SpeedTestActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.ExamActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.GeneralInstructionsActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.RateUsActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.SpeedTestExamDetailsActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.PracticeTestExamDetailsActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.ChooseTestTypeActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.ExamNamesActivity"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.ReportActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.CurrentUpdateActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.TipsAndTricksActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.bankpoexamination2.LibraryActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.reportinnactivities.ReportListActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.reportinnactivities.ReportDetailsActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.reportinnactivities.ReportScoreCardActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.reportinnactivities.ReportTimeManagementActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.reportinnactivities.ReportQuestionReportActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.reportinnactivities.ReportDifficultyLevelActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.reportinnactivities.ReportAllTestReportActivity"
            android:label="@string/app_name"
            android:screenOrientation="landscape" >
        </activity>
        <activity
            android:name="com.ica.userregistration.RegisterActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.userregistration.OtpRegisterActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.ica.currentupdate.CurrentUpdateDetailsActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
    </application>

</manifest>

我该怎么做才能解决这个问题?

P.S:其他应用程序在同一个安全的无线网络上工作正常。

0 个答案:

没有答案