Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 10-Aug-2015 14:48:01

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

making a hello world scol app for android

hello scolologists!

how would i make a hello world app for the android with scol, i.e. printing "hello world" to the console.....is is the whole process of programming scol apps on android different in approach?

my understanding with windows is the vm gives you scol functionatliy, and the os3d installer adds the resource .pkg files for any os3d app.  is it totally different with android?

answer at your leisure, you guys have done alot over the last six months!!

Offline

#2 11-Aug-2015 11:06:16

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

Hello, this is totally the same

Only the apk creation need to be done with some external tools provided in the android dev tools installed with os3d

Offline

#3 11-Aug-2015 12:28:35

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

arkeon wrote:

Hello, this is totally the same

Only the apk creation need to be done with some external tools provided in the android dev tools installed with os3d

Thx!  Ok I will look around to try to see how this is done.

Offline

#4 20-Aug-2015 13:19:58

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

ok, I made a .scol file and 2 .pkg files.  the first loads tools/os3dlib/android.pkg in the system partition and tests/android_hello_world/dependencypackage.pkg in the user partition.

i somehow (and perhaps mistakenly) think that scol will do the .apk compiling (packing? encrypting? both? neither?) in dependencypackage.pkg.

basicly my goal it to do that player project i was working on with windows 8 on android, so all scol is doing is putting a bunch of .pkg files on an android device.  (once its there, then there are many things to figure out in getting scol to communicate with the android os to interact with other android apps (like chrome) to download (os3d apk files) and to get other chrome apps (like facebook) to start up the scol machine and make it download os3d  .apks (or perhaps an android based player could download .pak files?)

many questions, don't answer them now or feel any obligation to...at this point i'm trying to figure out how to get the scol vm to write "hello world" to a console (or whatever android uses that functions like the console) on my cheap and crappy alcatel fierce 2 (i got an sd card for it).  never get that model unless you are testing how scol functions on ultra cheap and bad hardware. it sucks.

perfect for testing hardware requirements

i posted the files to http://ifam.net/openspace/android/hello … _world.zip

.scol file:

_load "tests/android_hello_world/android_hello_world_loader.pkg"loadermain

android_hello_world_loader.pkg code


proto hello_world_in_other__loaded_pkg_file = fun [] I;;


fun secureLoad(pack)=  

let _testpak pack -> ret in  

if (ret == nil) then 

 (  

  _load  pack;   
  1; 

 )  else 

 (      

_fooS strcat ">>>>> Compilation error : " ret;  

 0;  

);;
  
  
fun loadermain()=  let "tools/os3dlib/android.pkg"::
 //the next file is in my Openspace3D user partition
 "tests/android_hello_world/dependencypackage.pkg"::	 
 nil  
-> lfiles in 


 (    

while (lfiles != nil) && (secureLoad hd lfiles) do   

 (        
  _showconsole;
_fooS "still loading dependency pkg's";
  set lfiles = tl lfiles;   
 );       

 if (lfiles == nil)

 then   

(           

//execute  hello_world_in_other__loaded_pkg_file "Hello World";
 _fooS ">>>>>>>>>>>> done loading dependencies, Hello World on my windows pc!!!!";
 //now call hello_world_in_other__loaded_pkg_file function in 
tests/android_hello_world/dependencypackage.pkg
 hello_world_in_other__loaded_pkg_file;
 0;  

 )    
else   

 (          
 0;   
 ); 

 );  

0;;

tests/android_hello_world/dependencypackage.pkg:

fun hello_world_in_other__loaded_pkg_file()=
//here we are in the .pkg file that will run the code in the android .apk....I'm a bit  lost as to how to achieve this...mkapplet.pkg is pretty complicated and looks like its used for publishing .xos files as .paks on web servers and .apk's on android devices, whereas I just want to put some .pkg files into an .apk file
//so this is what i would like scol to do on android, display the console and say something
_showconsole;
_fooS "I'm a scol app in Android!!! Hello World of Android!"; 
0;;

Last edited by hebdemnobad (20-Aug-2015 13:23:44)

Offline

#5 24-Aug-2015 13:41:45

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

Respectfully bumping, if you have some time to reply atm.

Offline

#6 24-Aug-2015 16:30:34

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

Hello

check the code in os3dlib/mkapplet.pkg
for generating APK file by code.
however you need to use the tools to generate the APK with a batch or in command line.

I could make a small app that generate an apk from the scol code provided ^^ (add this in a corner of my brain)

Offline

#7 24-Aug-2015 18:35:28

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

arkeon wrote:

Hello

check the code in os3dlib/mkapplet.pkg
for generating APK file by code.
however you need to use the tools to generate the APK with a batch or in command line.

I could make a small app that generate an apk from the scol code provided ^^ (add this in a corner of my brain)


Ok I will checkout the mkapplet.pkg.

Offline

#8 28-Aug-2015 13:46:41

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: making a hello world scol app for android

Hi,

All source files written in Scol should be read (loaded / compiled / executed) on all computer where Scol is correctly installed.
You (and all Scol applications developers) should write the same code for Windows, Android or what you want.
We (all Scol language developers) should provide a VM and this must to adapt to the computer environment. We should to manage to get this.

About Facebook and other social network services, including a Scol application raises other issues, independently.

Offline

#9 28-Aug-2015 17:00:24

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

iri wrote:

About Facebook and other social network services, including a Scol application raises other issues, independently.

Agreed...as for making scol os independent it may be that the differences are big enough between windowed os's and mobile apps which use more of a page like interface that different classes would be easier for a scol programmer to use.

Offline

#10 28-Aug-2015 19:11:10

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: making a hello world scol app for android

Yes, the current Scol OS 2d library, used by openspace3D, is unefficient and inconvenient. We are thinking about an other way.

Offline

#11 16-Sep-2015 14:22:58

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

Hello !

I took the time to make a tool to generate android APK from any scol program.

you can find it here :
https://www.arkeon.be/svn-scol/trunk/sc … erator.pkg
https://www.arkeon.be/svn-scol/trunk/sc … rator.scol

Scol APK generator

Offline

#12 16-Sep-2015 14:26:01

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

wow great!!!!! you are unstoppable.

Offline

#13 16-Sep-2015 15:02:16

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

I think I will disable Web export in next releases since the navigator plugins are no more supported and can't be updated for new navigators the same way.

Offline

#14 16-Sep-2015 15:05:00

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

arkeon wrote:

I think I will disable Web export in next releases since the navigator plugins are no more supported and can't be updated for new navigators the same way.


so export will be restricted to .scol export on authoring machine/.exe for windows/.apk for android?

Offline

#15 16-Sep-2015 15:07:18

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

yes hmm

Offline

#16 16-Sep-2015 15:08:27

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

Or maybe it still work in firefox ?

Offline

#17 16-Sep-2015 15:11:45

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

arkeon wrote:

Or maybe it still work in firefox ?

yes....hopefully firefox won't shut down the ability of the plugin to operate. while most people these days use mobile devices to go online, it would be good to have the plugin available in one of the browsers for people who want to post complicated/immersive online content

unless that's too much work.

mobile content delivery is king these days, until everyone develops neck problems neutral

Offline

#18 16-Sep-2015 15:13:36

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

Yes 3D in browser on desktop is no more a priority.

We are a very small time for now, we have to focus on big things like mobile devices ^^

Offline

#19 17-Sep-2015 21:29:10

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

arkeon wrote:

We are a very small time for now, we have to focus on big things like mobile devices ^^

Who  in the world had such a crazy  idea. But seriously mobile  is the future of web 3d content  and web in general...or maybe it's the future  and I  still see things as it's still 2003...

Offline

#20 13-Nov-2015 19:52:08

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

so how would I begin writing non ui scol apps for android, analogous to printing strings to the console on windows? i.e, what classes/objects/functions can scol access on android?

Offline

#21 13-Nov-2015 21:52:28

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: making a hello world scol app for android

For that, it is already done. You can try.

Offline

#22 13-Nov-2015 22:17:49

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

iri wrote:

For that, it is already done. You can try.

ok, will do with that life example I made.

Offline

#23 13-Nov-2015 22:46:44

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

Offline

#24 14-Nov-2015 12:32:42

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: making a hello world scol app for android

nope only bitmaps api and keyboard / mouse

_crwindow and all other windows stuff only return the main android app window
_blitbitmap is also working when there is no 3D buffer

Offline

#25 14-Nov-2015 15:44:12

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,543
Website

Re: making a hello world scol app for android

Thx Arkeon. ...so is there a way I can use some of the scol api to make a simple gui app on Android with the apk generator you wrote?

Offline

Board footer

Powered by FluxBB