A
A
Alex92012020-04-12 16:17:46
PHP
Alex9201, 2020-04-12 16:17:46

Auto-create Android logs?

The question arose - is it possible to create log files on android when certain triggers are triggered? For example, if a new application is installed on the device, you need to create a "newapp.txt" file in a specific directory. The contents of the file should contain the name of the installed application and the date/time of installation. Or if a certain date/time came (say, 04/11/2020 at 13:00), a "datetime.txt" file with empty content was automatically created.

For example, I installed google chrome on my device, and in the required directory (which I predetermined) a "newapp.txt" file appeared with the following content:
04/11/2020 11:00 AM New app installed - Google Chrome
After that, on 04/11/2020 at 13:00, the second trigger worked (the right time came) and an empty file "datetime.txt" appeared in the right directory (which I had previously determined) Tell me

which way to look, and are there already existing applications that solve the task at hand?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
irishmann, 2019-10-18
@HistoryART

Where did you lose the array key? You declare that you write in 48 fields, in fact you write in 49, just the same element without a key is superfluous. Duty comment about SQL-Injection

'$newnames[13]',
'$newnames[]',
'$newnames[14]',

F
FanatPHP, 2019-10-18
@FanatPHP

Terrified, remove this hell and make a separate table for pictures.
Write queries using prepared expressions.
Do not play up and do not make excuses, but do both.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question