D
Size: a a a
D
D
Code/data sharing through permissions: Android provides signature-based permissions enforcement, so that an app can expose functionality to another app that is signed with a specified certificate. By signing multiple APKs with the same certificate and using signature-based permissions checks, your apps can share code and data in a secure manner.
Context oldPackageContext = context.createPackageContext("old.package.context", 0);
final File oldDBPath = oldPackageContext.getDatabasePath(databaseName);
final InputStream inputStream = new FileInputStream(oldDBPath);
java.io.FileNotFoundException: /data/user/0/old.package.name/databases/oldbase.db (Permission denied)
KI
Code/data sharing through permissions: Android provides signature-based permissions enforcement, so that an app can expose functionality to another app that is signed with a specified certificate. By signing multiple APKs with the same certificate and using signature-based permissions checks, your apps can share code and data in a secure manner.
Context oldPackageContext = context.createPackageContext("old.package.context", 0);
final File oldDBPath = oldPackageContext.getDatabasePath(databaseName);
final InputStream inputStream = new FileInputStream(oldDBPath);
java.io.FileNotFoundException: /data/user/0/old.package.name/databases/oldbase.db (Permission denied)
VD
Code/data sharing through permissions: Android provides signature-based permissions enforcement, so that an app can expose functionality to another app that is signed with a specified certificate. By signing multiple APKs with the same certificate and using signature-based permissions checks, your apps can share code and data in a secure manner.
Context oldPackageContext = context.createPackageContext("old.package.context", 0);
final File oldDBPath = oldPackageContext.getDatabasePath(databaseName);
final InputStream inputStream = new FileInputStream(oldDBPath);
java.io.FileNotFoundException: /data/user/0/old.package.name/databases/oldbase.db (Permission denied)
D
D
D
D
D
oldPackageContext.openFileInput()
, но тут такая же засада как с FileProvider, только из папки files можно читать файлы.D
D
VS
VS
VS
R
R
R
D
GP
AV