Skip to content
This repository was archived by the owner on Dec 7, 2019. It is now read-only.
This repository was archived by the owner on Dec 7, 2019. It is now read-only.

Clearable #367

Open
Open

Description

@victor-radulescu

I don't understand how to implement a Clearable
I have this class ClearAbleRecordPersister extends RecordPersister implements Clearable {
...
@OverRide
public void clear(@nonnull BarCode key) {
//TODO what show i do here?
}
My Store persister instance:
val cacheDir: File = MyApplication.getContext().cacheDir
return ClearAbleRecordPersister.create(cacheDir,30,TimeUnit.MINUTES)
}

Could not erase the data in any way. Can someone help me with it

Activity

  1. victor-radulescu commented on Oct 17, 2018

    @victor-radulescu
    Author

    tryed the folowing in onClear method

    fileEraser.delete(key)
                    .observeOn(AndroidSchedulers.mainThread())
                    .subscribeOn(Schedulers.io())
                    .subscribe(new Observer<Boolean>() {
                @Override
                public void onSubscribe(Disposable d) {
                    Log.d("clearing", "subscribe");
                }
               @Override
                public void onNext(Boolean aBoolean) {
                    Log.d("clearing", "next " + aBoolean);
                }
                @Override
                public void onError(Throwable e) {
                    Log.d("clearing", "error " + e.getMessage());
                }
              @Override
                public void onComplete() {
                    Log.d("clearing", "complete");
    
                }
            });
    

    I got this error: : error unable to delete /data/user/0/packagename/cache/subscribtion/42961

  2. digitalbuddha commented on Dec 31, 2018

    @digitalbuddha
    Contributor

    I think you need to handle the case where you are clearing something for a key/path that is not created yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions