示例#1
0
 public virtual android.accounts.AccountManagerFuture <android.os.Bundle> updateCredentials
     (android.accounts.Account account, string authTokenType, android.os.Bundle options
     , android.app.Activity activity, android.accounts.AccountManagerCallback <android.os.Bundle
                                                                               > callback, android.os.Handler handler)
 {
     throw new System.NotImplementedException();
 }
示例#2
0
        //
        // CanResume
        //

        public static bool CanResume(android.app.Activity activity)
        {
            foreach (var renderer in GetRenderersForActivity(activity))
            {
                if (renderer.paused.get() != 0)
                {
                    // we cannot use waitObject for resuming, because the surface
                    // may have been destroyed between pause and resume, in which
                    // case onDrawFrame would not get called.

                    var cond = new android.os.ConditionVariable();
                    renderer.surface.queueEvent(((java.lang.Runnable.Delegate)(
                                                     () => cond.open())).AsInterface());

                    renderer.surface.onResume();
                    if (!cond.block(2000))
                    {
                        // something is wrong if the queued event did not run
                        return(false);
                    }

                    if (!renderer.paused.compareAndSet(1, 0))
                    {
                        // cannot resume because we lost the GL context,
                        // see also PauseRenderers and onSurfaceCreated
                        return(false);
                    }
                }
            }
            return(true);
        }
 public DisabledSettingItem(Activity activity, string name) : base(activity, name, null)
 {
     mView = mActivity.LayoutInflater.inflate(R.layout.setting_list_item, null);
     ((TextView)mView.findViewById(R.id.title)).Text      = name;
     ((TextView)mView.findViewById(R.id.title)).TextColor = ContextCompat.getColor(mActivity, android.R.color.secondary_text_dark);
     mView.findViewById(R.id.itemlist).Visibility         = View.GONE;
 }
示例#4
0
 public virtual android.accounts.AccountManagerFuture <android.os.Bundle> addAccount
     (string accountType, string authTokenType, string[] requiredFeatures, android.os.Bundle
     addAccountOptions, android.app.Activity activity, android.accounts.AccountManagerCallback
     <android.os.Bundle> callback, android.os.Handler handler)
 {
     throw new System.NotImplementedException();
 }
示例#5
0
        //
        // Pause
        //

        public static void Pause(android.app.Activity activity)
        {
            foreach (var renderer in GetRenderersForActivity(activity))
            {
                renderer.surface.onPause();
                renderer.paused.compareAndSet(0, 1);
            }
        }
		public override void onAttach(Activity activity)
		{
			base.onAttach(activity);

			Log.i(LOGTAG, "On attach Publisher status fragment");
			openTokActivity = (UIActivity) activity;
			if (!(activity is PublisherCallbacks))
			{
				throw new System.InvalidOperationException("Activity must implement fragment's callback");
			}
		}
示例#7
0
        public override void onAttach(Activity activity)
        {
            base.onAttach(activity);

            Log.i(LOGTAG, "On attach Publisher status fragment");
            openTokActivity = (UIActivity)activity;
            if (!(activity is PublisherCallbacks))
            {
                throw new System.InvalidOperationException("Activity must implement fragment's callback");
            }
        }
示例#8
0
        public override void onAttach(Activity activity)
        {
            base.onAttach(activity);
            Log.i(LOGTAG, "On attach Subscriber control fragment");
            openTokActivity = (UIActivity)activity;
            if (!(activity is SubscriberCallbacks))
            {
                throw new System.InvalidOperationException("Activity must implement fragment's callback");
            }

            mCallbacks = (SubscriberCallbacks)activity;
        }
示例#9
0
 protected override void onChildTitleChanged(android.app.Activity arg0, java.lang.CharSequence arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.app.TabActivity._onChildTitleChanged815, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.app.TabActivity.staticClass, global::android.app.TabActivity._onChildTitleChanged815, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
 }
示例#10
0
	   protected internal override void onCreate(Bundle savedInstanceState)
	   {
		  base.onCreate(savedInstanceState);
		  ContentView = R.layout.activity_main;

		  currentActivity = this;

		  // NOTE: Please update your Google Project number and OneSignal id to yours below.
		  // Pass in your app's Context, Google Project number, your OneSignal App ID, and NotificationOpenedHandler
		  OneSignal.init(this, "703322744261", "b2f7f966-d8cc-11e4-bed1-df8f05be55ba", new ExampleNotificationOpenedHandler(this, this));

		  OneSignal.idsAvailable(new IdsAvailableHandlerAnonymousInnerClassHelper(this));
	   }
		public override void onAttach(Activity activity)
		{
			base.onAttach(activity);
			Log.i(LOGTAG, "On attach Subscriber control fragment");
			openTokActivity = (UIActivity) activity;
			if (!(activity is SubscriberCallbacks))
			{
				throw new System.InvalidOperationException("Activity must implement fragment's callback");
			}

			mCallbacks = (SubscriberCallbacks) activity;

		}
