Hi,
some months ago I developed an extension to use Firebase and Storage (FirebaseManager Extension)
and I added an sample project to show how it works.
Some days ago I tried the sample and it close when I try to upload a file in the storage.
I tried to debug to understand where there is the exception,
in the past I used to create a log file adding this code:
public void appendLog(String text)
{
File logFile = new File("sdcard/FirebaseManager.txt");
if (!logFile.exists())
{
try
{
logFile.createNewFile();
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
try
{
BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true));
buf.append(text);
buf.newLine();
buf.flush();
buf.close();
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
But now this code doesn't work, the log file is not created.
I thought the problem is that there is restriction and I can create a file only in the app folder so I tried this path:
file:///storage/emulated/0/Android/data/appinventor.ai_mpbejo.ShoppingList/files/FirebaseManager.txt
But when I try to read the file always is not found
So I'm stuck I do not how to solve the problem about the log file (that can be useful in the future for other projects) and the extension
Somebody could help me
Thank You
Marco