Skip to content
Snippets Groups Projects
Commit 76493b90 authored by Janik Besendorf's avatar Janik Besendorf
Browse files

adds share button and updates text

parent 19f4cf40
Branches
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ import android.annotation.SuppressLint;
import androidx.biometric.BiometricManager;
//import androidx.biometric.BiometricPrompt;
import android.annotation.TargetApi;
import android.content.Intent;
import android.drm.DrmInfo;
import android.drm.DrmInfoRequest;
import android.drm.DrmManagerClient;
......@@ -351,5 +352,11 @@ public class MainActivity extends AppCompatActivity {
return response;
}
public void onShareBtnClick(View view) {
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, sreport);
startActivity(Intent.createChooser(sharingIntent, "Share via"));
}
}
......@@ -40,17 +40,30 @@
android:layout_alignEnd="@+id/textView2"
android:layout_alignParentStart="true"
android:layout_marginStart="158dp"
android:layout_marginTop="115dp"
android:layout_marginTop="18dp"
android:layout_marginEnd="146dp"
android:layout_marginBottom="166dp"
android:onClick="onBtnClick"
android:text="Test" />
<Button
android:id="@+id/share_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="165dp"
android:layout_marginTop="40dp"
android:layout_marginEnd="158dp"
android:onClick="onShareBtnClick"
android:text="Share Report" />
<TextView
android:id="@+id/reportTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/button"
android:layout_below="@id/share_button"
android:layout_centerHorizontal="true"
android:scrollbars="vertical"
android:text=""
......
<resources>
<string name="app_name">Android Security Scanner</string>
<string name="instructions">
Click the Button to check if your device has a fingerprint reader
Click the Button run the test
</string>
</resources>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment