当前位置: 首页>>代码示例>>Java>>正文


Java Runtime.init方法代码示例

本文整理汇总了Java中mono.android.Runtime.init方法的典型用法代码示例。如果您正苦于以下问题:Java Runtime.init方法的具体用法?Java Runtime.init怎么用?Java Runtime.init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mono.android.Runtime的用法示例。


在下文中一共展示了Runtime.init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: LoadApplication

import mono.android.Runtime; //导入方法依赖的package包/类
public static void LoadApplication (Context context, ApplicationInfo runtimePackage, String[] apks)
{
	synchronized (lock) {
		if (context instanceof android.app.Application) {
			Context = context;
		}
		if (!initialized) {
			android.content.IntentFilter timezoneChangedFilter  = new android.content.IntentFilter (
					android.content.Intent.ACTION_TIMEZONE_CHANGED
			);
			context.registerReceiver (new mono.android.app.NotifyTimeZoneChanges (), timezoneChangedFilter);
			
			System.loadLibrary("monodroid");
			Locale locale       = Locale.getDefault ();
			String language     = locale.getLanguage () + "-" + locale.getCountry ();
			String filesDir     = context.getFilesDir ().getAbsolutePath ();
			String cacheDir     = context.getCacheDir ().getAbsolutePath ();
			String dataDir      = getNativeLibraryPath (context);
			ClassLoader loader  = context.getClassLoader ();

			Runtime.init (
					language,
					apks,
					getNativeLibraryPath (runtimePackage),
					new String[]{
						filesDir,
						cacheDir,
						dataDir,
					},
					loader,
					new java.io.File (
						android.os.Environment.getExternalStorageDirectory (),
						"Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath (),
					MonoPackageManager_Resources.Assemblies,
					context.getPackageName ());
			
			mono.android.app.ApplicationRegistration.registerApplications ();
			
			initialized = true;
		}
	}
}
 
开发者ID:KilianCorbel,项目名称:timeout,代码行数:43,代码来源:MonoPackageManager.java

示例2: LoadApplication

import mono.android.Runtime; //导入方法依赖的package包/类
public static void LoadApplication (Context context, ApplicationInfo runtimePackage, String[] apks)
{
	synchronized (lock) {
		if (!initialized) {
			System.loadLibrary("monodroid");
			Locale locale       = Locale.getDefault ();
			String language     = locale.getLanguage () + "-" + locale.getCountry ();
			String filesDir     = context.getFilesDir ().getAbsolutePath ();
			String cacheDir     = context.getCacheDir ().getAbsolutePath ();
			String dataDir      = getNativeLibraryPath (context);
			ClassLoader loader  = context.getClassLoader ();

			Runtime.init (
					language,
					apks,
					getNativeLibraryPath (runtimePackage),
					new String[]{
						filesDir,
						cacheDir,
						dataDir,
					},
					loader,
					new java.io.File (
						android.os.Environment.getExternalStorageDirectory (),
						"Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath (),
					MonoPackageManager_Resources.Assemblies,
					context.getPackageName ());
			initialized = true;
		}
	}
}
 
开发者ID:rlingineni,项目名称:Xamarin.Forms-ChatMessenger,代码行数:32,代码来源:MonoPackageManager.java

示例3: LoadApplication

import mono.android.Runtime; //导入方法依赖的package包/类
public static void LoadApplication (Context context, ApplicationInfo runtimePackage, String[] apks)
{
	synchronized (lock) {
		if (!initialized) {
			android.content.IntentFilter timezoneChangedFilter  = new android.content.IntentFilter (
					android.content.Intent.ACTION_TIMEZONE_CHANGED
			);
			context.registerReceiver (new mono.android.app.NotifyTimeZoneChanges (), timezoneChangedFilter);
			Context = context;
			
			System.loadLibrary("monodroid");
			Locale locale       = Locale.getDefault ();
			String language     = locale.getLanguage () + "-" + locale.getCountry ();
			String filesDir     = context.getFilesDir ().getAbsolutePath ();
			String cacheDir     = context.getCacheDir ().getAbsolutePath ();
			String dataDir      = getNativeLibraryPath (context);
			ClassLoader loader  = context.getClassLoader ();

			Runtime.init (
					language,
					apks,
					getNativeLibraryPath (runtimePackage),
					new String[]{
						filesDir,
						cacheDir,
						dataDir,
					},
					loader,
					new java.io.File (
						android.os.Environment.getExternalStorageDirectory (),
						"Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath (),
					MonoPackageManager_Resources.Assemblies,
					context.getPackageName ());
			
			mono.android.app.ApplicationRegistration.registerApplications ();
			
			initialized = true;
		}
	}
}
 
开发者ID:pabiagioli,项目名称:xamarin-forms-toolbar,代码行数:41,代码来源:MonoPackageManager.java

示例4: LoadApplication

import mono.android.Runtime; //导入方法依赖的package包/类
public static void LoadApplication (Context context, String runtimeDataDir, String[] apks)
{
	synchronized (lock) {
		if (!initialized) {
			System.loadLibrary("monodroid");
			Locale locale       = Locale.getDefault ();
			String language     = locale.getLanguage () + "-" + locale.getCountry ();
			String filesDir     = context.getFilesDir ().getAbsolutePath ();
			String cacheDir     = context.getCacheDir ().getAbsolutePath ();
			String dataDir      = context.getApplicationInfo ().dataDir + "/lib";
			ClassLoader loader  = context.getClassLoader ();

			Runtime.init (
					language,
					apks,
					runtimeDataDir,
					new String[]{
						filesDir,
						cacheDir,
						dataDir,
					},
					loader,
					new java.io.File (
						android.os.Environment.getExternalStorageDirectory (),
						"Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath (),
					MonoPackageManager_Resources.Assemblies,
					context.getPackageName ());
			initialized = true;
		}
	}
}
 
开发者ID:chrispellett,项目名称:Xamarin-Forms-Shape,代码行数:32,代码来源:MonoPackageManager.java

示例5: LoadApplication

import mono.android.Runtime; //导入方法依赖的package包/类
public static void LoadApplication (Context context, String runtimeDataDir, String[] apks)
{
	synchronized (lock) {
		if (!initialized) {
			System.loadLibrary("monodroid");
			Locale locale       = Locale.getDefault ();
			String language     = locale.getLanguage () + "-" + locale.getCountry ();
			String filesDir     = context.getFilesDir ().getAbsolutePath ();
			String cacheDir     = context.getCacheDir ().getAbsolutePath ();
			String dataDir      = context.getApplicationInfo ().dataDir + "/lib";
			ClassLoader loader  = context.getClassLoader ();

			Runtime.init (
					language,
					apks,
					runtimeDataDir,
					new String[]{
						filesDir,
						cacheDir,
						dataDir,
					},
					loader,
					new java.io.File (
						android.os.Environment.getExternalStorageDirectory (),
						"Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath (),
					MonoPackageManager_Resources.Assemblies);
			initialized = true;
		}
	}
}
 
开发者ID:xhackers,项目名称:Xhackers-Android-Hacks,代码行数:31,代码来源:MonoPackageManager.java

示例6: LoadApplication

import mono.android.Runtime; //导入方法依赖的package包/类
public static void LoadApplication (Context context, ApplicationInfo runtimePackage, String[] apks)
{
	synchronized (lock) {
		if (context instanceof android.app.Application) {
			Context = context;
		}
		if (!initialized) {
			android.content.IntentFilter timezoneChangedFilter  = new android.content.IntentFilter (
					android.content.Intent.ACTION_TIMEZONE_CHANGED
			);
			context.registerReceiver (new mono.android.app.NotifyTimeZoneChanges (), timezoneChangedFilter);
			
			System.loadLibrary("monodroid");
			Locale locale       = Locale.getDefault ();
			String language     = locale.getLanguage () + "-" + locale.getCountry ();
			String filesDir     = context.getFilesDir ().getAbsolutePath ();
			String cacheDir     = context.getCacheDir ().getAbsolutePath ();
			String dataDir      = getNativeLibraryPath (context);
			ClassLoader loader  = context.getClassLoader ();
			java.io.File external0 = android.os.Environment.getExternalStorageDirectory ();
			String externalDir = new java.io.File (
						external0,
						"Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath ();
			String externalLegacyDir = new java.io.File (
						external0,
						"../legacy/Android/data/" + context.getPackageName () + "/files/.__override__").getAbsolutePath ();

			Runtime.init (
					language,
					apks,
					getNativeLibraryPath (runtimePackage),
					new String[]{
						filesDir,
						cacheDir,
						dataDir,
					},
					loader,
					new String[] {
						externalDir,
						externalLegacyDir
					},
					MonoPackageManager_Resources.Assemblies,
					context.getPackageName ());
			
			mono.android.app.ApplicationRegistration.registerApplications ();
			
			initialized = true;
		}
	}
}
 
开发者ID:ankitpassi141,项目名称:Designer-Login-Signup-Template,代码行数:51,代码来源:MonoPackageManager.java


注:本文中的mono.android.Runtime.init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。