Android Question Activity is Started again When Barcode Device is in Sleep Mode

junaidahmed

Well-Known Member
Licensed User
Longtime User
I have purchased "Bluetooth Barcode Scanner Device".I have connected this device in my Android Phone. When the scanner is in sleep mode,then why Activity is started again ???
 

walterf25

Expert
Licensed User
Longtime User
I have purchased "Bluetooth Barcode Scanner Device".I have connected this device in my Android Phone. When the scanner is in sleep mode,then why Activity is started again ???
You will need to provide more information than that, maybe post the relevant code so we can help you, did you create a custom library to communicate with this device etc..

Regards,
Walter
 
Upvote 0

junaidahmed

Well-Known Member
Licensed User
Longtime User
Please check my manifest file
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:label, "$LABEL$")

'End of default text.

'SetApplicationAttribute(android:theme, "@style/MyAppTheme")
SetApplicationAttribute(android:theme, "@style/Theme.AppCompat")
AddApplicationText(<meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <meta-data
            android:name="com.google.android.gms.vision.DEPENDENCIES"
            android:value="barcode" />)
AddApplicationText(<activity
            android:theme="@style/AppTheme.NoActionBar"
            android:name="com.edwardvanraak.materialbarcodescanner.MaterialBarcodeScannerActivity"
            android:label="@string/library_name" >
        </activity>)
AddPermission(android.permission.CAMERA) ' Required to be able to access the camera device.
 
Upvote 0
Top