示例#12
0
        protected internal override void onCreate(Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            ContentView = R.layout.activity_main;

            currentActivity = this;

            // NOTE: Please update your Google Project number and OneSignal id to yours below.
            // Pass in your app's Context, Google Project number, your OneSignal App ID, and NotificationOpenedHandler
            OneSignal.init(this, "703322744261", "b2f7f966-d8cc-11e4-bed1-df8f05be55ba", new ExampleNotificationOpenedHandler(this, this));

            OneSignal.idsAvailable(new IdsAvailableHandlerAnonymousInnerClassHelper(this));
        }
示例#13
0
 /// <summary>
 /// Perform instantiation of an
 /// <see cref="Activity">Activity</see>
 /// object.  This method is intended for use with
 /// unit tests, such as android.test.ActivityUnitTestCase.  The activity will be useable
 /// locally but will be missing some of the linkages necessary for use within the sytem.
 /// </summary>
 /// <param name="clazz">The Class of the desired Activity</param>
 /// <param name="context">The base context for the activity to use</param>
 /// <param name="token">The token for this activity to communicate with</param>
 /// <param name="application">The application object (if any)</param>
 /// <param name="intent">The intent that started this Activity</param>
 /// <param name="info">ActivityInfo from the manifest</param>
 /// <param name="title">The title, typically retrieved from the ActivityInfo record</param>
 /// <param name="parent">The parent Activity (if any)</param>
 /// <param name="id">The embedded Id (if any)</param>
 /// <param name="lastNonConfigurationInstance">
 /// Arbitrary object that will be
 /// available via
 /// <see cref="Activity.getLastNonConfigurationInstance()">Activity.getLastNonConfigurationInstance()
 ///     </see>
 /// .
 /// </param>
 /// <returns>Returns the instantiated activity</returns>
 /// <exception cref="java.lang.InstantiationException">java.lang.InstantiationException
 ///     </exception>
 /// <exception cref="System.MemberAccessException">System.MemberAccessException</exception>
 public virtual android.app.Activity newActivity <_T0>(android.content.Context context
                                                       , android.os.IBinder token, android.app.Application application, android.content.Intent
                                                       intent, android.content.pm.ActivityInfo info, java.lang.CharSequence title, android.app.Activity
                                                       parent, string id, object lastNonConfigurationInstance)
 {
     System.Type          clazz    = typeof(_T0);
     android.app.Activity activity = (android.app.Activity)System.Activator.CreateInstance
                                         (clazz);
     android.app.ActivityThread aThread = null;
     activity.attach(context, aThread, this, token, application, intent, info, title,
                     parent, id, (android.app.Activity.NonConfigurationInstances)lastNonConfigurationInstance
                     , new android.content.res.Configuration());
     return(activity);
 }
示例#14
0
 internal virtual void dispatchActivityDestroyed(android.app.Activity activity)
 {
     object[] callbacks = collectActivityLifecycleCallbacks();
     if (callbacks != null)
     {
         {
             for (int i = 0; i < callbacks.Length; i++)
             {
                 ((android.app.Application.ActivityLifecycleCallbacks)callbacks[i]).onActivityDestroyed
                     (activity);
             }
         }
     }
 }
示例#15
0
 public ActionBarImpl(android.app.Activity activity)
 {
     mHideListener = new _AnimatorListenerAdapter_108(this);
     mShowListener = new _AnimatorListenerAdapter_125(this);
     mActivity     = activity;
     android.view.Window window = activity.getWindow();
     android.view.View   decor  = window.getDecorView();
     init(decor);
     if (!mActivity.getWindow().hasFeature(android.view.Window.FEATURE_ACTION_BAR_OVERLAY
                                           ))
     {
         mContentView = decor.findViewById(android.R.id.content);
     }
 }
