Instructions for creating an Android app

Everything else that doesn't fall into one of the other categories.
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: Instructions for creating an Android app

Post by Paul »

Stefan wrote: Thu Jul 21, 2022 7:21 am No Idea what to do. Is there a workling Instruction? A step by step Instruction?
Have you tested with just a simple line of code?

Code: Select all

MessageRequester("Hello World!")
And then followed the instructions posted here... viewtopic.php?t=1478

If you still get an error then as plouf said, maybe you don't have Java JDK installed properly?
I personally use 64bit version 8.0_201 (jdk-8u201-windows-x64.exe) from https://www.oracle.com/java/technologie ... loads.html

Example Video...
https://youtu.be/NZHrU_i6_28


Also, here is a video on how to sign your APK.
This allows you to install the APK with the debugger off as well as distribute your app through the Google Play Store.
https://youtu.be/wK8IE0rBjrU

See the link the the YouTube description to download the free software I used to create keys and sign them to the APK.
Stefan
Posts: 160
Joined: Mon Feb 05, 2018 9:44 pm

Re: Instructions for creating an Android app

Post by Stefan »

Ahhh :)
MessageRequester("Hello World!")
This simple example works.
What does the text in the picture I posted mean?
Unfortunately my English is not good. Can someone explain this in simple English or even better in German?
plouf
Posts: 194
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: Instructions for creating an Android app

Post by plouf »

Cordova us an extternal tool, used by PB , THIS TOOL TRANFORMS webapp to mobile apps

So this is cordova issue, however if "hello world" works probably a specific plugin fails, like geolocation ??

Post your code that does NOT works...
Christos
hoerbie
Posts: 100
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

Re: Instructions for creating an Android app

Post by hoerbie »

As a special exception in german:

Hallo Stefan,

ich hatte dir bereits den Link auf meinen Bug-Report geschickt, aber anscheinend verstehst du meinen dort genannten Lösungsvorschlag nicht? Es geht darum, dass die von dir als Foto gepostete Fehlermeldung vermutlich von einem im Cordova automatisch upgedateten Plugin "cordova-plugin-device" kommt, das sich nicht mehr mit den restlichen von SpiderBasic verwendeten Cordova-Sachen verträgt.

SpiderBasic generiert selbst ja erst einmal nur eine Javascript-Browser-Software und braucht dann Cordova zum erzeugen einer Android oder iOS App.

SpiderBasic lädt offensichtlich das "cordova-plugin-device" Plugin automatisch immer dann, sobald du in deiner App die Funktion DeviceInfo(*) verwendest, und möglicherweise passiert das ebenso bei anderen Hardware-nahen Funktionen wie z.B. DeviceBrightness() oder VibrateDevice() oder BatteryLevel(), die ich aber bisher nicht nutze, deshalb nicht ausprobiert und auch keine Lösung dafür habe.

Mein Lösungsvorschlag ist, bis das Problem hoffentlich irgendwann durch ein SB Update behoben wird, sämtliche Aufrufe der SB Funktion DeviceInfo(*) durch eigene Funktionen zu ersetzen, die in meinem Bug-Posting mit "Get*" aufgeführt sind. Damit diese Funktionen auch ihren Job machen, musst du aber am Anfang deines Programms mit der "Import..." Zeile eine ältere Version des Plugins importieren.

Ich hoffe, das ist nun soweit verständlich?
Gruß, hoerbie
hoerbie
Posts: 100
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

Re: Instructions for creating an Android app

Post by hoerbie »

The problem from the screenshot is the plugin "cordova-plugin-device", that from my testings is automatically imported by SB, when SB functions are used, that read Android hardware information, in my apps it was DeviceInfo(*). And I think it is possible, that other functions like DeviceBrightness() or VibrateDevice() or BatteryLevel() use the same plugin, although I didn't test this.

Cordova updated this plugin some weeks ago, and I think this update doesn't work with other Cordova things, that SB uses.

Again, please see my Bug report on viewtopic.php?t=2254 and in the third post my workaround.
Stefan
Posts: 160
Joined: Mon Feb 05, 2018 9:44 pm

Re: Instructions for creating an Android app

Post by Stefan »

hoerby, you are the best!
Thank you very much. Now I understand, I'm trying to customize my code.
Stefan
Posts: 160
Joined: Mon Feb 05, 2018 9:44 pm

Re: Instructions for creating an Android app

Post by Stefan »

There must be commands other than Device() that cause the error.
I suspect certain Javascipt commands. Unfortunately, I'm completely clueless.
It is also too complicated and too much tinkering. With Spiderbasic I finally managed to use a simple language.
Well, maybe one day there will be an update...
hoerbie
Posts: 100
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

Re: Instructions for creating an Android app

Post by hoerbie »

Do you use any other hardware-near features of SB?
DeviceAlwaysOn() for example also needs the plugin, but I didn't try to solve it myself, because I don't need it.
You can only try to comment out hardware near SB functions, until you can compile.
Stefan
Posts: 160
Joined: Mon Feb 05, 2018 9:44 pm

Re: Instructions for creating an Android app

Post by Stefan »

I don't use any device commands at all, just spiderbasic and javascript.
My code is 30,000 lines, it's just not possible to test every line.
Where can you turn DeviceAlwaysOn() on or off?
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Instructions for creating an Android app

Post by Peter »

<german>

@Stefan: Starte mal Deinen Code normal als Web-Applikation. Im Browser öffnest Du die Entwickler-Konsole (normalerweise über <F12>). Dort suchst Du den Tab "Quellen". Dort klickst Du "spiderbasic.js" an (es kann sein, dass Du Deine App mit <F5> erneut laden musst, damit die Datei erscheint). Im Code-Fenster kannst Du mal nach "cordova" suchen (<Strg>+<F>). Wenn dort Treffer vorhanden sind, kannst Du vielleicht lokalisieren, wo in Deinem Code die cordova-Funktionalität(en) aufgerufen werden.

Image
</german>
Post Reply