I used to work with ZXing (QR scanner) in Eclipse and I know how it works there. Now, I'm trying to the same thing in Android Studio. I have added dependencies:
dependencies {
compile 'com.android.support:support-v4:22.0.0'
compile 'com.google.zxing:core:3.2.0'
compile 'com.google.zxing:android-integration:3.2.0'
}
I am having an issue with CaptureActivity in my manifest, since it's not recognized ("Cannot resolve symbol..").
This is in my AndroidManifest file:
<activity
android:name="com.google.zxing.client.android.CaptureActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
I am starting QR code scanner with:
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
And accepting result with onActivityResult method.
I know that there is no CaptureActivity in core library, but where can I find it? Is there anything else I should add (like dependecies or anything similar) to my project?
I am not that familiar with Android Studio, I recently started using it.