Skip to content

Commit

Permalink
[VXP]: Feature, Google service support.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Jun 9, 2018
1 parent 1f2e3ea commit 0d27afb
Show file tree
Hide file tree
Showing 8 changed files with 484 additions and 29 deletions.
412 changes: 412 additions & 0 deletions VirtualApp/app/src/main/java/io/virtualapp/gms/FakeGms.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import io.virtualapp.R;
import io.virtualapp.abs.ui.VUiKit;
import io.virtualapp.gms.FakeGms;
import io.virtualapp.home.ListAppActivity;
import moe.feng.alipay.zerosdk.AlipayZeroSdk;

Expand Down Expand Up @@ -211,27 +212,16 @@ public void onCreate(Bundle savedInstanceState) {
}
});

/*
SwitchPreference installGms = (SwitchPreference) findPreference(INSTALL_GMS_KEY);
installGms.setOnPreferenceChangeListener(((preference, newValue) -> {
if (!(newValue instanceof Boolean)) {
return false;
}
boolean install = (boolean) newValue;
if (install) {
if (!GmsSupport.isOutsideGoogleFrameworkExist()) {
Toast.makeText(getActivity(), "Sorry, your phone has no GMS supported.", Toast.LENGTH_SHORT).show();
return false;
}
Toast.makeText(getActivity(), "Coming soon.", Toast.LENGTH_SHORT).show();
// Installd.addGmsSupport();
return false;
Preference installGms = findPreference(INSTALL_GMS_KEY);
installGms.setOnPreferenceClickListener(preference -> {
boolean alreadyInstalled = FakeGms.isAlreadyInstalled(getActivity());
if (alreadyInstalled) {
FakeGms.uninstallGms(getActivity());
} else {
// TODO, delete.
FakeGms.installGms(getActivity());
}
return false;
}));*/
return true;
});

