Android library to capture screenshot from your app

Overview

Instacapture 2.0 Release

Android library to capture screenshot from your app

Features

  • Capture all the contents of the screen, includes:

  • Set a specific view(s) to prevent it from capturing.

  • No permissions are required.

Installation

Add this to your module build.gradle file:

dependencies {
	...
	 compile "com.github.tarek360:instacapture:2.0.1"
}

Add this to your root build.gradle file (not your module build.gradle file) :

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

How to use Instacapture ?

Kotlin

Instacapture.capture(this, object : SimpleScreenCapturingListener() {
    override fun onCaptureComplete(bitmap: Bitmap) {
       //Your code here..

    }
})

// or in Rx way
Instacapture.captureRx(this).subscribe { bitmap ->
   //Your code here..
}

Java

Instacapture.INSTANCE.capture(activity, new SimpleScreenCapturingListener() {
    @Override
    public void onCaptureComplete(Bitmap bitmap) {
       //Your code here..
    }
}, ignoredViews);

// or in Rx way
Instacapture.INSTANCE.captureRx(this, ignoredViews).subscribe(new Action1<Bitmap>() {
    @Override
    public void call(Bitmap bitmap) {
        //Your code here..
     }
});

How to ignore view(s) from the screenshot?

Kotlin

Instacapture.capture(.., .., ignoredViews)
//or
Instacapture.captureRx(.., ignoredViews)

Java

Instacapture.INSTANCE.capture(.., .., ignoredViews);
//or
Instacapture.INSTANCE.captureRx(.., ignoredViews);
  • To enable Instacapture logging.

Kotlin

Instacapture.enableLogging(true);

Java

Instacapture.INSTANCE.enableLogging(true);

License

