application unable to access internet on device wh

2019-02-20 15:29发布

I have developed one SIP based application which is not able to use an internet connection while debugging on an android device. But when debugging on the emulator it works properly. I have given all the permissions in manifest.xml regarding internet connection. Is there any other permission to use the internet connection to run an application on the device? here i have attached my manifest.xml.Any help and suggestions will be appreciated. `

<uses-feature android:name="android.hardware.sip.voip" android:required="true" />
<uses-permission android:name="android.permission.USE_SIP"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> 
<uses-feature android:name="android.hardware.wifi" android:required="true" />
<uses-feature android:name="android.hardware.microphone" android:required="true" />
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CALL_PRIVILEGED"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.WRITE_CONTACTS"/>

<application android:icon="@drawable/icon64" android:label="SipDemo" android:debuggable="true">
   <activity android:name=".WalkieTalkieActivity"
      android:configChanges="orientation|keyboardHidden">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity> 
    <service android:enabled="true" android:name=".WalkieTalkieActivity"/>
    <service android:enabled="true" android:name=".Services"/>

    <activity android:name=".WalkieTalkieActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity android:name=".SipSettings" android:label="set_preferences"/>
     <activity android:name=".dialer" android:label="@string/app_name"/>
     <activity android:name=".timer" android:label="@string/app_name"/>
     <activity android:name=".d1" android:label="@string/app_name"/>

    <receiver android:name=".IncomingCallReceiver" android:label="Call Receiver" android:enabled="true">
        <intent-filter> 
            <action android:name="android.intent.action.PHONE_STATE"/>
        </intent-filter> 
    </receiver>
</application>

`

1条回答
forever°为你锁心
2楼-- · 2019-02-20 16:01

To access Internet the only Uses Permission needed is android.permission.INTERNET in Manifest. Please Check your Internet connectivity with a Browser in Phone first.

查看更多
登录 后发表回答