示例#16
0
 internal virtual void dispatchActivitySaveInstanceState(android.app.Activity activity
                                                         , android.os.Bundle outState)
 {
     object[] callbacks = collectActivityLifecycleCallbacks();
     if (callbacks != null)
     {
         {
             for (int i = 0; i < callbacks.Length; i++)
             {
                 ((android.app.Application.ActivityLifecycleCallbacks)callbacks[i]).onActivitySaveInstanceState
                     (activity, outState);
             }
         }
     }
 }
		public override void onAttach(Activity activity)
		{
			base.onAttach(activity);

			try
			{
				onClickListener = (OnClickListener) activity;
			}
			catch (System.InvalidCastException e)
			{
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
				throw new System.InvalidCastException(activity.ToString() + " must implement ListDialogFragment.OnClickListener");
			}
		}
示例#18
0
        public override void onAttach(Activity activity)
        {
            base.onAttach(activity);

            try
            {
                onClickListener = (OnClickListener)activity;
            }
            catch (System.InvalidCastException e)
            {
                Console.WriteLine(e.ToString());
                Console.Write(e.StackTrace);
                throw new System.InvalidCastException(activity.ToString() + " must implement ListDialogFragment.OnClickListener");
            }
        }
示例#19
0
        //
        // GetRenderersForActivity
        //

        private static List <Renderer> GetRenderersForActivity(android.app.Activity activity)
        {
            var list = new List <Renderer>();

            lock (RendererObjects)
            {
                foreach (var renderer in RendererObjects)
                {
                    if (renderer.activity.get() == activity)
                    {
                        list.Add(renderer.renderer);
                    }
                }
            }
            return(list);
        }
示例#20
0
        //
        // constructor
        //

        private Renderer(android.app.Activity activity, Action onChanged,
                         int redSize, int greenSize, int blueSize,
                         int alphaSize, int depthSize, int stencilSize,
                         int swapInterval, bool checkErrors)
        {
            waitObject        = new android.os.ConditionVariable();
            paused            = new java.util.concurrent.atomic.AtomicInteger();
            actionOnChanged   = onChanged;
            this.swapInterval = swapInterval;
            this.checkErrors  = checkErrors;

            activity.runOnUiThread(((java.lang.Runnable.Delegate)(() =>
            {
                surface = new android.opengl.GLSurfaceView(activity);
                surface.setEGLContextClientVersion(3); // OpenGL ES 3.0
                surface.setEGLConfigChooser(redSize, greenSize, blueSize,
                                            alphaSize, depthSize, stencilSize);
                surface.setPreserveEGLContextOnPause(true);
                surface.setRenderer(this);
                surface.setRenderMode(android.opengl.GLSurfaceView.RENDERMODE_WHEN_DIRTY);
                activity.setContentView(surface);
            })).AsInterface());

            // wait for one onDrawFrame callback, which tells us that
            // GLSurfaceView finished initializing the GL context
            if (!waitObject.block(8000))
            {
                throw new NoSuitableGraphicsDeviceException("cannot create GLSurfaceView");
            }

            var clientBounds = GameRunner.Singleton.ClientBounds;

            if (SurfaceWidth != clientBounds.Width || SurfaceHeight != clientBounds.Height)
            {
                // while not common, it is possible for the screen to rotate,
                // between the time the Window/GameRunner is created, and the
                // time the renderer is created.  we want to identify this.
                if (actionOnChanged != null)
                {
                    actionOnChanged();
                }
            }
        }
示例#21
0
        /// <summary>
        /// Returns the available screensize, including status bar and navigation bar </summary>
        public static Size getScreenSize(Activity context)
        {
            Display display = context.WindowManager.DefaultDisplay;
            int realWidth;
            int realHeight;

            if (Build.VERSION.SDK_INT >= 17)
            {
                DisplayMetrics realMetrics = new DisplayMetrics();
                display.getRealMetrics(realMetrics);
                realWidth = realMetrics.widthPixels;
                realHeight = realMetrics.heightPixels;

            }
            else if (Build.VERSION.SDK_INT >= 14)
            {
                try
                {
                    Method mGetRawH = typeof(Display).GetMethod("getRawHeight");
                    Method mGetRawW = typeof(Display).GetMethod("getRawWidth");
                    realWidth = (int?) mGetRawW.invoke(display);
                    realHeight = (int?) mGetRawH.invoke(display);
                }
                catch (Exception e)
                {
                    //this may not be 100% accurate, but it's all we've got
                    realWidth = display.Width;
                    realHeight = display.Height;
                    Log.e("Display Info", "Couldn't use reflection to get the real display metrics.");
                }

            }
            else
            {
                //This should be close, as lower API devices should not have window navigation bars
                realWidth = display.Width;
                realHeight = display.Height;
            }

            return new Size(realWidth, realHeight);
        }
