本文整理汇总了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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
}
}