second Code

I added a few permissions and used Fragment