Giter VIP home page Giter VIP logo

Comments (11)

jbieler avatar jbieler commented on September 3, 2024 1

Sure we need to understand how the stubs work. But rather than documenting it, I would experiment with the stubs and directly create a nicer API with javadocs. For example I found out that ISO equal to 0 means auto ISO. Instead of writing a Doku for that, I suggest writing an ISO class that you can query for that, like iso.isoAutoISO(). Bam, No Further docu needed.

Among my projects you can find "holy grail". The library that enables the exposure adjustments and "holy grail app" that holds the android app code and also the code that I will put into open frameworks. but I'm still heavily experimenting, so all the code might change a lot during the next weeks.

from openmemories-framework.

jbieler avatar jbieler commented on September 3, 2024 1

You don't need to implement the whole API upfront. Little by little will work.

See for example https://github.com/jbieler/HolyGrailApp/blob/master/app/src/main/java/com/github/ma1co/openmemories/framework/CameraImpl.java

I needed a access to the cameras exposure settings. So I started with that.

If you don't encapsulate the knowledge about the sony api in framework classes you still need to figure out what they do.

I'm right now, trying to figure out how to get a hold of the newest image that was shot. The implementation for that is somehow in the PMCADemo, but it's not generic enough for me to use directly. A framework class will enable a lot more people to code without knowledge of the sony api.

What's the thing in the sony api that you want to use first?

For me it would be

from openmemories-framework.

lh8511 avatar lh8511 commented on September 3, 2024 1

here is the code for last photo:

import com.sony.scalar.media.AvindexContentInfo;
import com.sony.scalar.provider.AvindexStore;

public static String getLastImage(Context context) {
    String imageFile = "";
    String imageDate = "";
    Uri baseUri = AvindexStore.Images.Media.getContentUri(AvindexStore.Images.Media.EXTERNAL_DEFAULT_MEDIA_ID);
    final String imageOrderBy = AvindexStore.Images.ImageColumns.CONTENT_CREATED_LOCAL_DATE_TIME + " DESC";
    Cursor imageCursor = context.getContentResolver().query(baseUri, AvindexStore.Images.Media.ALL_COLUMNS, null, null, imageOrderBy);
    if (imageCursor.moveToFirst()) {
        String imgData = imageCursor.getString(imageCursor.getColumnIndex(AvindexStore.Images.Media.DATA));
        AvindexContentInfo infoImage = AvindexStore.Images.Media.getImageInfo(imgData);
        imageFile = infoImage.getAttribute(AvindexContentInfo.TAG_DCF_TBL_FILE_NAME); // <-- last image filename
        imageDate = infoImage.getAttribute(AvindexContentInfo.TAG_DATETIME);
        String filenumber = imageCursor.getString(imageCursor.getColumnIndex(AvindexStore.Images.Media.DCF_FILE_NUMBER)); //<-- photo number
        imageCursor.close();
        //Toast.makeText(context.get.getBaseContext(), "[" + imageFile + "] | [" + imageDate + "]", Toast.LENGTH_SHORT).show();
    }
    return imageFile + ";" +imageDate;
}

from openmemories-framework.

jbieler avatar jbieler commented on September 3, 2024

Hi Jonas,

It's so nice that you want to develop for the framework. As far as I can tell there is not so much development for it going on ATM (raise your hands if I'm wrong!).

I started camera app development just recently. The goal is to build a time lapse app that will change exposure when the lighting changes (but in a different way than sonys app). I saw you are also working on a time lapse implementation? I'd love to share the work on that so we can progress faster.

About the documentation: are you referring to the undocumented and painful usage of the stubs? I would suggest to improve the framework classes that will hide and encapsulate the stubs to make it easier to work with. We could document the API as javadocs and maybe add a small tutorial. Also I'd love to have logging and some base app functionality (base activity) coming from the framework.

I already started on that goal. I have written some framework classes and encaspulated some behavior like logging, camera parameters and wifi support. Right now I'm working on porting the framework project to an android project so that it can feature resources as well.

I'd love to hear from you to coordinate the work.

Best,
Jochen

from openmemories-framework.

jonasjuffinger avatar jonasjuffinger commented on September 3, 2024

I believe that there are some people out there developing, but having no real place to exchange information makes it harder for everyone.

Noob question incoming: Is the A mode of the camera not good enough for that? I thought shooting a time lapse in A mode would automatically adjust my exposure for good results.

I just pushed my latest version of the time lapse app, just check it out.

The stubs are exactly what i mean, but I think before being able to write good encapsulation classes we need to understand what the stubs really do.
For example:
What is the meaning of the arguments of CameraEx.SelectedColor getPreviewDisplayColor(int var1, int var2)?
Or is there a way to turn of the LCD to safe power?

Having a javadocs documentation with tutorials and basic functionality in the framework would be amazing and maybe help a lot of people.

That sounds amazing! Is this code online somewhere?

from openmemories-framework.

jonasjuffinger avatar jonasjuffinger commented on September 3, 2024

Ok, that does sound good, but writing a API for all functionality will be a lot of work. For the most used parts it is handy for sure.

I will have a look at it.

from openmemories-framework.

lh8511 avatar lh8511 commented on September 3, 2024

For last photo taken i uses code from PMCADemo to SORT the "MediaLibrary" files by date descending and use the cursor to select the first... I have the function, later i can post here.

from openmemories-framework.

jbieler avatar jbieler commented on September 3, 2024

Awesome, thanks.

from openmemories-framework.

ludwigbald avatar ludwigbald commented on September 3, 2024

Hello, I recently got an (original) Alpha 7 and am very excited about this hacking going on.
I do know how to program in Java, but not extremely well.
A better documentation, or even a place to start would be extremely helpful!

Greetings,
Ludwig

from openmemories-framework.

alreadysabbir avatar alreadysabbir commented on September 3, 2024

how about a slack/discord channel?

from openmemories-framework.

ludwigbald avatar ludwigbald commented on September 3, 2024

As we are developing for Android, a Google+ Community seems to be the standard. That also makes our central hub easily findable on the web.

I went ahead and created one, find it here:
https://plus.google.com/communities/109773865216761394083

We can start inviting people NOW.
@jonasjuffinger @jbieler @ma1co @lh8511 @alreadysabbir please consider joining our new central place for discussion on OpenMemories :)

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.