Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2484] ti.barcode : Getting TiRHelper$ResourceNotFoundException when testing with ti.barcode(v 4.0.1 and 4.0.3) android module.

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionInvalid
Resolution Date2018-12-19T19:30:13.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsBarcode
LabelsEscalation
ReporterAminul Islam
AssigneeGary Mathews
Created2018-12-19T18:31:44.000+0000
Updated2018-12-19T19:30:13.000+0000

Description

Hi, Getting TiRHelper$ResourceNotFoundException when testing with ti.barcode(v 4.0.1 and 4.0.3) android module. Tested with the below OS Android 6,7,8 samsung s7,s8 and pixel phones Test Code:
var barcode = require('ti.barcode');
function doClick(e) {

	barcode.allowRotation = false;
	barcode.displayedMessage = "";
	barcode.allowMenu = false;
	barcode.allowInstructions = false;
	barcode.useLED = true;
	addBarcodeEventListeners();
	barcode.capture({
		animate : true,
		overlay : Ti.UI.createView({
			backgroundColor : 'transparent',
			top : 0,
			right : 0,
			bottom : 0,
			left : 0
		}),
		showCancel : false,
		showRectangle : true,
		keepOpen : false
	});

}

function addBarcodeEventListeners() {
	//timeOutLib.clearTimer();
	barcode.addEventListener("error", onBarcodeError);
	barcode.addEventListener("cancel", onBarcodeCancel);
	barcode.addEventListener("success", onBarcodeSuccess);
}

function onBarcodeError(e) {
	Ti.API.info('An Error occured: ' + e);
	//utils.showToast(L("scan_fail_msg"));
	removeBarcodeEventListeners();
}

function onBarcodeCancel(e) {
	Ti.API.info('Cancel received');
	removeBarcodeEventListeners();

}

function onBarcodeSuccess(e) {
	Ti.API.info('Success called with barcode: ' + e.result);
	removeBarcodeEventListeners();
}

$.index.open();
1) Titanium SDK: 7.4.1 , 7.5.0 2) ti.barcode android module : 4.0.1 or 4.0.3 3) Blank screen on the UI with the below log. Error Log:
[WARN] :   W/System.err: org.appcelerator.titanium.util.TiRHelper$ResourceNotFoundException: Resource not found: layout.capture
[WARN] :   W/System.err: 	at org.appcelerator.titanium.util.TiRHelper.lookupResource(TiRHelper.java:100)
[WARN] :   W/System.err: 	at org.appcelerator.titanium.util.TiRHelper.getResource(TiRHelper.java:74)
[WARN] :   W/System.err: 	at org.appcelerator.titanium.util.TiRHelper.getApplicationResource(TiRHelper.java:156)
[WARN] :   W/System.err: 	at ti.barcode.RHelper.getLayout(RHelper.java:25)
[WARN] :   W/System.err: 	at com.google.zxing.client.android.CaptureActivity.onCreate(CaptureActivity.java:173)
[WARN] :   W/System.err: 	at android.app.Activity.performCreate(Activity.java:7183)
[WARN] :   W/System.err: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
[WARN] :   W/System.err: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
[WARN] :   W/System.err: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
[WARN] :   W/System.err: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
[WARN] :   W/System.err: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
[WARN] :   W/System.err: 	at android.os.Handler.dispatchMessage(Handler.java:105)
[WARN] :   W/System.err: 	at android.os.Looper.loop(Looper.java:164)
[WARN] :   W/System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6940)
[WARN] :   W/System.err: 	at java.lang.reflect.Method.invoke(Native Method)
[WARN] :   W/System.err: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
[WARN] :   W/System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
[WARN] :   ResourceType: No package identifier when getting value for resource number 0x00000000
Attached the sample code(tibarcodetesting.zip) for reference

Attachments

FileDateSize
tibarcodetesting.rar2018-12-19T18:29:41.000+00003753632

Comments

No comments

JSON Source