Bennu Game Development

Foros en Español => Otros DIV-likes => PixTudio => Topic started by: Goku jr on January 24, 2018, 10:34:06 AM

Title: Pixtudio y funcion Exec
Post by: Goku jr on January 24, 2018, 10:34:06 AM
Buenas!
he estado probando pixtudio en android y no me funciona la funcion Exec,cuando en bennu si que lo hacia.
panreyes, he modificado el fichero como me dijiste y me tira error
Alguien me puede hechar una mano?  :) :P

Saludos y gracias
Title: Re:Pixtudio y funcion Exec
Post by: panreyes on January 24, 2018, 10:36:28 AM
Porfis, publica el cambio que te comenté, que perdí el mensaje privado enviado xD
Title: Re:Pixtudio y funcion Exec
Post by: Goku jr on January 24, 2018, 10:53:09 AM
Sorry
Aquí está :
// Taken from    // http://digitalsynapsesblog.blogspot.com.es/2011/09/cocos2d-x-launching-url-on-android.html (http://digitalsynapsesblog.blogspot.com.es/2011/09/cocos2d-x-launching-url-on-android.html)    public static void openURL(String url) {        Intent i = new Intent(Intent.ACTION_VIEW);        i.setData(Uri.parse(url));        mSingleton.startActivity(i);    }
Title: Re:Pixtudio y funcion Exec
Post by: panreyes on January 24, 2018, 10:57:16 AM
Oks, vale, ya lo he probado y he visto el problema.

Hay que cambiar el SDLActivity.java y añadir dos cosas:
1. Añadir un import al final de éstos

import android.net.Uri;


2. Añadir la función de openURL después de la función de pollInputDevices()

    // Taken from
    // http://digitalsynapsesblog.blogspot.com.es/2011/09/cocos2d-x-launching-url-on-android.html
    public static void openURL(String url) {
        Intent i = new Intent(Intent.ACTION_VIEW);
        i.setData(Uri.parse(url));
        mSingleton.startActivity(i);
    }


Con eso me funciona bien :)
Title: Re:Pixtudio y funcion Exec
Post by: Goku jr on January 24, 2018, 10:59:57 AM
Gracias!
Entonces faltaba un informe import.
A finales del año que viene Voi a hacer un grado superior de programación,ains XD
Title: Re:Pixtudio y funcion Exec
Post by: Goku jr on January 24, 2018, 12:10:43 PM
Bueno,pues probado y funciona correctamente! :D