Giter VIP home page Giter VIP logo

Comments (4)

ma1co avatar ma1co commented on July 29, 2024

Something like this should work (untested):

ContentResolver resolver = context.getContentResolver();
Uri uri = mediaManager.getImageContentUri();
long id = mediaManager.getImageId(cursor);
AvindexStore.Images.Media.deleteImage(resolver, uri, id);

from openmemories-framework.

dany123 avatar dany123 commented on July 29, 2024

If you really want to delete everything fast, there's an option on the camera to just format the memory card. Deleting them all by showing each one first seems like a very long operation.

from openmemories-framework.

Deph0 avatar Deph0 commented on July 29, 2024

@dany123 I can't reformat the sdcard due to another app (STG) storing files on the sdcard itself, which i use for selected images i want to share rather than everything.

@ma1co thanks, will try that out- is there something special i have to do with the cursor? Every attempt i do makes the emulator crash the app, when i use Cursor cursor = context.getContentResolver().query(uri, AvindexStore.Images.Media.ALL_COLUMNS, null, null, AvindexStore.Images.ImageColumns.CONTENT_CREATED_LOCAL_DATE_TIME); ( i found the query in a issue somewhere around this or a related github)

are there docus on this avindex stuff ? what are they and what do they do?

from openmemories-framework.

ma1co avatar ma1co commented on July 29, 2024

@Deph0 The AvindexStore class is a special proprietary Sony API that is only present on the camera. You cannot use this class in the emulator, it will crash. The OpenMemories Framework aims to wrap all proprietary classes into wrappers that include standard Android fallbacks which also work in the emulator.

So you have to test your code directly on the camera. Using the adb feature of OpenMemories: Tweak, this shouldn't be too much of an issue.

Since the class is proprietary, there is no documentation. It is a standard Content Provider, however.

from openmemories-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.