You should always check if result of getIntent()
is null
or not:
Intent i = getIntent();
if (i != null){
final String C1 = i.getStringExtra("PATH").trim();
final String A1 = i.getStringExtra("NAME").trim();
final String B1 = i.getStringExtra("FILE").trim();
....
}
Moreover, when you put data to your Intent
and later retrieve it with getStringExtra
, you should make sure, that you put String
. The value of R.raw.s14projectil
is always int
. If s14projectil
is the file with data, you should read it at first by opening InputStream
:
InputStream raw = getResources().openRawResource(R.raw.s14projectil);
And only after that pass the content to intent.