Trouble creating hotspot connction automatically by Android application?

I have an electronic project related to the Internet of Things.

Here, our team has created an Android application.

To open this Android application, one must automatically create an access point connection then enable communication..in an earlier version of Android, his work ..
but in the newer version, it can not create the hotspot connection automatically through the android application.
may be his due to permission denied ..
How to solve this problem ???