Can a third party app create a hotspot on Android?

Is it possible for a third party app to open a WiFi Hotspot on Android? Following is basically the crux of how I am doing this.

public void setWifiApEnabled(int channel) {
    WifiConfiguration wifiConfig = new WifiConfiguration();
    wifiConfig.SSID = "GunaMelodyHotspot";
    wifiConfig.preSharedKey = "Melody123";
    wifiConfig.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
    wifiConfig.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
    wifiConfig.allowedProtocols.set(WifiConfiguration.Protocol.WPA);
    wifiConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
    wifiConfig.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
    wifiConfig.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
    wifiConfig.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
    wifiConfig.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);

    // Using reflection to set the hotspot configuration
    try {
        Method setWifiApConfigurationMethod = wifiManager.getClass().getMethod("setWifiApConfiguration", WifiConfiguration.class);
        setWifiApConfigurationMethod.invoke(wifiManager, wifiConfig);

        Method getWifiApStateMethod = wifiManager.getClass().getMethod("getWifiApState");
        int state = (int) getWifiApStateMethod.invoke(wifiManager);

        if (state == 12 || state == 13) { // AP state is enabled or enabling
            Method getWifiApConfigurationMethod = wifiManager.getClass().getMethod("getWifiApConfiguration");
            WifiConfiguration currentConfig = (WifiConfiguration) getWifiApConfigurationMethod.invoke(wifiManager);

            if (currentConfig != null) {
                Field apBandField = currentConfig.getClass().getDeclaredField("apBand");
                Field apChannelField = currentConfig.getClass().getDeclaredField("apChannel");

                apBandField.setAccessible(true);
                apChannelField.setAccessible(true);

                apBandField.setInt(currentConfig, 0); // 0 for 2.4GHz, 1 for 5GHz
                apChannelField.setInt(currentConfig, channel);

                setWifiApConfigurationMethod.invoke(wifiManager, currentConfig);
            }
        } else {
            Log.e("HotspotHelper", "Failed to set hotspot configuration");
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

I have the following permissions decalred in my AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>

But I get the following exception.

W System.err: Caused by: java.lang.SecurityException: App not allowed to read or update stored WiFi AP config (uid = 10370)
W System.err:   at android.os.Parcel.createExceptionOrNull(Parcel.java:3069)
W System.err:   at android.os.Parcel.createException(Parcel.java:3053)
W System.err:   at android.os.Parcel.readException(Parcel.java:3036)
W System.err:   at android.os.Parcel.readException(Parcel.java:2978)
W System.err:   at android.net.wifi.IWifiManager$Stub$Proxy.setWifiApConfiguration(IWifiManager.java:4742)
W System.err:   at android.net.wifi.WifiManager.setWifiApConfiguration(WifiManager.java:6078)
W System.err:   ... 19 more
W System.err: Caused by: android.os.RemoteException: Remote stack trace:
W System.err:   at com.android.server.wifi.WifiServiceImpl.setWifiApConfiguration(WifiServiceImpl.java:2872)
W System.err:   at android.net.wifi.IWifiManager$Stub.onTransact(IWifiManager.java:2281)
W System.err:   at android.os.Binder.execTransactInternal(Binder.java:1375)
W System.err:   at android.os.Binder.execTransact(Binder.java:1311)

Is it somehow allowed for a normal third-party to create a hotspot on Android?

I think there are restrictions when you programmatically want to
switch the wifi on cause of Security Issues,

The most you can do use Start an Intent Action to open wifi settings
which would directly lead user to turn it on by Manually.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật