Reputation: 117
I'm building an app and I want to let my friends test it for a while to find out some bugs that I didn`t think about.
I want my users to be transparent about that action. purely pressing the button and the whole bug report will be sent to my email account.
During my time here figuring what is the best way to achieve my goal I encountered the ACRA lib. Unfortunately, most of the information is about 6 years old and is not working for me
This is what I end up trying:
public class MainActivity extends AppCompatActivity implements View.OnClickListener{
@ReportsCrashes(formKey = "", // will not be used
mailTo = "[email protected]", //My email address goes here
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ACRA.init(this);
...
}
While I added the dependency to the Build.Gradle
implementation 'ch.acra:acra-advanced-scheduler:5.5.1'
Android studio still can`t resolve the following:
ReportsCrashes,formKey,mailTo,ReportingInteractionMode,crash_toast_text
Is there a way to easily fix this so I can get the crash reports in an easy way to my email? I fear that ACRA is deprecated and I`m wasting my time.
Upvotes: 1
Views: 315
Reputation: 1399
It seems you're following an old guide relating to how to set up the ACRA library. Use the official one instead:
https://github.com/ACRA/acra/wiki/BasicSetup
It seems to me you're using the wrong dependencies and annotations - I assume what you need is:
implementation "ch.acra:acra-mail:$acraVersion"
implementation "ch.acra:acra-toast:$acraVersion"
And also might want to use @AcraMailSender
and @AcraToast
notifications. Hope this is good enough of a starting point for you.
Upvotes: 4