Copyright 2017 Tarek360

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments
  • Crash on OPPO R9 all time

    Crash on OPPO R9 all time

    Stack trace:  
    io.reactivex.exceptions.OnErrorNotImplementedException: java.lang.NoSuchFieldException: No field mView in class Landroid/view/ColorViewRootImpl; (declaration of 'android.view.ColorViewRootImpl' appears in /system/framework/framework.jar:classes2.dex)
    	at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
    	at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
    	at io.reactivex.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:76)
    	at io.reactivex.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111)
    	at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated(FlowableObserveOn.java:207)
    	at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:392)
    	at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
    	at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
    	at android.os.Handler.handleCallback(Handler.java:739)
    	at android.os.Handler.dispatchMessage(Handler.java:95)
    	at android.os.Looper.loop(Looper.java:179)
    	at android.app.ActivityThread.main(ActivityThread.java:5739)
    	at java.lang.reflect.Method.invoke(Native Method)
    	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)
    Caused by: com.tarek360.instacapture.exception.ScreenCapturingFailedException: java.lang.NoSuchFieldException: No field mView in class Landroid/view/ColorViewRootImpl; (declaration of 'android.view.ColorViewRootImpl' appears in /system/framework/framework.jar:classes2.dex)
    	at com.tarek360.instacapture.screenshot.FieldHelper.getFieldValue(FieldHelper.java:68)
    	at com.tarek360.instacapture.screenshot.FieldHelper.getRootViews(FieldHelper.java:52)
    	at com.tarek360.instacapture.screenshot.ScreenshotTaker.getScreenshotBitmap(ScreenshotTaker.java:49)
    	at com.tarek360.instacapture.screenshot.ViewsBitmapObservable$2.call(ViewsBitmapObservable.java:42)
    	at com.tarek360.instacapture.screenshot.ViewsBitmapObservable$2.call(ViewsBitmapObservable.java:39)
    	at io.reactivex.internal.operators.flowable.FlowableFromCallable.call(FlowableFromCallable.java:49)
    	at io.reactivex.internal.operators.flowable.FlowableScalarXMap.tryScalarXMapSubscribe(FlowableScalarXMap.java:54)
    	at io.reactivex.internal.operators.flowable.FlowableFlatMap.subscribeActual(FlowableFlatMap.java:50)
    	at io.reactivex.Flowable.subscribe(Flowable.java:12978)
    	at io.reactivex.Flowable.subscribe(Flowable.java:12924)
    	at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.run(FlowableSubscribeOn.java:82)
    	... 8 more
    Caused by: java.lang.NoSuchFieldException: No field mView in class Landroid/view/ColorViewRootImpl; (declaration of 'android.view.ColorViewRootImpl' appears in /system/framework/framework.jar:classes2.dex)
    	at java.lang.Class.getDeclaredField(Native Method)
    	at com.tarek360.instacapture.screenshot.FieldHelper.getFieldValue(FieldHelper.java:64)
    
    opened by fingdo 10
  • Support Map fragment turns white when capture a screenshot again

    Support Map fragment turns white when capture a screenshot again

    I have an activity with support map fragment inside. Map is loading OK, call InstaCapture.getInstance(MapBaseActivity.this).capture(fileScreenShot, ignoredView, btnShareOverlay, btnShare).setScreenCapturingListener(new ScreenCaptureListener() {

                @Override
                public void onCaptureStarted() {
                    //TODO..
                    Log.d(TAG, "Capture started");
                }
    
                @Override
                public void onCaptureFailed(Throwable e) {
                    //TODO..
                    Log.d(TAG, "Capture failed");
                }
    
                @Override
                public void onCaptureComplete(File file) {
                    //TODO..
                    mScreenshotFile = file;
                }
            });
    

    Everything is just fine at the first time, the screenshot contains the map and other views. But, when i want to capture the screen again, right after the first time by calling that above method, the map was white, all other views were ok. And other tries after the 1st time were failed like that.

    Any idea about this issue? Please help me to solve it. Thanks.

    opened by pqtuan86 10
  • Instacapture-2.0.0-beta missing <Bitmap> for captureRx(activity, ignoredViews).subscribe(new Subscriber() {

    Instacapture-2.0.0-beta missing for captureRx(activity, ignoredViews).subscribe(new Subscriber() {

    Hi there,

    There is a difference between physical clone (download from instacapture:2.0.0-beta) and [compile "com.github.tarek360:instacapture:2.0.0-beta" ]

    From compile "com.github.tarek360:instacapture:2.0.0-beta” Missing "Bitmap" for Subscriber

    public class Instacapture { private static final String MESSAGE_IS_ACTIVITY_RUNNING = "Is your activity running?"; private static final String ERROR_SCREENSHOT_CAPTURE_FAILED = "Screenshot capture failed";

    public Instacapture() {
    }
    
    public static void capture(@NonNull Activity activity, @NonNull final ScreenCaptureListener screenCaptureListener, @Nullable View... ignoredViews) {
        screenCaptureListener.onCaptureStarted();
        captureRx(activity, ignoredViews).subscribe(**new Subscriber()** {
            public void onCompleted() {
            }
    
            public void onError(Throwable e) {
                Logger.e("Screenshot capture failed");
                Logger.printStackTrace(e);
                screenCaptureListener.onCaptureFailed(e);
            }
    
            public void onNext(Bitmap bitmap) {
                screenCaptureListener.onCaptureComplete(bitmap);
            }
        });
    }
    

    … }

    From physical clone from GitHub: public class Instacapture {

    private static final String MESSAGE_IS_ACTIVITY_RUNNING = "Is your activity running?";
    private static final String ERROR_SCREENSHOT_CAPTURE_FAILED = "Screenshot capture failed";
    
    public static void capture(@NonNull Activity activity,
                               @NonNull final ScreenCaptureListener screenCaptureListener,
                               @Nullable View... ignoredViews) {
    
        screenCaptureListener.onCaptureStarted();
    
        captureRx(activity, ignoredViews).subscribe(**new Subscriber<Bitmap>()** {
            @Override
            public void onCompleted() {
            }
    
            @Override
            public void onError(final Throwable e) {
                Logger.e(ERROR_SCREENSHOT_CAPTURE_FAILED);
                Logger.printStackTrace(e);
                screenCaptureListener.onCaptureFailed(e);
            }
    
            @Override
            public void onNext(final Bitmap bitmap) {
                screenCaptureListener.onCaptureComplete(bitmap);
            }
        });
    
    }
    

    … }

    Is it intended or missing of Bitmap type?

    Thanks so much, KT

    opened by ktran2017 8
  • NoClassDefFoundError

    NoClassDefFoundError

    my code : Instacapture.capture(this, object : SimpleScreenCapturingListener() { override fun onCaptureComplete(bitmap: Bitmap) { shere(bitmap) } }) }

    error:

    06-20 11:52:01.472 32477-32477/com.jisu.sports E/AndroidRuntime: FATAL EXCEPTION: main Process: com.jisu.sports, PID: 32477 java.lang.NoClassDefFoundError: Failed resolution of: Lrx/functions/Func0; at com.tarek360.instacapture.screenshot.ScreenshotProvider.getScreenshotBitmap(ScreenshotProvider.kt:15) at com.tarek360.instacapture.Instacapture.captureRx(Instacapture.kt:58) at com.tarek360.instacapture.Instacapture.capture(Instacapture.kt:31) at com.jisu.sports.ui.matche.view.MatchDetailsActivity$initClick$1.onClick(MatchDetailsActivity.kt:121) at android.view.View.performClick(View.java:6266) at android.view.View$PerformClick.run(View.java:24730) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:171) at android.app.ActivityThread.main(ActivityThread.java:6684) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:246) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) Caused by: java.lang.ClassNotFoundException: Didn't find class "rx.functions.Func0" on path: DexPathList[[zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/base.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_dependencies_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_resources_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_0_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_1_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_2_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_3_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_4_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_5_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_6_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_7_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_8_apk.apk", zip file "/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/lib/arm, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/base.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_dependencies_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_resources_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_0_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_1_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_2_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_3_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_4_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_5_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_6_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_7_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_8_apk.apk!/lib/armeabi, /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_slice_9_apk.apk!/lib/armeabi, /system/lib, /system/vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.tarek360.instacapture.screenshot.ScreenshotProvider.getScreenshotBitmap(ScreenshotProvider.kt:15)  at com.tarek360.instacapture.Instacapture.captureRx(Instacapture.kt:58)  at com.tarek360.instacapture.Instacapture.capture(Instacapture.kt:31)  at com.jisu.sports.ui.matche.view.MatchDetailsActivity$initClick$1.onClick(MatchDetailsActivity.kt:121)  at android.view.View.performClick(View.java:6266)  at android.view.View$PerformClick.run(View.java:24730)  at android.os.Handler.handleCallback(Handler.java:789)  at android.os.Handler.dispatchMessage(Handler.java:98)  at android.os.Looper.loop(Looper.java:171)  at android.app.ActivityThread.main(ActivityThread.java:6684)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:246)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)  Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.jisu.sports-3BldHbGLK4OEceox2rHrkA==/split_lib_resources_apk.apk at dalvik.system.DexFile.openDexFileNative(Native Method) can you help me

    opened by wangyangke 6
  • ReactNative / Android Studio

    ReactNative / Android Studio

    Trying to use this in a react-native project. I am trying to add the package using the jitpack instructions provided but keep getting a

    error: package com.tarek360.instacapture does not exist

    opened by jayesbe 5
  • java.lang.NoClassDefFoundError: rx.plugins.RxJavaHooks

    java.lang.NoClassDefFoundError: rx.plugins.RxJavaHooks

    java.lang.NoClassDefFoundError: rx.plugins.RxJavaHooks at rx.Observable.create(Observable.java:98) at rx.Observable.defer(Observable.java:1773) at com.tarek360.instacapture.screenshot.ViewsBitmapObservable.get(ViewsBitmapObservable.kt:20) at com.tarek360.instacapture.screenshot.ScreenshotProvider.getScreenshotBitmap(ScreenshotProvider.kt:16) at com.tarek360.instacapture.Instacapture.captureRx(Instacapture.kt:58) at com.tarek360.instacapture.Instacapture.capture(Instacapture.kt:31)

    opened by juyingguo 4
  • Setting android:allowBackup=

    Setting android:allowBackup="false" on AndroidManifest.xml shows below error.

    Error:Execution failed for task ':app:processDebugManifest'.

    Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:25:9-36 is also present at [com.github.tarek360:instacapture:2.0.0-kotlin-beta1] AndroidManifest.xml:12:9-35 value=(true). Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:23:5-229:19 to override.

    opened by jojonarte 3
  • Screen not capture in Android 10 due to java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps

    Screen not capture in Android 10 due to java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps

    I run the screen capture and it always, and I noticed onError trigger:

      `captureRx(activity, *ignoredViews).subscribe(object : Subscriber<Bitmap>() {
            override fun onCompleted() {}
    
            override fun onError(e: Throwable) {
                Logger.e(ERROR_SCREENSHOT_CAPTURE_FAILED)
                Logger.printStackTrace(e)
                screenCaptureListener.onCaptureFailed(e)
            }
    
            override fun onNext(bitmap: Bitmap) {
                screenCaptureListener.onCaptureComplete(bitmap)
            }
        })`
    

    Error message: java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps

    I run on Android 10.

    opened by vsay01 2
  • Query - Can InstaCapture capture Android Camera Feed

    Query - Can InstaCapture capture Android Camera Feed

    I have an App that uses both a GLSurfaceView overlaid over a SurfaceView that contains the feed from the Android devices camera

    If I use the Android built in Screen Capture - I get a screenshot with the UI (from my GLSurfaceView) and the Camera Feed (see attached file)

    I I use InstaCapture I get a screenshot with the UI (from my GLSurfaceView) BUT NO camera feed (only a black background - see attached file)

    I also attached an image of the Activity layout showing it has two child views (GLSurfaceView20 and CameraSurface)

    screenshot-21-12-2016_16-45-47 456 capture screenshot_2016-12-21-16-57-50

    opened by felixvolz 2
  • Can't capture google map fragment

    Can't capture google map fragment

    When I capture google map fragment result is black screen with logo google

    My lib version implementation 'com.github.tarek360:instacapture:2.0.1' implementation 'com.google.android.gms:play-services-maps:17.0.0' implementation 'com.google.android.gms:play-services-location:17.0.0' implementation 'com.google.android.gms:play-services-places:17.0.0'

    My layout

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <fragment
            android:id="@+id/map"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            android:name="com.google.android.gms.maps.SupportMapFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            tools:context=".activity.main.MainActivity" />
    </androidx.coordinatorlayout.widget.CoordinatorLayout>
    

    176963082_896292587602716_3825247688529560120_n

    opened by tka-dev 1
  • Removed RTL and allowBackup on the manifest

    Removed RTL and allowBackup on the manifest

    A library should not specify this.

    When trying this library, I got an error message:

    app/src/main/AndroidManifest.xml:46:7-34 Error:
    	Attribute application@allowBackup value=(false) from AndroidManifest.xml:46:7-34
    	is also present at [com.github.tarek360:instacapture:2.0.1] AndroidManifest.xml:12:9-35 value=(true).
    	Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:44:5-157:19 to override.
    app/src/main/AndroidManifest.xml:50:7-34 Error:
    	Attribute application@supportsRtl value=(false) from AndroidManifest.xml:50:7-34
    	is also present at [com.github.tarek360:instacapture:2.0.1] AndroidManifest.xml:14:9-35 value=(true).
    	Suggestion: add 'tools:replace="android:supportsRtl"' to <application> element at AndroidManifest.xml:44:5-157:19 to override.
    
    opened by PaulWoitaschek 1
  • react-native webview canvas Black screen

    react-native webview canvas Black screen

    i use in react-native,code image When I trigger the screenshot i get this image Normally, it should be image canvas tag not right render, i tried Falcon react-native-shot but Didn't solve my problem。

    opened by BaLaLaLs 0
  • Failed resolution of: Lcom/tarek360/instacapture/Instacapture;

    Failed resolution of: Lcom/tarek360/instacapture/Instacapture;

    I have a library and would like that library to use Instacapture. My library is included in the Google HelloAR sample application. I have installed Instacapture as per the instruction in the README. However, when I launch my app, I get the following crash:

        --------- beginning of crash
    2020-08-11 22:34:35.965 32761-32761/com.google.ar.core.examples.java.helloar E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.google.ar.core.examples.java.helloar, PID: 32761
        java.lang.NoClassDefFoundError: Failed resolution of: Lcom/tarek360/instacapture/Instacapture;
            at com.cambridge.mylibrary.ScreenShotter.takeScreenshot(ScreenShotter.java:139)
            at com.google.ar.core.examples.java.helloar.HelloArActivity$2.run(HelloArActivity.java:164)
            at com.google.ar.core.examples.java.helloar.HelloArActivity.startRepeatingTask(HelloArActivity.java:171)
            at com.google.ar.core.examples.java.helloar.HelloArActivity$1.run(HelloArActivity.java:152)
            at android.os.Handler.handleCallback(Handler.java:883)
            at android.os.Handler.dispatchMessage(Handler.java:100)
            at android.os.Looper.loop(Looper.java:237)
            at android.app.ActivityThread.main(ActivityThread.java:8107)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
         Caused by: java.lang.ClassNotFoundException: Didn't find class "com.tarek360.instacapture.Instacapture" on path: DexPathList[[zip file "/data/app/com.google.ar.core.examples.java.helloar-bhCcJ--GEjsJ6mxAFvnUYw==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.ar.core.examples.java.helloar-bhCcJ--GEjsJ6mxAFvnUYw==/lib/arm64, /data/app/com.google.ar.core.examples.java.helloar-bhCcJ--GEjsJ6mxAFvnUYw==/base.apk!/lib/arm64-v8a, /system/lib64]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
            at com.cambridge.mylibrary.ScreenShotter.takeScreenshot(ScreenShotter.java:139) 
            at com.google.ar.core.examples.java.helloar.HelloArActivity$2.run(HelloArActivity.java:164) 
            at com.google.ar.core.examples.java.helloar.HelloArActivity.startRepeatingTask(HelloArActivity.java:171) 
            at com.google.ar.core.examples.java.helloar.HelloArActivity$1.run(HelloArActivity.java:152) 
            at android.os.Handler.handleCallback(Handler.java:883) 
            at android.os.Handler.dispatchMessage(Handler.java:100) 
            at android.os.Looper.loop(Looper.java:237) 
            at android.app.ActivityThread.main(ActivityThread.java:8107) 
            at java.lang.reflect.Method.invoke(Native Method) 
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100) 
    

    Any idea what is causing the issue? I've tried opening Instacapture, compiling it to .aar and throwing it in my libs dir and then modifying the gradle files, but I have the same issue.

    opened by Rich2020 0
  • expected member declaration

    expected member declaration

    Hello, I'm trying to use the library to take a screenshot but there is issue with the code here

        Instacapture.capture(this, object : SimpleScreenCapturingListener() {
            override fun onCaptureComplete(bitmap: Bitmap) {
                //Your code here..
    
            }
        })
    
    // or in Rx way
        Instacapture.captureRx(this).subscribe { bitmap ->
            //Your code here..
        }
    

    it says "expected member declaration " in these two lines ( Instacapture.captureRx(this).subscribe ) and ( Instacapture.capture(this, object : SimpleScreenCapturingListener() { )

    and for (bitmap )it says unresolved reference

    opened by hemo7f12 0
Releases(2.0.1)
Owner
Ahmed Tarek
I enjoy pushing the limits of the Android development. I write to learn, I learn to share and I share to learn more. Twitter: a_tarek360
Ahmed Tarek
Super Heroes Kata implemented using Jetpack Compose and Screenshot Testing.

KataSuperHeroes with Jetpack Compose We are here to learn about Jetpack Compose. We are going to use Jetpack Compose Testing Tools to interact with th

Karumi 18 Dec 15, 2022
Notes is a simple and private notes app. Organize your thoughts, discoveries, and ideas and simplify planning important moments in your life with your digital notepad.

Notes Example Download Download the latest version of the Android app from this link. Building Using Android Studio Clone the repo, open it in Android

Dmitry Savin 1 Jan 3, 2022
Holi is a lightweight Jetpack Compose library of colors, gradients and cool utility functions for all your palette needs!

Holi A library of colors, gradients and utils built using Jetpack Compose for Android Features A wide collection of colors from different palettes for

Siddhesh Patil 167 Dec 5, 2022
Holi is a lightweight Jetpack Compose library of colors, gradients and cool utility functions for all your palette needs!

Holi is a lightweight Jetpack Compose library of colors, gradients and cool utility functions for all your palette needs!

Sid Patil 167 Dec 5, 2022
From Swedish "Öppettider", an app to quickly access your favorite places' opening times. Built to practice Android development and try out Jetpack Compose.

Appettider From Swedish "Öppettider", an app to quickly access your favorite places' opening times. Built to practice Android development and try out

Arianna Masciolini 0 Dec 6, 2021
Migrating To Jetpack Compose For Your app

Migrating To Jetpack Compose Adding Jetpack Compose to your app If you want to use Jetpack Compose in an existing project, you’ll need to configure yo

Lubna Mariyam 1 Oct 18, 2021
Simple app to locally track your public transport trips.

ÖffiTracker Simple app to locally track your public transport trips. License Copyright 2021 Patrick Löwenstein Licensed under the Apache License, Ver

Patrick Löwenstein 5 Dec 14, 2022
A template for your new Jetpack Compose app

A template for your new Jetpack Compose app

Sebastien Guillemin 3 May 24, 2022
Simple example how you can use dynamic color image vector in your app.

Dynamic Color ImageVector Simple example how you can use dynamic color image vector in your app. How to use 1. Create a xml image vector The content o

Lucas Martins 1 Oct 28, 2022
Add Cloud Firestore to your Android apps built with Jetpack Compose

JetFirestore Add Cloud Firestore to your Android apps built with Jetpack Compose Now with Jetpack Compose you can easily add Cloud Firestore to your e

Pankaj Rai 13 Oct 26, 2022
Text-ray goggles for your Android UI.

Radiography Text-ray goggles for your Android UI. DecorView { 1080×2160px } ├─LinearLayout { id:main, 1080×1962px } │ ├─EditText { id:username, 580×12

Square 731 Dec 27, 2022
📊 A web tool to visualise and compare your android benchmark results

benchart A web tool to visualise and compare your android benchmark result ✨ Demo Screen.Recording.2022-11-26.at.2.36.55.PM.mov ✍️ Author ?? theapache

theapache64 65 Dec 20, 2022
How to use Jetpack Compose’s theming APIs to style your application

Jetpack Compose Theming Codelab This folder contains the source code for the Jetpack Compose Theming codelab. In this codelab you will learn how to us

David Merino 0 Oct 7, 2021
Add chips to your apps built with Jetpack Compose!

Chip Add chips to your apps built with Jetpack Compose! To get started with Chip just add the maven url and the Chip dependency build.gradle (Project

Pankaj Rai 6 Sep 27, 2022
Make your device sip only small amounts of battery when not in use.

trickle Make your device sip only small amounts of battery when not in use. What Automatically place your device into battery-saver mode when the scre

pyamsoft 3 Dec 21, 2022
FullMangement - an application that helps you manage your tasks effectively. built with the latest tachs like Compose UI, Jetpack libraries, and MVVM design pattern.

Full Management is an application that helps you manage your tasks effectively. built with the latest tachs like Compose UI, Jetpack libraries and MVVM design pattern.

Amr algnyat 4 Nov 1, 2022
Danilo Lemes 5 Jul 31, 2022
Briar-desktop - A desktop program for Briar, bringing secure messaging to your desktop and mobile devices

Briar Desktop A desktop program for Briar, bringing secure messaging to your des

Briar Project 16 Dec 17, 2022
Simple parallax effect for your image. Only usable with Jetpack Compose.

Parallax Effect in Compose Image Example usage // In an activity or fragment... private lateinit var gravitySensorDefaulted: GravitySensorDefaulted o

Yunus Emre OCAK 2 Jul 5, 2022