GLBasic forum

Main forum => GLBasic - en => Topic started by: mentalthink on 2012-Apr-10

Title: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: mentalthink on 2012-Apr-10
hi sorry for this thread I don´t know if this has comment yet...

Well in windows, I think it´s possible to call another .exe from a executable in GLbasic, but this can be possible in Android, iPhone or another mobile phone... I think can be usefull, in the Developement Stage, for have the project divided, perhaps in important Stages of the development...

This can do now... if it´s not.. can be implemented?¿....

Thanks in advance...
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: MrTAToad on 2012-Apr-10
I'm not sure it's possible (or even allowed)...  However, there is this as long as its another installed package : http://stackoverflow.com/questions/2728465/how-to-call-one-android-application-from-another-android-application
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: mentalthink on 2012-Apr-10
HI MrTataoad thanks for help... but I don´t have any idea about Java?¿(those examples are Java, isn´t it?¿)

I comment if Gernnot can add a "simple" command for make this like another of all commands... but seems not it´s a very easy Job...

Only the idea it´s in example if you make an application like you can draw... and after have another module, you can free the other module from memory, and you can make a game or program, like Lego Piezes, focusing more complexity, or how you free Memory, more expandible project...

How i told , it´s only an idea, and perhaps it´s a very huge work, and not have too much sense make something very complex...

Thanks in advance for your Help... again!!!
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: MrTAToad on 2012-Apr-10
No problem!
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: kanonet on 2012-Apr-10
Under Win/Linux you can use SHELLCOMMAND to start an other program, maybe you can get use this on mobile platforms too (if you find out where is the executable)? But most platforms dont have real multitasking and apps run fullscreen all the time, so maybe multiple programs running may not be the best idea.
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: Leginus on 2012-Apr-10
Its definitely not allowed under Apples TOS, not sure about any others
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: Hark0 on 2012-Apr-10
The problem maybe are the data stored in App A .... and transfer to App B... I think.

Saving data from A... (file bin)

call app B...

Restore data from A for use in app B

save data of app B... and returns control to A

???
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: mentalthink on 2012-Apr-10
Well About save the Data, I think by yourself... like if you make a simple program, you can save in Dat, and again when you load the Program A, load these Datas...

Well if in Iphone, can´t be done, I forget the idea... I don´t know because Apple have all this extrange things and rules for develop their "cacharros"...
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: spacefractal on 2012-Apr-10
Both android and iOS use sandboxing, so it won't been good. Apple does not even allow with its tos. Instead you could use dropbox and such service for data share between apps, but you could got issue as well. I guess it's extractly why using udid directly can been a privary concern.

But with other word: it's not safe do that.
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: matchy on 2012-Apr-11
Although not the same as a shell, but I'd like to note that an app can send a http:/emailto: to shell/open iOS Safari browser or email, sending the app to the background.
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: Hark0 on 2012-Apr-11
Quote from: matchy on 2012-Apr-11
Although not the same as a shell, but I'd like to note that an app can send a http:/emailto: to shell/open iOS Safari browser or email, sending the app to the background.

Well... on iOS, when you receive by mail a file like PDF (for example)... you can OPEN WITH...

iBooks, PDF Reader, Goodreader, and other many apps... you know. :)

When you select an app... the OS make a copy from ORIGINAL /Documents folder of his app to the /Documents folder of the desired app...

BUT... I think this method its also slow in certan circumstances....

Other alternative? Dropbox? maybe are slow too...

I think mobile devices NOT are the same of "home computers"... the filesystem area are "separated" by apps... every app have his own "sandbox" files, etc....

Best solution?
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: hardyx on 2012-Apr-11
Calling another applications is prohibited by Apple store rules. I think the PDF app selection could work by registering an application to open certain type of files. But I think this stuff is made by the system and very limited.
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: Hark0 on 2012-Apr-11
Quote from: hardyx on 2012-Apr-11
Calling another applications is prohibited by Apple store rules. I think the PDF app selection could work by registering an application to open certain type of files. But I think this stuff is made by the system and very limited.

Exactly... when you make one app in xcode, you can declare a type of file. If your app supports this file, and are correctly declared, your app are showed in menu "OPEN WITH...".

You can made a PDF reader, for example, and declare that your app can open it... with this declaration your app are listed and avaliable for "open with"....



More info about File Association at: http://developer.apple.com/library/ios/ipad/#DOCUMENTATION/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: Kitty Hello on 2012-Apr-12
GLBasic supports these file types on iOS. You get them with GETCOMMANDLINE$() then.
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: TI-994A on 2012-Apr-12
Quote from: spacefractal on 2012-Apr-10Both android and iOS use sandboxing, so it won't been good.
Quote from: Kitty Hello on 2012-Apr-12
GLBasic supports these file types on iOS. You get them with GETCOMMANDLINE$() then.

Hello Gernot. If an iPhone app is already running, and an associated file is selected, would GETCOMMANDLINE$() still be able to retrieve the new parameters? And for Android, if the app model is SingleTask or SingleInstance, how do we overcome the sandbox restriction for passing such parameters to the running instance?

Thank you.
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: Hark0 on 2012-Apr-13
Quote from: Kitty Hello on 2012-Apr-12
GLBasic supports these file types on iOS. You get them with GETCOMMANDLINE$() then.

Well well.... Currently my game are paused about this topic: share maps on iOS with mail... and add filetype definition of my map file format...

My friend @Dacarsoft are working on this.... he's are a "monster developer" =D

;)
Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: DaCarSoft on 2012-Apr-24
Quote from: Kitty Hello on 2012-Apr-12
GLBasic supports these file types on iOS. You get them with GETCOMMANDLINE$() then.

Quote from: Kitty Hello on 2012-Apr-12
I can't remember anymore, but I think I made this work properly.


I was testing that, but no, it is not working :(

Firstly, I added to the XCode project all the parameters needed into the info.plist (exported types UTIs, iTunes file sharing, and URL types), then I tested to open an attachment from the mail app, tapping in the "Open with (my application name)" without luck: The game closes without showing any graphic or info from GLBasic... it only crashes showing a black screen for a while. Just like here:

http://www.glbasic.com/forum/index.php?topic=7974.0 (http://www.glbasic.com/forum/index.php?topic=7974.0)

After that, I checked the documents folder within the application directory, and the file was there, it was correctly imported into the "Documents/Inbox" folder generated by iOS.

I tested also to open the application using hyperlinks like "MyApp://" or "MyApp://Hello_World", without luck, one more time: The App opens but it instantaneously crashes in the same way as before.

I think that GLBasic have a problem when it founds a parameter. I suppose that there is a problem in the "internal" AppDelegate of GLBasic.
I was trying to make a workaround writing code into the main.m file from XCode.
I added my own and new AppDelegate, and now I can detect the URL parameter at the "DidFinishLaunchingWithOptions" event showing an alert (for example), but (OBVIOUSLY) I can't launch the GLBasic part when I add my own AppDelegate...

Gernot (Kitty Hello): A little help?   XD

TIA

Title: Re: It´s possible call to another "executable" into mobile Devices from an executabl
Post by: Kitty Hello on 2012-Apr-24
I reply on the link you posted.