The "openFileOutput" is apperently undefined. How do i write my code to make it write to the file and not fail to compile?
openFileOutput()
is a method on Context
and its subclasses.
Here is my full code (if that helps)
Inside a Fragment
, you can call getActivity()
to retrieve the Activity
that hosts the Fragment
. Activity
inherits from Context
, and so you can call openFileOutput()
on the Activity
.