I use codename one to do some app development.
The Codename java scanner cant scan PDF417. I need a driver/library that can scan pdf417 that I can use in codenameone. Can you please help me
Just the other day one of our subscribers indicated you can change this line in the cn1lib https://github.com/codenameone/cn1-codescan/blob/master/native/android/com/codename1/ext/codescan/NativeCodeScannerImpl.java#L22
To:
if(!in.initiateScan(types, "PDF_417")){ ... }
You can do that and recompile the library to replace your local cn1lib.
Related
I need to build a mobile app for Android and IOS that can read and write to a SMB2/3 network share.
Is this possible in CodenameOne? If so is there an example of how to do this?
If it is not possible in CodenameOne is there another framework that supports this functionality?
Thanks in advance for reviewing this question!
We don't have any support for the SMB protocol. There is support for sockets but I think that would be a challenge to implement.
If the phone has access to the folder you can use the share operation and the user can pick the place where the file should be shared e.g. SMB, dropbox, etc.
I need to debug my CN1 app on Android. That's why I successfully followed the instructions given in this Codename One tutorial (I copied and updated the gradle files dependencies content as explained).
I am a little bit confused now with the updated sources part.
There is a portion we didn’t get into with the video, copying updated sources directly without sending a build. This is possible if you turn on the new Android Java 8 support. At this point you should be able to remove the libs jar file which contains your compiled data and place your source code directly into the native project for debugging on the device.
If I change things in the native implementation file and if I launch the debug process it seems to work. But do I have to remove the userClasses.jar file from libs directory ? When is this jar file being called actually ?
Furthermore can I also make changes to the CN1 code from Android Studio (eg changes in Main Class) or these need a proper build process on the servers ?
UPDATE November 22nd 2016
In my experience the first time you want to debug your app in Android you need to copy paste your source files AND the userClasses.jar (in libs folder). When you update ONLY the native implementation files you can run a debug without sending a build. But if you change something in the CN1 code it won't be reflected in Android as long as you don't update the userClasses.jar (seems logical since Android does not know anything about CN1).
Any piece of information appreciated,
Cheers,
The build server doesn't have access to your code, just the jar with bytecode/data files and the user jar is "almost" that jar.
We run some bytecode processing such as retrolambda and other things so it isn't exactly what you compiled when you built the project.
If you copy and paste your source directory into the project you will need to remove that jar so you won't see duplicate classes. You will also need to enable Android Studios Java 8 language support to get that to work.
Question: 1
I want to use fingerprint scanner in codename one. Can anybody tell me is it available in codename one or not? If yes, how to use and if no, then how can I code it in codename one ?
Question: 2
How to get the maximum device info in codename one like android version, mobile model, or other stuff ?
Thanks,
No. Fingerprint scanning isn't available at this time.
You can use native interfaces to integrate native device functionality check out this quick video and the advanced section in the developer guide.
Device information is available in Display.getProperty() as well as some other methods in that class. Notice that if you get things such as UDID you will get a permission prompt.
I am trying to read a file located in my phone with the FileSystemStorage class:
is = FileSystemStorage.getInstance().openInputStream(updateFilePath);
But i don't know where to put this updateFilePath in my local machine for development, so for testing this part i have been forced to test it (as a blackbox) with an app built for android. Any idea?
For testing you can add the file in the following folder
%userprofile%\.cn1 in Windows
When making call in codename one application (tested in android), the application is dialing without '#'. How can I correct this? Also I want to make direct call instead of opening Dialer first. Here is a piece of code I have used:
Display.getInstance().dial(*100#);
Any help please.
We invoke the native dialer intent which removes the # key.
Dialing directly is problematic in most platforms including Android, you can access that for Android only using native interfaces:
http://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html