Attribute [Application] do not work.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Attribute [Application] do not work.

Ricardo Romao Soares-2
I extend the class Application on android and mark it with the attribute [Application], but 
the xamarin.android  do not make a register on  manifest file and  continue using the normal Application instance.


I’m target android 4.4, I’m using the last stable xamarin that are updated.


namespace CL.Android
{
    [Application]
    class CLApplication : Application
    {
        object objeto;

        public CLApplication (IntPtr handle, global::Android.Runtime.JniHandleOwnership transfer) : base (handle, transfer)
        {
            Current = this;
        }

        public static CLApplication Current { get; private set; }

        public void AtribuirObjeto<T> (T objeto)
        {
            this.objeto = objeto;
        }

        public T ObterObjeto<T> ()
        {
            return (T)objeto;
        }
    }

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|

Re: Attribute [Application] do not work.

Jonathan Pryor-2
I'm not able to reproduce. Could you please file a bug at bugzilla.xamarin.com and attach a project which exhibits the error?

Thanks,
 - Jon

On Feb 27, 2014, at 7:55 AM, Ricardo Romao Soares <[hidden email]> wrote:

> I extend the class Application on android and mark it with the attribute [Application], but
> the xamarin.android  do not make a register on  manifest file and  continue using the normal Application instance.
>
>
> I’m target android 4.4, I’m using the last stable xamarin that are updated.
>
>
> namespace CL.Android
> {
>     [Application]
>     class CLApplication : Application
>     {
>         object objeto;
>
>         public CLApplication (IntPtr handle, global::Android.Runtime.JniHandleOwnership transfer) : base (handle, transfer)
>         {
>             Current = this;
>         }
>
>         public static CLApplication Current { get; private set; }
>
>         public void AtribuirObjeto<T> (T objeto)
>         {
>             this.objeto = objeto;
>         }
>
>         public T ObterObjeto<T> ()
>         {
>             return (T)objeto;
>         }
>     }
> _______________________________________________
> Monodroid mailing list
> [hidden email]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid