Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/
package com.linkedin.android.shaky.app;

import androidx.fragment.app.FragmentActivity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
Expand All @@ -24,7 +25,6 @@
import androidx.fragment.app.FragmentActivity;

import com.linkedin.android.shaky.ActionConstants;
import com.linkedin.android.shaky.Shaky;

import java.util.Random;

Expand All @@ -36,9 +36,6 @@ public class ShakyDemo extends FragmentActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_demo);

// Initialize ScreenCaptureManager for the Shaky library
((ShakyApplication) getApplication()).getShaky().initializeScreenCapture(this);

ViewCompat.setOnApplyWindowInsetsListener(
getWindow().findViewById(R.id.demo_background),
Expand Down Expand Up @@ -97,23 +94,5 @@ public void onClick(View v) {
.startFeedbackFlow(ActionConstants.ACTION_START_BUG_REPORT);
}
});

findViewById(R.id.demo_bottom_sheet_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((ShakyApplication) getApplication()).getShaky().startShakeBottomSheetFlowManually();
}
});

((ShakyApplication)getApplication()).getShaky().setUseMediaProjection(true);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Shaky shaky = ((ShakyApplication) getApplication()).getShaky();
if (!shaky.handleActivityResult(requestCode, resultCode, data)) {
// If Shaky did not handle the result, call the super method
super.onActivityResult(requestCode, resultCode, data);
}
}
}
9 changes: 0 additions & 9 deletions shaky/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,8 @@

<!-- Permission for foreground service -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- Permission specifically for media projection foreground service type on Android 10+ -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />

<application android:supportsRtl="true">
<activity android:name="com.linkedin.android.shaky.FeedbackActivity" />

<!-- Foreground service for MediaProjection -->
<service
android:name=".ScreenCaptureService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="mediaProjection" />
</application>
</manifest>

This file was deleted.

Loading
Loading