Exemplo n.º 1
0
 static jobject CreateInstance(JNIEnv* env,
                               NativeJSContainer* nativeObject) {
     InitJNI(env);
     const jobject newObject =
         env->NewObject(jNativeJSContainer, jContainerConstructor,
                        static_cast<jlong>(
                        reinterpret_cast<uintptr_t>(nativeObject)));
     AndroidBridge::HandleUncaughtException(env);
     MOZ_ASSERT(newObject);
     return newObject;
 }
Exemplo n.º 2
0
	Notification::Notification()
	{
		if ( !s_hClass )
		{
			InitJNI();
		}

		m_pNotificationBuilder = s_pEnv->NewObject( s_hClass, s_hConstructorMethod, Android::GetJNIActivity() );
		if ( m_pNotificationBuilder != NULL )
		{
			m_pNotificationBuilder = s_pEnv->NewGlobalRef( m_pNotificationBuilder );
		}
	}