Created
July 1, 2017 10:35
-
-
Save sankarcheppali/4cf6961dc63f500eb5f42e0a4041ee81 to your computer and use it in GitHub Desktop.
Android Connecting WiFi programmatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="example.siva.com.hellokotlin"> | |
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"> | |
</uses-permission> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"> | |
</uses-permission> | |
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"> | |
</uses-permission> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/AppTheme"> | |
<activity android:name=".MainActivity"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> | |
<receiver android:name=".MainActivity$WiFiChngBrdRcr" android:exported="true"> | |
<intent-filter> | |
<action android:name="android.net.wifi.STATE_CHANGE"/> | |
</intent-filter> | |
</receiver> | |
</application> | |
</manifest> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment