1. Right click on simple_COBOL_HTML in the Explorer tree
2. Choose Export
3. Note - Do not use the same package for more applications. The package is a sort of unique ID in the Android system.The "Enable WebView Remote Debugging" option enables the ability to attach the app with a Chrome browser in order to debug the HTML/JS frontend as described here.
7.
10. If you have a valid keystore to provide or you wish to exclude some project files from the app, click Next, otherwise click Finish.Note - If no keystore is provided, the IDE will include a default one. The default keystore is suitable for testing purposes. Before publishing your app in the Marketplace, you should apply a valid keystore to it.
Note - the above command must be adjusted according to the location and name of your apk.
3. In the directory you created at step 1, edit the file AndoirdManifest.xml and replace the current content with the following:
4. Switch to the res\layout sub folder, rename the file main.xml to activity_main.xml and replace the current content with the Content of main_activity.xml
5. Switch to the src\com\example\simple_android sub folder and edit the file MainActivity.java replacing the current content with the Content of MainActivity.java.
6. Add ismobile.jar (taken from C:\Program Files\Veryant\isCOBOL2017R1\mobile\lib) and cobol.jar (previously produced) to the libs sub folder.
7. Create a folder named “raw” under the res\layout sub folder and put html.zip (previously created) into that folder.
8. (optional) Edit the file strings.xml under the res\values subfolder and provide a custom name for your app. The current name is “MainActivity”, you might call it “simple_ANDROID” to make it match with the project name or you can use whatever name you prefer.
Note - for better performance and a more accurate result, you can copy the apk on a real physical Android device and test it there.
package com.example.simple_android;import java.io.PrintWriter;import java.io.StringWriter;import javax.crypto.Cipher;import javax.crypto.spec.SecretKeySpec;import android.os.Bundle;import android.webkit.WebView;import com.iscobol.iscobol4android.IsCobolMainActivity;public class MainActivity extends IsCobolMainActivity {
| Copyright (c) 2017 Veryant |
| Contact us |
|
Please share your comments on this manual or on any Veryant product documentation with the email button at the top left |