Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xxl6097/zbarscanlibrary
Zar scan open source
https://github.com/xxl6097/zbarscanlibrary
Last synced: about 1 month ago
JSON representation
Zar scan open source
- Host: GitHub
- URL: https://github.com/xxl6097/zbarscanlibrary
- Owner: xxl6097
- Created: 2016-01-16T09:41:07.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-27T07:15:26.000Z (almost 9 years ago)
- Last Synced: 2024-11-03T09:27:37.278Z (3 months ago)
- Language: C
- Size: 15.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ZbarScanLibrary
Zar scan open sourceZbarScanLibrary是之前的ZBar解析二维码项目的重构和优化
>* 使用了最新版本的libiconv库进行编译,版本号:1.14;下载地址: http://www.gnu.org/software/libiconv/
>* 重新修改ZBar对中文的支持,并且可以解析GBK,UTF-8格式生成的二维码图片
>* 使用最新的ndk-r10d进行ndk-build,支持64位cpu##使用步骤
**1.在activity布局中加入如下:**```
```
**2.activity中生命周期设置:**```
public class GotoScanActivity extends Activity implements ZBarQrScanCallBack {private ZBarQrScanManager ZBarZBarQrScanManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_goto_scan);
ZBarZBarQrScanManager = new ZBarQrScanManager();
ZBarZBarQrScanManager.onCreate(this);
ZBarZBarQrScanManager.setCallBack(this);
}@Override
protected void onResume() {
super.onResume();
ZBarZBarQrScanManager.onResume();
}@Override
public void onPause() {
super.onPause();
ZBarZBarQrScanManager.onPause();
}@Override
protected void onDestroy() {
super.onDestroy();
ZBarZBarQrScanManager.onDestroy();
}@Override
public void onResult(String resuilt) {
Toast.makeText(this, resuilt, Toast.LENGTH_SHORT).show();
Intent resultIntent = new Intent();
Bundle bundle = new Bundle();
bundle.putString("result", resuilt);
resultIntent.putExtras(bundle);
this.setResult(RESULT_OK, resultIntent);
finish();
}@Override
public void onException(Object object, Exception e) {}
```##License
```java
/*
* Copyright (C) 2016 uuxia <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
```