示例#22
0
        //
        // Create
        //

        public static IntPtr Create(android.app.Activity activity, Action onChanged,
                                    int redSize, int greenSize, int blueSize,
                                    int alphaSize, int depthSize, int stencilSize,
                                    int swapInterval, bool checkErrors)
        {
            for (;;)
            {
                lock (RendererObjects)
                {
                    var deviceId = java.lang.System.nanoTime();

                    foreach (var oldRendererObject in RendererObjects)
                    {
                        if (oldRendererObject.deviceId == deviceId)
                        {
                            deviceId = 0;
                            break;
                        }
                    }

                    if (deviceId == 0)
                    {
                        java.lang.Thread.sleep(1);
                        continue;
                    }

                    RendererObjects.Insert(0, new RendererObject()
                    {
                        deviceId = deviceId,
                        renderer = new Renderer(activity, onChanged,
                                                redSize, greenSize, blueSize,
                                                alphaSize, depthSize, stencilSize,
                                                swapInterval, checkErrors),
                        activity = new [email protected](activity),
                    });

                    return((IntPtr)deviceId);
                }
            }
        }
示例#23
0
        static void Show(android.app.Activity activity, string text,
                         System.Action <DialogResult> onClick)
        {
            activity.runOnUiThread(((java.lang.Runnable.Delegate)(() => {
                var dlg = new android.app.AlertDialog.Builder(activity);
                dlg.setPositiveButton((java.lang.CharSequence)(object) "Close",
                                      ((android.content.DialogInterface.OnClickListener.Delegate)
                                           ((dialog, which) =>
                                           { Showing = false; onClick(DialogResult.Yes); }
                                           )).AsInterface());
                dlg.setOnDismissListener(
                    ((android.content.DialogInterface.OnDismissListener.Delegate)
                         ((dialog) =>
                         { Showing = false; onClick(DialogResult.Cancel); }
                         )).AsInterface());
                dlg.create();
                dlg.setMessage((java.lang.CharSequence)(object) text);

                Showing = true;
                dlg.show();
            })).AsInterface());
        }
示例#24
0
 public virtual global::android.accounts.AccountManagerFuture getAuthToken(android.accounts.Account arg0, java.lang.String arg1, android.os.Bundle arg2, android.app.Activity arg3, android.accounts.AccountManagerCallback arg4, android.os.Handler arg5)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapIJavaObject <global::android.accounts.AccountManagerFuture>(@__env.CallObjectMethod(this.JvmHandle, global::android.accounts.AccountManager._getAuthToken80, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg5))) as android.accounts.AccountManagerFuture);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapIJavaObject <global::android.accounts.AccountManagerFuture>(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.accounts.AccountManager.staticClass, global::android.accounts.AccountManager._getAuthToken80, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg5))) as android.accounts.AccountManagerFuture);
     }
 }
示例#25
0
 public virtual void execStartActivities(android.content.Context who, android.os.IBinder
                                         contextThread, android.os.IBinder token, android.app.Activity target, android.content.Intent
                                         [] intents)
 {
     throw new System.NotImplementedException();
 }
示例#26
0
 public virtual global::android.accounts.AccountManagerFuture confirmCredentials(android.accounts.Account arg0, android.os.Bundle arg1, android.app.Activity arg2, android.accounts.AccountManagerCallback arg3, android.os.Handler arg4)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapIJavaObject <global::android.accounts.AccountManagerFuture>(@__env.CallObjectMethod(this.JvmHandle, global::android.accounts.AccountManager._confirmCredentials78, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4))) as android.accounts.AccountManagerFuture);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapIJavaObject <global::android.accounts.AccountManagerFuture>(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.accounts.AccountManager.staticClass, global::android.accounts.AccountManager._confirmCredentials78, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg4))) as android.accounts.AccountManagerFuture);
     }
 }
示例#27
0
 public virtual void callActivityOnSaveInstanceState(android.app.Activity activity
                                                     , android.os.Bundle outState)
 {
     throw new System.NotImplementedException();
 }
示例#28
0
 public virtual void callActivityOnUserLeaving(android.app.Activity activity)
 {
     throw new System.NotImplementedException();
 }
示例#29
0
 public ChatListAdapter(Query @ref, Activity activity, int layout, string mUsername) : base(@ref, typeof(Chat), layout, activity)
 {
     this.mUsername = mUsername;
 }
