I am learning to develop an android application for getting device location following Google developers forum: @http://developer.android.com/training/location/retrieve-curre
In Marshmallow there are lots of new things in android SDK. Asking the permission is one of it's new update that every developer should keep in mind. The similar thing happen with you. if your application target version 23 then you probably should have to take grant from the user before start to use it. You can only use it if user allow to access.Therefor developer need to take care all the test-case while taking the permission from the user into the application
For example your application need the access of the Location. In earlier version of android at time on installed it was show the permission dialog and they were granted the defined permission in your manifest file to the application. This things changed into the Marshmallow. Now each application should have to take permission from user to access the it.
See the developer sites and learn the basic steps for how to guide the user into the application for asking the runtime permission into the application.
There are lots of sites showing your the basic tutorial about how to ask the permission in Marshmallow. few can suggest as below
Building better application with runtime permission
Permissions design guide
This link guide you the basic info of how to guide the user into the application before asking the permission.
Thanks.