You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Youngho Cho <yo...@gmail.com> on 2013/09/20 08:28:22 UTC

add Feature Splashscreen at android

Hello,

In order to set up Splashscreen plugin at android platform,

we need copy the following line

super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl(Config.getStartUrl(), 10000);

into java file.

Is there any way to put those line automatically ?

Thanks,

Youngho

Re: add Feature Splashscreen at android

Posted by Joe Bowser <bo...@gmail.com>.
Yes, that's correct. This was something that I added early on that I
couldn't get in for 3.0.0.

BTW: Anyone have any idea how to test this? I can't quite get the hook
on the dialog to see if it's visible or not.

On Fri, Sep 20, 2013 at 7:04 AM, Ian Clelland <ic...@chromium.org> wrote:
> Looking a bit deeper into the code for this, it looks like it has already
> been addressed in Cordova 3.1.
>
> https://issues.apache.org/jira/browse/CB-3819 is the issue.
>
> As far as I can tell, the problem is that you need to specify the delay, not
> that you need to set the splashscreen property. And this fix means that you
> can set the delay with a line in your config.xml file.
>
> Joe -- this was your bug -- does that sound right to you?
>
> Ian
>
>
> On Fri, Sep 20, 2013 at 9:33 AM, Ian Clelland <ic...@google.com> wrote:
>>
>> I don't think that there is a way currently to have a plugin do that.
>> Expanding the abilities of Android plugins was one of the goals of a
>> discussion we had last month, but I haven't put together a complete proposal
>> yet, so not much work has been done on that front.
>>
>> This gives me another use-case to think about; in the case of
>> Splashscreen, it sounds like we would need to allow a plugin to modify the
>> activity's onCreate method.
>>
>> Another alternative would be to have the template activity class check for
>> a preference in config.xml that the plugin (or any other competing
>> splashscreen plugin, so as not to special-case
>> org.apache.cordova.core.splashscreen) sets, and add the call to
>> setIntegerProperty if it is present.
>>
>> Ian
>>
>>
>> On Fri, Sep 20, 2013 at 2:28 AM, Youngho Cho <yo...@gmail.com>
>> wrote:
>>>
>>> Hello,
>>>
>>> In order to set up Splashscreen plugin at android platform,
>>>
>>> we need copy the following line
>>>
>>> super.setIntegerProperty("splashscreen", R.drawable.splash);
>>> super.loadUrl(Config.getStartUrl(), 10000);
>>>
>>> into java file.
>>>
>>> Is there any way to put those line automatically ?
>>>
>>> Thanks,
>>>
>>> Youngho
>>
>>
>

Re: add Feature Splashscreen at android

Posted by Ian Clelland <ic...@chromium.org>.
Looking a bit deeper into the code for this, it looks like it has already
been addressed in Cordova 3.1.

https://issues.apache.org/jira/browse/CB-3819 is the issue.

As far as I can tell, the problem is that you need to specify the delay,
not that you need to set the splashscreen property. And this fix means that
you can set the delay with a line in your config.xml file.

Joe -- this was your bug -- does that sound right to you?

Ian


On Fri, Sep 20, 2013 at 9:33 AM, Ian Clelland <ic...@google.com> wrote:

> I don't think that there is a way currently to have a plugin do that.
> Expanding the abilities of Android plugins was one of the goals of a
> discussion we had last month, but I haven't put together a complete
> proposal yet, so not much work has been done on that front.
>
> This gives me another use-case to think about; in the case of
> Splashscreen, it sounds like we would need to allow a plugin to modify the
> activity's onCreate method.
>
> Another alternative would be to have the template activity class check for
> a preference in config.xml that the plugin (or any other competing
> splashscreen plugin, so as not to special-case
> org.apache.cordova.core.splashscreen) sets, and add the call to
> setIntegerProperty if it is present.
>
> Ian
>
>
> On Fri, Sep 20, 2013 at 2:28 AM, Youngho Cho <yo...@gmail.com>wrote:
>
>> Hello,
>>
>> In order to set up Splashscreen plugin at android platform,
>>
>> we need copy the following line
>>
>> super.setIntegerProperty("splashscreen", R.drawable.splash);
>> super.loadUrl(Config.getStartUrl(), 10000);
>>
>> into java file.
>>
>> Is there any way to put those line automatically ?
>>
>> Thanks,
>>
>> Youngho
>>
>
>

Re: add Feature Splashscreen at android

Posted by Ian Clelland <ic...@google.com>.
I don't think that there is a way currently to have a plugin do that.
Expanding the abilities of Android plugins was one of the goals of a
discussion we had last month, but I haven't put together a complete
proposal yet, so not much work has been done on that front.

This gives me another use-case to think about; in the case of Splashscreen,
it sounds like we would need to allow a plugin to modify the activity's
onCreate method.

Another alternative would be to have the template activity class check for
a preference in config.xml that the plugin (or any other competing
splashscreen plugin, so as not to special-case
org.apache.cordova.core.splashscreen) sets, and add the call to
setIntegerProperty if it is present.

Ian


On Fri, Sep 20, 2013 at 2:28 AM, Youngho Cho <yo...@gmail.com> wrote:

> Hello,
>
> In order to set up Splashscreen plugin at android platform,
>
> we need copy the following line
>
> super.setIntegerProperty("splashscreen", R.drawable.splash);
> super.loadUrl(Config.getStartUrl(), 10000);
>
> into java file.
>
> Is there any way to put those line automatically ?
>
> Thanks,
>
> Youngho
>