The attached project (VariousUtilities.zip) has a large number of Bitmap and String Utilities. There is also a utility that lists the sensors of your device in the Log. Three B4A classes are defined:
1. StringUtilities
2. BitmapUtilities
3. SensorUtilities
All the methods in the classes are based on inline java code with B4A code inside the classes serving as the interface to the java code.
Results of all methods in classes StringUtilities and SensorUtilities are reported in the Log of the project. For BitmapUtilities - click on the left imageview to cycle through the various Bitmap methods. You can pass different parameters to most of the methods in class BitmapUtilities to change the appearance of an image that is generated with a specific method.
You can add to the project (complimenting/adding to the existing classes or adding new classes with their own methods supporting the new class - eg DateUtilities, TimeUtilities, etc) and compile it to a library. The project as it is at present was compiled to a library (VariousUtils.zip) and the library files (jar and xml) are included in the /files folder of the project.
Please note that when you open the B4A project and go to the Bitmap class you might find an error on line 1893. For some reason the "return" statement keeps on reverting to "Return" when the project is opened. Can't figure out why it does so. Just change the "Return" to "return" and the project will compile.
All of the Java code were found somewhere on the Web - mostly from StackOverflow
1. StringUtilities
2. BitmapUtilities
3. SensorUtilities
All the methods in the classes are based on inline java code with B4A code inside the classes serving as the interface to the java code.
Results of all methods in classes StringUtilities and SensorUtilities are reported in the Log of the project. For BitmapUtilities - click on the left imageview to cycle through the various Bitmap methods. You can pass different parameters to most of the methods in class BitmapUtilities to change the appearance of an image that is generated with a specific method.
You can add to the project (complimenting/adding to the existing classes or adding new classes with their own methods supporting the new class - eg DateUtilities, TimeUtilities, etc) and compile it to a library. The project as it is at present was compiled to a library (VariousUtils.zip) and the library files (jar and xml) are included in the /files folder of the project.
Please note that when you open the B4A project and go to the Bitmap class you might find an error on line 1893. For some reason the "return" statement keeps on reverting to "Return" when the project is opened. Can't figure out why it does so. Just change the "Return" to "return" and the project will compile.
All of the Java code were found somewhere on the Web - mostly from StackOverflow