TIMAI2
January 31, 2022, 9:42am
9
Which extension are you using, basesLoaded or noFileHTML ? (or both...) to run your html.
In both cases, they will only have access to fully qualified urls for any resources.
Are you using plain javascript or jquery or another framework?
What do you expect to happen when you press the Start Quiz button in your html ?
On testing, it appears that the basesLoaded extension has a problem with compiling, i will need to investigate that! Meanwhile, here is a simple base64 only extension you can use:
uk.co.metricrat.justbase64.aix (4.0 KB)
1 Like
The code is made by one of my friend, according to him he is using plain js.
A another view will appear displaying rules.
I am attaching a video of how the code works.
Thank I will try it
TIMAI2
January 31, 2022, 1:36pm
11
I am assuming that all these "views" are contained on the same single html page with the script code and css and all the answers are similarly contained ? The webviewer cannot handle local storage....
Yeah everything that need to make it work is in the code.
TIMAI2
January 31, 2022, 2:33pm
13
I guess without seeing the html file it will be difficult to advise further. You can always send it to me in a PM.
Sure, sending u the file
Ahh I can't DM you can u please DM
1 Like
TIMAI2
February 1, 2022, 2:39pm
16
The solution here is to remove any/all html comments
<!-- ... -->
and javascript comments
// comment
from the html, and to use the NoFileHtml extension.
For some reason, the text block does not handle these well causing the webviewer to try to parse them as either html or javascript.
1 Like
Yeah right, Thanks for your support @TIMAI2
I like this extension Tim! Great job!
I required this so thanks
TIMAI2
Split this topic
March 1, 2022, 9:33am
19
TIMAI2
Split this topic
March 1, 2022, 9:34am
20
A post was merged into an existing topic: Google Search with NoFileHtml extension
It works on Android 11!!! Thank You!!!
1 Like
not working can you please check
player.html.txt (9.0 KB)
TIMAI2
September 18, 2024, 7:45am
25
Remove all your comments, e.g. // play
, from your javascript, then try again.
See
✨ [Free] NoFileHtml - view html without files - #16 by TIMAI2
(I have now updated the first post with this information)
2 Likes
TIMAI2
September 28, 2024, 8:31am
28
Sure:
package uk.co.metricrat.nofilehtml;
import android.util.*;
import android.webkit.*;
import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.runtime.*;
import java.io.*;
import java.io.File;
import static org.acra.ACRA.LOG_TAG;
public class NoFileHtml extends AndroidNonvisibleComponent {
public NoFileHtml(ComponentContainer container) {
super(container.$form());
}
private String filePath;
@SimpleFunction(description = "presents html text in a webviewer")
public void NoFileHtml(String html, WebViewer webViewer) {
//give webviewer file access for Kodular users
WebView webView = (WebView)webViewer.getView();
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setAllowFileAccessFromFileURLs(true);
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
webView.getSettings().setAllowContentAccess(true);
//create html file
try {
java.io.File file = File.createTempFile("display", ".html");
filePath = file.getAbsolutePath();
FileWriter filewriter = new FileWriter(file);
filewriter.write(html);
filewriter.close();
file.deleteOnExit();
} catch (IOException e) {
Log.e(LOG_TAG, "IOException", e);
}
//show html
webViewer.GoToUrl("file://" + filePath);
}
}
1 Like
building extension from https://ide.niotron.com/ gives error
JEWEL
September 28, 2024, 2:21pm
30
It's a Rush project. To compile it from the Niotron IDE you need to add required annotations.
@DesignerComponent
@SimpleObject