LAMW: Android 7.1.2 lazarus / 43-Android ---------------------------------------------------------------------- c4p · 2018-04-20 08:45 When writing to storage it does not seem to work on 7.1.2 (crashes out) but works fine on 5.1.1, 4.4 and others (I have permissions set). Any ideas what could be causing this issue? I also get the same result with a fresh project, just try a SaveToFile and it will crash. I have done a complete rebuild of Lazarus+LAMW+SDK+NDK and still get the same result on 7.1.2. AFAIK it was OK on 7.1.1. Can someone check this to confirm? in case it's my setup?  Update: Ran my old version on 7.1.2 and it works but not new compiles/builds! I recently upgraded from LAMW 0.7 to 0.8 but not convinced that is the issue. ---------------------------------------------------------------------- jmpessoa · 2018-04-20 17:32 Hi c4p, Please, post a simple code [test] here.... ---------------------------------------------------------------------- c4p · 2018-04-20 21:46 I think I have isolated the issue and should have picked up on it sooner tbh. Not sure if you recall a while back I mentioned that I could not save to the TEnvDirectory dirInternalAppStorage using the jDownloadManager component but could to dirDownloads, dirNotifications etc., to cut a very long story short, I could save to Internal App Storage on 5.1.1 but not on 7.1.2 and can no longer save data directly to that location, but can save fine on 5.1, 4.4 etc. which sent me on a bit of a tangent. The code below works perfect on 5.1.1, 4.4.2 but not on 7.1.2: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i jListView1. Items.SaveToFile(GetEnvironmentDirectoryPath(dirSdCard)+GetInternalApp StoragePath+'/test.txt');I did fresh installs back to LAMW rev. 691, rev.700 and used the latest rev.701 (0.8 version) but was still the same. So to summarise, it's not a new issue and is to do with saving to the InternalAppStorage on certain Android versions, one being 7.1.2. ---------------------------------------------------------------------- jmpessoa · 2018-04-21 01:56 Hi c4p, jListView1.Items.SaveToFile(''...") is a FPC question... What about:  jListView1.Items.SaveToFile('text1.txt')  ??? This should save to Internal app storage... Can you test? Ok, I will try  implement  a [android]  "jListView1.SaveToFlie" ... [Edited] Done!!!  You can try:  jListView1.SaveToFlie('MyListContent.txt'); and  jListView1.LoadFromFlie('MyListContent.txt'); ---------------------------------------------------------------------- c4p · 2018-04-21 22:44 Really appreciate you doing this jmpessoa but unfortunately could not get jListview1.SaveToFile working on any API I tried. ---------------------------------------------------------------------- jmpessoa · 2018-04-21 23:18 How Not? Please, update your LAMW stuff.... [there is not any API issue....] ---------------------------------------------------------------------- c4p · 2018-04-22 09:06 Starting to think it may be my device, I am checking it now. ---------------------------------------------------------------------- c4p · 2018-04-22 22:30 Update: I may thought I found the culprit, found a lcl unit in the lps file which may didn't help. I would love to say I have cracked it, but no. Still stuck on LAMW rev.691. ---------------------------------------------------------------------- jmpessoa · 2018-09-04 05:47 Hi c4p! About "SaveToFile" and others issues... Now,  LAMW  support  "run time permission"  [Target API >= 23] ... As code example, you can  see the updated "AppCameraDemo"   and the new demo "AppHttpClientDemo3" ....