0

I'am looking for the answer why oldFileObj.renameto(newFileObj) always return false, eventhough i have use the Manifest WriteFile permission

please see the pic below..

Code Java

Manifest

My phone is Samsung Galaxy A5 Oreo

I have search all the problem that similar to mine, but still can't find the answer

the permission already granted

Thank you very much!

Mdf
  • 1
  • 1
  • 3
  • 1
    https://stackoverflow.com/q/32635704/115145 – CommonsWare Jul 20 '19 at 14:49
  • From android 23+ some permissions are not granted by declaring in the manifest file so you have to request the permission manually. – Rohit Suthar Jul 20 '19 at 14:53
  • Thank you @CommonsWare for the answer, i will try it and see if it can solve the problem – Mdf Jul 20 '19 at 15:01
  • Thank you @RohitSuthar for the answer.. – Mdf Jul 20 '19 at 15:01
  • Did you looked for a error in logs? Probably the log contains much more information about the problem, please, attach it. And, .renameTo it isn' a method of ANDROID, do you mean File class? Please, be more detailed. – Valeriy Katkov Jul 20 '19 at 15:12
  • @ValeriyKatkov sorry if my question is not clear, next time i will attach the Log. yes i mean Object.renameto() where the object is the instance from the File Class. Btw thanks for the answer, I will edit the title then – Mdf Jul 20 '19 at 16:50

0 Answers0