Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
386fc3d0
Commit
386fc3d0
authored
May 21, 2019
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32919 バーコードリーダー
回転時、ダイヤログ非表示 2回目からバーコードリーダー不能
parent
610de350
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
36 deletions
+18
-36
ABVJE_Launcher_Android/AndroidManifest.xml
+2
-1
ABVJE_UI_Android/res/layout/barcode_reader.xml
+0
-13
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/BarCodeReaderActivity.java
+16
-22
No files found.
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
386fc3d0
...
@@ -224,6 +224,6 @@
...
@@ -224,6 +224,6 @@
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.PairingSettingActivity"
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.PairingSettingActivity"
android:theme=
"@style/AppTheme"
/>
android:theme=
"@style/AppTheme"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.BarCodeReaderActivity"
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.BarCodeReaderActivity"
android:theme=
"@style/AppTheme"
/>
android:theme=
"@style/AppTheme"
android:configChanges=
"keyboardHidden|orientation|screenSize"
/>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
ABVJE_UI_Android/res/layout/barcode_reader.xml
View file @
386fc3d0
...
@@ -48,19 +48,6 @@
...
@@ -48,19 +48,6 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
/>
/>
<EditText
android:id=
"@+id/editTextDisplay"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:layout_marginTop=
"5dp"
android:ems=
"10"
android:gravity=
"top"
android:inputType=
"textMultiLine"
>
<requestFocus
/>
</EditText>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/BarCodeReaderActivity.java
View file @
386fc3d0
...
@@ -9,7 +9,6 @@ import android.view.KeyEvent;
...
@@ -9,7 +9,6 @@ import android.view.KeyEvent;
import
android.view.View
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.widget.EditText
;
import
com.honeywell.barcode.HSMDecodeComponent
;
import
com.honeywell.barcode.HSMDecodeComponent
;
import
com.honeywell.barcode.HSMDecodeResult
;
import
com.honeywell.barcode.HSMDecodeResult
;
...
@@ -36,8 +35,6 @@ import jp.agentec.abook.abv.ui.home.plugin.BarCodeReaderCustomPluginResultListen
...
@@ -36,8 +35,6 @@ import jp.agentec.abook.abv.ui.home.plugin.BarCodeReaderCustomPluginResultListen
public
class
BarCodeReaderActivity
extends
ABVUIActivity
implements
DecodeResultListener
,
BarCodeReaderCustomPluginResultListener
{
public
class
BarCodeReaderActivity
extends
ABVUIActivity
implements
DecodeResultListener
,
BarCodeReaderCustomPluginResultListener
{
public
HSMDecoder
hsmDecoder
;
public
HSMDecoder
hsmDecoder
;
private
EditText
editTextDisplay
;
private
HSMDecodeComponent
decCom
;
private
int
scanCount
=
0
;
private
int
scanCount
=
0
;
public
static
final
String
BARCODE_READING_DATA
=
"barcode_data"
;
public
static
final
String
BARCODE_READING_DATA
=
"barcode_data"
;
private
static
final
String
TAG
=
"BarCodeReaderActivity"
;
private
static
final
String
TAG
=
"BarCodeReaderActivity"
;
...
@@ -52,6 +49,7 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
...
@@ -52,6 +49,7 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
//activate the API with your license key
//activate the API with your license key
ActivationResult
activationResult
=
ActivationManager
.
activate
(
this
,
"trial-image-areyn-12062017"
);
ActivationResult
activationResult
=
ActivationManager
.
activate
(
this
,
"trial-image-areyn-12062017"
);
Logger
.
d
(
TAG
,
"activationResult = "
+
activationResult
);
//get the singleton instance of the decoder
//get the singleton instance of the decoder
hsmDecoder
=
HSMDecoder
.
getInstance
(
this
);
hsmDecoder
=
HSMDecoder
.
getInstance
(
this
);
...
@@ -71,6 +69,15 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
...
@@ -71,6 +69,15 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
@Override
public
void
onDestroy
()
{
super
.
onDestroy
();
//dispose of the decoder instance, this stops the underlying camera service and releases all associated resources
HSMDecoder
.
disposeInstance
();
}
public
static
void
onDisposeInstance
()
{
public
static
void
onDisposeInstance
()
{
HSMDecoder
.
disposeInstance
();
HSMDecoder
.
disposeInstance
();
...
@@ -100,21 +107,12 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
...
@@ -100,21 +107,12 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
}
}
private
void
displayBarcodeData
(
HSMDecodeResult
[]
barcodeData
)
{
private
void
displayBarcodeData
(
HSMDecodeResult
[]
barcodeData
)
{
// Toast.makeText(this, "barcodeData.length : [%d]" + barcodeData.length, Toast.LENGTH_LONG).show();
if
(
barcodeData
.
length
>
0
)
{
if
(
barcodeData
.
length
>
0
)
{
HSMDecodeResult
firstResult
=
barcodeData
[
0
];
HSMDecodeResult
firstResult
=
barcodeData
[
0
];
Logger
.
d
(
"firstResult.getBarcodeData() = "
+
firstResult
.
getBarcodeData
());
String
msg
=
"Scan Count: "
+
++
scanCount
+
"\n\n"
+
if
(
scanCount
==
0
)
{
"onHSMDecodeResult\n"
+
scanCount
=
1
;
"Data: "
+
firstResult
.
getBarcodeData
()
+
"\n"
+
"Symbology: "
+
firstResult
.
getSymbology
()
+
"\n"
+
"Length: "
+
firstResult
.
getBarcodeDataLength
()
+
"\n"
+
"Decode Time: "
+
firstResult
.
getDecodeTime
()
+
"ms"
;
if
(
scanCount
==
1
)
{
hsmDecoder
.
enableSound
(
false
);
hsmDecoder
.
enableSound
(
false
);
editTextDisplay
.
setText
(
msg
);
// Toast.makeText(this, "Activation Result: " + msg, Toast.LENGTH_LONG).show();
final
String
readingBarcodeData
=
firstResult
.
getBarcodeData
();
final
String
readingBarcodeData
=
firstResult
.
getBarcodeData
();
ABookAlertDialog
saveDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
getString
(
R
.
string
.
barcode
));
ABookAlertDialog
saveDialog
=
AlertDialogUtil
.
createAlertDialog
(
this
,
getString
(
R
.
string
.
barcode
));
...
@@ -127,6 +125,9 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
...
@@ -127,6 +125,9 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
BARCODE_READING_DATA
,
readingBarcodeData
);
intent
.
putExtra
(
BARCODE_READING_DATA
,
readingBarcodeData
);
setResult
(
Activity
.
RESULT_OK
,
intent
);
setResult
(
Activity
.
RESULT_OK
,
intent
);
scanCount
=
0
;
hsmDecoder
.
enableSound
(
true
);
finish
();
finish
();
}
}
});
});
...
@@ -149,14 +150,7 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
...
@@ -149,14 +150,7 @@ public class BarCodeReaderActivity extends ABVUIActivity implements DecodeResult
this
.
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
this
.
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
this
.
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
this
.
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
this
.
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
);
this
.
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
);
setContentView
(
R
.
layout
.
barcode_reader
);
setContentView
(
R
.
layout
.
barcode_reader
);
decCom
=
(
HSMDecodeComponent
)
findViewById
(
R
.
id
.
hsm_decodeComponent
);
editTextDisplay
=
(
EditText
)
findViewById
(
R
.
id
.
editTextDisplay
);
editTextDisplay
.
setEnabled
(
false
);
editTextDisplay
.
setTextColor
(
Color
.
WHITE
);
}
}
//set all decoder related settings
//set all decoder related settings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment