INSTALL_FAILED_DUPLICATE_PERMISSION… C2D_MESSAGE

I am using Google notifications in my app, and until now I have done below in the manifest: <!– GCM –> <uses-permission android:name=”android.permission.GET_ACCOUNTS” /> <!– GCM requires a Google account. –> <uses-permission android:name=”android.permission.WAKE_LOCK” /> <!– Keeps the processor from sleeping when a message is received. –> <uses-permission android:name=”com.google.android.c2dm.permission.RECEIVE” /> <!– This app has permission to … Read more

Full Screen DialogFragment in Android

I’m trying to show an almost fullscreen DialogFragment. But I’m somehow not able to do so. The way I am showing the Fragment is straight from the android developer documentation FragmentManager f = ((Activity)getContext()).getFragmentManager(); FragmentTransaction ft = f.beginTransaction(); Fragment prev = f.findFragmentByTag(“dialog”); if (prev != null) { ft.remove(prev); } ft.addToBackStack(null); // Create and show the … Read more

How can I resolve the error “The minCompileSdk (31) specified in a dependency’s AAR metadata” in native Java or Kotlin? [duplicate]

This question already has answers here: Android app won’t build — The minCompileSdk (31) specified in a dependency’s androidx.work:work-runtime:2.7.0-beta01 (26 answers) Closed 8 months ago. The community reviewed whether to reopen this question last month and left it closed: Original close reason(s) were not resolved The error message: The minCompileSdk (31) specified in a dependency’s … Read more

Error inflating when extending a class

I’m trying to create a custom view GhostSurfaceCameraView that extends SurfaceView. Here’s my class definition file GhostSurfaceCameraView.java: public class GhostSurfaceCameraView extends SurfaceView implements SurfaceHolder.Callback { SurfaceHolder mHolder; Camera mCamera; GhostSurfaceCameraView(Context context) { super(context); // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); … Read more

Android – shadow on text?

I am wondering how to add shadow on text in android? I have the following code which is applied on a bitmap and I wanted to be shadowed… paint.setColor(Color.BLACK); paint.setTextSize(55); paint.setFakeBoldText(false); paint.setShadowLayer(1, 0, 0, Color.BLACK); //This only shadows my whole view… 6 Answers 6