copyFile.setOnPreferenceClickListener((preference -> {
Context context = getActivity();
Expand Down
13 changes: 12 additions & 1 deletion VirtualApp/app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<string name="advance_settings_directly_back_summary">Retornar al lanzador del sistema en vez del lanzador vitual cuando se está en una aplicación virtualizada.\n(Reiniciar VirtualXposed para que los cambios surtan efecto)</string>
<string name="install_self_eggs">Chico, tu idea es prometedora :)</string>
<string name="about_feedback_tel_title">Grupo de Telegram: %1$s</string>
<string name="advance_settings_install_gms">Instalar Servicios de Google</string>
<string name="advance_settings_install_gms">Instalar / Desinstalar servicios de Google</string>
<string name="advance_settings_copy_file">Copiar archivo</string>
<string name="advance_settings_yield_mode_summary">Activar esta opción para un balance entre estabilidad y compatibilidad</string>
<string name="advance_settings_yield_mode">Modo conservativo</string>
Expand All @@ -147,4 +147,15 @@
<string name="permission_denied_tips_content">Aplicación: %1$s no concede el permiso necesario, no se puede iniciar. Dirígete a la administración de permisos de tu dispositivo y dale permisos.</string>
<string name="permission_denied_ok">Lanzamiento fallido</string>
<string name="list_app_access_external_storage">Si desea instalar apk desde el almacenamiento externo, dele el permiso a VirtualXposed.</string>
<string name="install_gms_title"></string>
<string name="install_gms_content">El servicio de Google es compatible con microG, VirtualXposed está a punto de descargar un archivo (2M) y puede consumir más batería, ¿le gustaría instalarlo?</string>
<string name="install_gms_fail_title">Instalación fallida</string>
<string name="install_gms_fail_content">Instalar Google Service falló automáticamente, también puede instalarlo manualmente.</string>
<string name="install_gms_fail_ok">Manual de instalación</string>
<string name="uninstall_gms_title">Desinstalar el servicio de Google</string>
<string name="uninstall_gms_content">¿Desea desinstalar el servicio de Google? puedes reinstalarlo más tarde.</string>
<string name="uninstall_gms_ok">Desinstalar, confirmar</string>
<string name="install_gms_alreay_installed">El servicio de Google ha sido instalado.</string>
<string name="install_gms_success">¡El servicio de Google se ha instalado con éxito!</string>
<string name="uninstall_gms_success">El servicio de Google ha sido desinstalado con éxito.</string>
</resources>
13 changes: 12 additions & 1 deletion VirtualApp/app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<string name="advance_settings_directly_back">Directement en arrière</string>
<string name="advance_settings_directly_back_summary">Revenir au lanceur système au lieu du lanceur virtuel dans une application virtuelle.\n(Redémarrer VirtualXposed pour prendre en compte le changement.)</string>
<string name="install_self_eggs">Mec, Ton idée est prometteuse. :)</string>
<string name="advance_settings_install_gms">Installer Services Google</string>
<string name="advance_settings_install_gms">Installer / Désinstaller les services Google</string>
<string name="about_feedback_tel_title">Group Telegram: %1$s</string>
<string name="advance_settings_copy_file">Copier fichier</string>
<string name="advance_settings_yield_mode_summary">Ouvrir ceci pour un compromis entre la stabilité et la compatibilité.</string>
Expand All @@ -147,4 +147,15 @@
<string name="permission_denied_tips_content">App: %1$s n\'accorde pas l\'autorisation nécessaire, il ne peut pas être lancé. Veuillez accéder à la gestion des autorisations de votre appareil et lui accorder des autorisations.</string>
<string name="permission_denied_ok">Le lancement a échoué.</string>
<string name="list_app_access_external_storage">Si vous voulez installer apk à partir d\'un espace de stockage externe, veuillez donner à VirtualXposed la permission.</string>
<string name="install_gms_title" />
<string name="install_gms_content">Le service Google est pris en charge par microG, VirtualXposed est sur le point de télécharger un fichier (2M), et il peut consommer plus de batterie, souhaitez-vous l\'installer?</string>
<string name="install_gms_fail_title">Installation échouée</string>
<string name="install_gms_fail_content">L\'installation de Google Service a échoué automatiquement, vous pouvez également l\'installer manuellement.</string>
<string name="install_gms_fail_ok">Installation manuelle</string>
<string name="uninstall_gms_title">Désinstaller le service Google</string>
<string name="uninstall_gms_content">Voulez-vous désinstaller Google Service? vous pouvez le réinstaller plus tard.</string>
<string name="uninstall_gms_ok">Désinstaller, confirmer</string>
<string name="install_gms_alreay_installed">Le service Google a été installé.</string>
<string name="install_gms_success">Le service Google a été installé avec succès !!</string>
<string name="uninstall_gms_success">Le service Google a été désinstallé avec succès !!</string>
</resources>
12 changes: 12 additions & 0 deletions VirtualApp/app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,16 @@
<string name="permission_denied_tips_content">Приложение: %1$s не предоставляет необходимое разрешение, его не запускать. Перейдите к управлению разрешения вашего устройства и дайте ему разрешения.</string>
<string name="permission_denied_ok">Запуск завершился неудачно.</string>
<string name="list_app_access_external_storage">Если вы хотите установить apk из внешнего хранилища, пожалуйста, дайте VirtualXposed разрешение.</string>
<string name="install_gms_title" />
<string name="install_gms_content">Служба Google поддерживается microG, VirtualXposed собирается загрузить некоторый файл (2M), и он может потреблять больше батареи, хотите ли вы его установить?</string>
<string name="install_gms_fail_title">Ошибка установки</string>
<string name="install_gms_fail_content">Устанавливать службу Google автоматически не удалось, вы также можете установить ее вручную.</string>
<string name="install_gms_fail_ok">Ручная установка</string>
<string name="uninstall_gms_title">Удаление службы Google</string>
<string name="uninstall_gms_content">Удалить службу Google? вы можете переустановить его позже.</string>
<string name="uninstall_gms_ok">Удалить, подтвердить</string>
<string name="install_gms_alreay_installed">Служба Google установлена.</string>
<string name="install_gms_success">Служба Google установлена успешно!</string>
<string name="uninstall_gms_success">Служба Google успешно удалена!</string>
<string name="advance_settings_install_gms">Installer / Désinstaller les services Google</string>
</resources>
12 changes: 11 additions & 1 deletion VirtualApp/app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<string name="advance_settings_directly_back">直接返回</string>
<string name="advance_settings_directly_back_summary">内部APP退出时,直接返回到系统桌面而不是VirtualXposed的虚拟桌面(强制停止VirtualXposed后生效)</string>
<string name="install_self_eggs">小伙子,你这个想法很有前途 :)</string>
<string name="advance_settings_install_gms">安装Google服务框架</string>
<string name="advance_settings_install_gms">安装/移除Google服务</string>
<string name="about_feedback_tel_title">Telegram 群组: %1$s</string>
<string name="advance_settings_copy_file">内部文件复制</string>
<string name="advance_settings_yield_mode_summary">开启这个开关,可能会提高VirtualXposed的稳定性,但同时会失去对插件的一些兼容性。</string>
Expand All @@ -143,4 +143,14 @@
<string name="permission_denied_tips_content">%1$s 没有获取到某些运行必须要使用的权限;它不支持动态申请权限. 请去您设备的系统权限管理中赋予 VirtualXposed 必要权限。</string>
<string name="permission_denied_ok">启动失败</string>
<string name="list_app_access_external_storage">如果你想把SD中的APK安装到 VirtualXposed,请赋予它外部存储权限。</string>
<string name="install_gms_title">安装Google服务</string>
<string name="install_gms_content">Google 服务是通过 micorG 支持的,需要下载 2M 左右的文件,安装完之后耗电量可能会增加,确认需要安装吗?</string>
<string name="install_gms_fail_title">安装失败</string>
<string name="install_gms_fail_content">自动安装Google 服务失败,你可以参考教程手动安装。</string>
<string name="install_gms_fail_ok">查看教程</string>
<string name="uninstall_gms_title">移除Google服务</string>
<string name="uninstall_gms_content">确定要移除 Google 服务吗?需要的时候你可以重新安装它。</string>
<string name="uninstall_gms_ok">确认移除</string>
<string name="install_gms_success">Google 服务已经安装成功!!</string>
<string name="uninstall_gms_success">Google服务已经移除成功!!</string>
</resources>
13 changes: 12 additions & 1 deletion VirtualApp/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<string name="advance_settings_directly_back">Directly back</string>
<string name="advance_settings_directly_back_summary">Go back to the system launcher instead of the virtual launcher when in a virtual app.\n(Restart VirtualXposed to take effect.)</string>
<string name="install_self_eggs">Boy, your idea is promising :)</string>
<string name="advance_settings_install_gms">Install Google Services</string>
<string name="advance_settings_install_gms">Install/Uninstall Google Services</string>
<string name="about_feedback_tel_title">Telegram Group: %1$s</string>
<string name="advance_settings_copy_file">Copy File</string>
<string name="advance_settings_yield_mode_summary">Open this for a trade-off between stability and compatibility.</string>
Expand All @@ -149,4 +149,15 @@
<string name="permission_denied_tips_content">App: %1$s doesn\'t grant necessary permission, it cann\'t be launched. Please go to your device\'s permission management and give it permissions.</string>
<string name="permission_denied_ok">Launch failed.</string>
<string name="list_app_access_external_storage">If you want to install apk from external storage, please give VirtualXposed the permission.</string>
<string name="install_gms_title" >Install Google Service</string>
<string name="install_gms_content">The Google Service is supported by microG, VirtualXposed is about to download some file(2M), and it may consume more battery, would you like to install it?</string>
<string name="install_gms_fail_title">Install failed</string>
<string name="install_gms_fail_content">Install Google Service automatically failed, you can also install it manually.</string>
<string name="install_gms_fail_ok">Manual Install</string>
<string name="uninstall_gms_title">Uninstall Google Service</string>
<string name="uninstall_gms_content">Would you like to uninstall Google Service? you can reinstall it later.</string>
<string name="uninstall_gms_ok">Uninstall, Confirm</string>
<string name="install_gms_alreay_installed">The Google Service has been installed.</string>
<string name="install_gms_success">Google Service has been installed successfully!!</string>
<string name="uninstall_gms_success">Google Service has been uninstalled successfully!!</string>
</resources>
10 changes: 4 additions & 6 deletions VirtualApp/app/src/main/res/xml/settings_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@
android:key="settings_advance"
android:title="@string/settings_advance">

<!--<SwitchPreference-->
<!--android:defaultValue="false"-->
<!--android:visibility="gone"-->
<!--android:key="advance_settings_install_gms"-->
<!--android:persistent="true"-->
<!--android:title="@string/advance_settings_install_gms" />-->
<Preference
android:key="advance_settings_install_gms"
android:persistent="false"
android:title="@string/advance_settings_install_gms"/>

<Preference
android:key="advance_settings_copy_file"
Expand Down

0 comments on commit 0d27afb

Please sign in to comment.