Comments (6)
Great! Thanks of lot for the advice and for the snippet!
from ane-packagemanager.
Sounds like you might want to consider using Google Play Licensing?
This functionality is available for free through our Google Play Services libs:
Alternatively you can use this extension to check the installer package name which should be set to com.android.vending
if an application was installed through the Play Store :
var installer:String = PackageManager.service.getInstallerPackageName();
if (installer == "com.android.vending")
{
// Installed from the play store
}
from ane-packagemanager.
Is there a difference between both solutions, in terms of security or reliability? At first sight, the one with PackageManager seems simpler to implement. Additionally, can the script that you suggested block "legit" users inadvertently? What I plan to do is: if the app doesn't come from the Play Store => the user cannot make in app purchases
from ane-packagemanager.
That definitely is a reasonable approach and one we have used in the past.
I just mentioned the licensing approach as it is a more "official" way of checking the legitimacy of an install.
from ane-packagemanager.
In the end, some fraudulent APKs still have the "com.android.vending" as installer, so I'm trying to implement the licensing method but it's not working. Here is some feedback:
- Using the code in the related github, I get the errorcode 6
- I used APM, and the generated app descriptor doesn't add
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
. Is it an issue? - I generated a random SALT that is stored in the APK, as mentionned on the wiki. Do I need to put it somewhere else? Is there something to do in the google play console?
from ane-packagemanager.
Yeah there isn't an apm package setup for this so you'll need to add the permissions into a project config or manually.
You'll need to work through the setup process outlined here as well: https://developer.android.com/google/play/licensing/setting-up
from ane-packagemanager.
Related Issues (12)
- PackageManager Android 64bit support HOT 1
- PackageManager.service.validateSignature(signature) HOT 2
- APP - different ANDROID versions, different behavior HOT 4
- Error: uses-sdk:minSdkVersion 21 cannot be smaller than version 23 HOT 3
- Issue when trying to install an apk on older devices HOT 10
- AndroidX migration
- getUserApps get list of installed user apps HOT 4
- What is the minimum Android version supported? HOT 4
- Feature request HOT 3
- Main app shutdown when I check install from unknown source in app settings HOT 7
- Error # Need to declare android.permission.REQUEST_INSTALL_PACKAGES to call this api HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ane-packagemanager.