示例#30
0
		internal void setParent(android.app.Activity parent)
		{
			mParent = parent;
		}
示例#31
0
		public ActionBarImpl(android.app.Activity activity)
		{
			mHideListener = new _AnimatorListenerAdapter_108(this);
			mShowListener = new _AnimatorListenerAdapter_125(this);
			mActivity = activity;
			android.view.Window window = activity.getWindow();
			android.view.View decor = window.getDecorView();
			init(decor);
			if (!mActivity.getWindow().hasFeature(android.view.Window.FEATURE_ACTION_BAR_OVERLAY
				))
			{
				mContentView = decor.findViewById(android.R.id.content);
			}
		}
示例#32
0
 public virtual bool invokeContextMenuAction(android.app.Activity targetActivity,
                                             int id, int flag)
 {
     throw new System.NotImplementedException();
 }
示例#33
0
 internal bool match(android.content.Context who, android.app.Activity activity, android.content.Intent
                     intent)
 {
     throw new System.NotImplementedException();
 }
示例#34
0
 internal virtual void updateActivity(android.app.Activity activity)
 {
     throw new System.NotImplementedException();
 }
示例#35
0
			internal ActivityClientRecord()
			{
				// List of new activities (via ActivityRecord.nextIdle) that should
				// be reported when next we idle.
				// Number of activities that are currently visible on-screen.
				// set of instantiated backup agents, keyed by package name
				// These can be accessed by multiple threads; mPackages is the lock.
				// XXX For now we keep around information about all packages we have
				// seen, not removing entries from this map.
				// NOTE: The activity manager in its process needs to call in to
				// ActivityThread to do things like update resource configurations,
				// which means this lock gets held while the activity manager holds its
				// own lock.  Thus you MUST NEVER call back into the activity manager
				// or anything that depends on it while holding this lock.
				// The lock of mProviderMap protects the following variables.
				// set once in main()
				parent = null;
				embeddedID = null;
				paused = false;
				stopped = false;
				hideForNow = false;
				nextIdle = null;
			}
示例#36
0
 public void setOwnerActivity(android.app.Activity activity)
 {
     throw new System.NotImplementedException();
 }
示例#37
0
 public virtual void callActivityOnNewIntent(android.app.Activity activity, android.content.Intent
                                             intent)
 {
     throw new System.NotImplementedException();
 }
示例#38
0
		internal void attach(android.content.Context context, android.app.ActivityThread 
			aThread, android.app.Instrumentation instr, android.os.IBinder token, int ident, 
			android.app.Application application, android.content.Intent intent, android.content.pm.ActivityInfo
			 info, java.lang.CharSequence title, android.app.Activity parent, string id, android.app.Activity
			.NonConfigurationInstances lastNonConfigurationInstances, android.content.res.Configuration
			 config)
		{
			attachBaseContext(context);
			mFragments.attachActivity(this);
			mWindow = [email protected](this);
			mWindow.setCallback(this);
			mWindow.getLayoutInflater().setPrivateFactory(this);
			if (info.softInputMode != android.view.WindowManagerClass.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED)
			{
				mWindow.setSoftInputMode(info.softInputMode);
			}
			if (info.uiOptions != 0)
			{
				mWindow.setUiOptions(info.uiOptions);
			}
			mUiThread = java.lang.Thread.currentThread();
			mMainThread = aThread;
			mInstrumentation = instr;
			mToken = token;
			mIdent = ident;
			mApplication = application;
			mIntent = intent;
			mComponent = intent.getComponent();
			mActivityInfo = info;
			mTitle = title;
			mParent = parent;
			mEmbeddedID = id;
			mLastNonConfigurationInstances = lastNonConfigurationInstances;
			mWindow.setWindowManager(null, mToken, mComponent.flattenToString(), (info.flags 
				& android.content.pm.ActivityInfo.FLAG_HARDWARE_ACCELERATED) != 0);
			if (mParent != null)
			{
				mWindow.setContainer(mParent.getWindow());
			}
			mWindowManager = mWindow.getWindowManager();
			mCurrentConfig = config;
		}
示例#39
0
 /// <summary>
 /// Perform calling of an activity's
 /// <see cref="Activity.onStart()">Activity.onStart()</see>
 /// method.  The default implementation simply calls through to that method.
 /// </summary>
 /// <param name="activity">The activity being started.</param>
 public virtual void callActivityOnStart(android.app.Activity activity)
 {
     activity.onStart();
 }