Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.0 #318

Merged
merged 95 commits into from
May 5, 2019
Merged

Release v1.0.0 #318

merged 95 commits into from
May 5, 2019

Conversation

dwillmc
Copy link
Member

@dwillmc dwillmc commented Feb 7, 2018

This is the v1.0.0 Release of CameraKit. This release embodies over 9 months of work, with massive refactors to all parts of the codebase. This PR and changelog are not complete, yet.

Test the PR

Ready to test:

  • Camera Preview
  • Runtime permissions
  • Photos

Still Coming

  • setMethod() function on cameraView

Dependency

// Add our snapshot repository.
repositories {
    maven { url 'https://dl.bintray.com/camerakit/camerakit-android-snapshots' }
}

// Make sure snapshots won't get cached.
configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

dependencies {
    implementation group: 'com.camerakit', name:'camerakit', version:'1.0.0-Snapshot', changing: true
}

Add a CameraKitView

Make sure everything looks proper with any phone rotation, while screen orientation is on auto-rotate or locked.
Open and close the app drawer and dismiss the app to make sure the camera stops and starts properly.

Basic fullscreen CameraKitView:

<com.camerakit.CameraKitView xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/camera"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:camera_facing="back" />

CameraKitView that adjusts dimenions to perfectly match previews true aspect ratio - nothing cut-off:

<com.camerakit.CameraKitView xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/camera"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    app:camera_facing="back" />

Square CameraKitView using app:camera_aspectRatio:

<com.camerakit.CameraKitView xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/camera"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    app:camera_aspectRatio="1:1"
    app:camera_facing="back" />

MainActivity

Bind the CameraKitView into your activity and implement pass-through methods for onResume(), onPause(), and if you want the CameraKitView to automatically handle runtime permissions, onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults).

public class MainActivity extends AppCompatActivity {
    
    private CameraKitView cameraKitView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        cameraKitView = findViewById(R.id.camera);
    }

    @Override
    protected void onResume() {
        super.onResume();
        cameraKitView.onResume();
    }

    @Override
    protected void onPause() {
        cameraKitView.onPause();
        super.onPause();
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        cameraKitView.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
    
}

@austinkettner
Copy link
Member

@developer-- @sagartrehan @p-canniff @athomaj @carrotow @ritesh94 @shoomkloom @lukaspili @mjf009 @rt-bloombees @snkashis @jondoes @rencsaridogan @virengujariya @ritesh94 @Pomis

Would love your testing and feedback since you have issues in the 1.0.0 Milestone that should be resolved by this!

@austinkettner
Copy link
Member

Usage instructions have been added to PR notes.

@Danm72
Copy link

Danm72 commented Feb 9, 2018

I've noticed that the orientation of the saved images doesn't match the orientation of the preview.

ezgif com-video-to-gif

@austinkettner
Copy link
Member

Hi All,

We are merging this and moving to a new v1.0.0-beta4 branch + develop branch to better follow Git Flow going forward. We are doubling down on wrapping up v1.0.0 soon and this is the first step, to move past this long drawn out PR and move to more incremental PRs.

We will also be moving to Apache vs MIT (in our new branches) to enable Pull Requests from other users. Mentioning here as we are open to feedback before making this change and if anyone has an issue with this please comment or email us at hello [at] camerakit.io -- we are super open to any feedback here but have heard many would prefer Apache.

@austinkettner austinkettner merged commit 8d85669 into master May 5, 2019
@austinkettner austinkettner deleted the v1.0.0 branch May 5, 2019 14:53
@Zaniyar
Copy link

Zaniyar commented May 25, 2019

Hi @austinkettner, onFrameData callback is not implemented yet? Is it on the agenda? thx

@Bajranghudda1
Copy link

As of now best result can be manually stopping camera on config change and then restart the camera is the best solution. for eg. -

override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
mBinding.cameraView.stop()
mBinding.cameraView.stopVideo()
mBinding.cameraView.start()
}

@dimanych
Copy link

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

Successfully merging this pull request may close these issues.

None yet