Hosts file for Ad Blocking - Samsung Galaxy Player 4.0, 5.0

Hi guys, I am presenting you the latest hosts file to block ad in apps. It works for me for all apps I installed on my player (Angry birds etc.).
How to use:
1. Download attached file and unzip it;
2. Copy the hosts file to your player;
3. Open system/etc with RE and replace the original hosts file and set permission "rw-r-r" (remeber mount R/W before and R/O afterwards);
4. Reboot and you'll enjoy ad free apps from now on.

Why not just use the adfree project? Or join it?
Sent from my Triumph using Tapatalk

Guess that's how ad free works. It patches hosts files.
Sent from my YP-G70 using xda premium

njguyc said:
Hi guys, I am presenting you the latest hosts file to block ad in apps. It works for me for all apps I installed on my player (Angry birds etc.).
How to use:
1. Download attached file and unzip it;
2. Copy the hosts file to your player;
3. Open system/etc with RE and replace the original hosts file and set permission "rw-r-r" (remeber mount R/W before and R/O afterwards);
4. Reboot and you'll enjoy ad free apps from now on.
Click to expand...
Click to collapse
Ad a developer i am disgusted with people blocking ads in their applications. I understand why you guys are doing this and yeh they can be really annoying! Blocking ads on a webpage is much more understanding than blocking from the application. Nowadays our screens are bigger than 4 inches, can you really not give up a little bit to help out the person that spends hours a week keeping up with a free application to make you happy. I spend hours a week writing my apps and I make NO PROFIT all the money I make from ads pays for my server costs.
I don't think people consider these things when they block ads. I'll admit I had ads blocked for a while but it's because the ROM I installed came with it.
Your not bad people for wanting to do this but please consider how morally incorrect it is to block these ads.If there is another developer reading this and also hates how people do this go ahead and add this to your MainActivity. It checks their hosts file for admob (or you can make it which ever ad you use) and if admob exists it pulls some tricker on the user. I've seen developers ask for SU in the app and then once they get it wipe all the admob lines from hosts file. Sorry guys but this needs to be done, your stealing from the developers.
BufferedReader in = null;
Boolean result = true;
try {
in = new BufferedReader(new InputStreamReader(new FileInputStream("/etc/hosts")));
String line;
while ((line = in.readLine()) != null)
{
if (line.contains("admob"))
{
result = false;
break;
}
}
} catch(Exception e){}
if(result == false){
Toast.makeText(getApplicationContext(),"admob detected in /etc/hosts", Toast.LENGTH_LONG).show();
adBlockerFound();
}
public void adblockerFound(){
/**
Do all the bad stuff here. I usually use a dialog and simply notify the user but I still let them use the application. I pretty much give them a guilt trip. But if you wanna be nasty you can do this.finish();
**/
}

TheWall279 said:
Ad a developer i am disgusted with people blocking ads in their applications. I understand why you guys are doing this and yeh they can be really annoying! Blocking ads on a webpage is much more understanding than blocking from the application. Nowadays our screens are bigger than 4 inches, can you really not give up a little bit to help out the person that spends hours a week keeping up with a free application to make you happy. I spend hours a week writing my apps and I make NO PROFIT all the money I make from ads pays for my server costs.
I don't think people consider these things when they block ads. I'll admit I had ads blocked for a while but it's because the ROM I installed came with it.
Your not bad people for wanting to do this but please consider how morally incorrect it is to block these ads.If there is another developer reading this and also hates how people do this go ahead and add this to your MainActivity. It checks their hosts file for admob (or you can make it which ever ad you use) and if admob exists it pulls some tricker on the user. I've seen developers ask for SU in the app and then once they get it wipe all the admob lines from hosts file. Sorry guys but this needs to be done, your stealing from the developers.
BufferedReader in = null;
Boolean result = true;
try {
in = new BufferedReader(new InputStreamReader(new FileInputStream("/etc/hosts")));
String line;
while ((line = in.readLine()) != null)
{
if (line.contains("admob"))
{
result = false;
break;
}
}
} catch(Exception e){}
if(result == false){
Toast.makeText(getApplicationContext(),"admob detected in /etc/hosts", Toast.LENGTH_LONG).show();
adBlockerFound();
}
public void adblockerFound(){
/**
Do all the bad stuff here. I usually use a dialog and simply notify the user but I still let them use the application. I pretty much give them a guilt trip. But if you wanna be nasty you can do this.finish();
**/
}
Click to expand...
Click to collapse
I understand and agree with you on the fact that these ads 'compensate' the effort. I test an app and buy the paid add-free version if I like the app and intend to keep using it.
Yet I use an ad-blocking hosts file, because I consider displaying ads eating up my data plan to be stealing from me and that I do have a right to refuse getting spamed on my phone (in the Web browser I mean).
But by no means can I accept nor agree with you when you say it is ok to request su rights and change the system (even if it's just modifying or removing the hosts file) without requesting permission and clearly stating what your app is about to do and the consequences this has, that is a troian-like behaviour and is totally inappropriate and plainly inacceptable !
Check for ad-blocking, if you find some, pop-up an alert saying you disagree and hereby refuse your app to run, that is all the right you have on my device when I agree to install your app.
So suggesting to " Do all the bad stuff here. I usually use a dialog and simply notify the user but I still let them use the application. I pretty much give them a guilt trip. But if you wanna be nasty you can do this. " is a no go, sorry !
JP.
Sent from my custom ARHD 11.0.0 / Yank555.lu JB kernel v1.3 (Linux 3.0.38) powered Samsung Galaxy S3 using xda premium

TheWall279 said:
Ad a developer i am disgusted with people blocking ads in their applications. I understand why you guys are doing this and yeh they can be really annoying! Blocking ads on a webpage is much more understanding than blocking from the application. Nowadays our screens are bigger than 4 inches, can you really not give up a little bit to help out the person that spends hours a week keeping up with a free application to make you happy. I spend hours a week writing my apps and I make NO PROFIT all the money I make from ads pays for my server costs.
I don't think people consider these things when they block ads. I'll admit I had ads blocked for a while but it's because the ROM I installed came with it.
Your not bad people for wanting to do this but please consider how morally incorrect it is to block these ads.If there is another developer reading this and also hates how people do this go ahead and add this to your MainActivity. It checks their hosts file for admob (or you can make it which ever ad you use) and if admob exists it pulls some tricker on the user. I've seen developers ask for SU in the app and then once they get it wipe all the admob lines from hosts file. Sorry guys but this needs to be done, your stealing from the developers.
BufferedReader in = null;
Boolean result = true;
try {
in = new BufferedReader(new InputStreamReader(new FileInputStream("/etc/hosts")));
String line;
while ((line = in.readLine()) != null)
{
if (line.contains("admob"))
{
result = false;
break;
}
}
} catch(Exception e){}
if(result == false){
Toast.makeText(getApplicationContext(),"admob detected in /etc/hosts", Toast.LENGTH_LONG).show();
adBlockerFound();
}
public void adblockerFound(){
/**
Do all the bad stuff here. I usually use a dialog and simply notify the user but I still let them use the application. I pretty much give them a guilt trip. But if you wanna be nasty you can do this.finish();
**/
}
Click to expand...
Click to collapse
I don't do it with every app, but in cases like angry birds then its absolutely necessary because the ads prevent you from doing stuff in game. With ads that don't get in the way of using the app it's fine but when you put ads in really inconvenient places that's when I go to patching that.

There's an easier way to block ads...... but ads help support the devs.
Sent from my SPH-D710

Thanks!!
Thank YOU!!!

TheWall279 said:
Ad a developer i am disgusted with people blocking ads in their applications. I understand why you guys are doing this and yeh they can be really annoying! Blocking ads on a webpage is much more understanding than blocking from the application. Nowadays our screens are bigger than 4 inches, can you really not give up a little bit to help out the person that spends hours a week keeping up with a free application to make you happy. I spend hours a week writing my apps and I make NO PROFIT all the money I make from ads pays for my server costs.
I don't think people consider these things when they block ads. I'll admit I had ads blocked for a while but it's because the ROM I installed came with it.
Your not bad people for wanting to do this but please consider how morally incorrect it is to block these ads.If there is another developer reading this and also hates how people do this go ahead and add this to your MainActivity. It checks their hosts file for admob (or you can make it which ever ad you use) and if admob exists it pulls some tricker on the user. I've seen developers ask for SU in the app and then once they get it wipe all the admob lines from hosts file. Sorry guys but this needs to be done, your stealing from the developers.
BufferedReader in = null;
Boolean result = true;
try {
in = new BufferedReader(new InputStreamReader(new FileInputStream("/etc/hosts")));
String line;
while ((line = in.readLine()) != null)
{
if (line.contains("admob"))
{
result = false;
break;
}
}
} catch(Exception e){}
if(result == false){
Toast.makeText(getApplicationContext(),"admob detected in /etc/hosts", Toast.LENGTH_LONG).show();
adBlockerFound();
}
public void adblockerFound(){
/**
Do all the bad stuff here. I usually use a dialog and simply notify the user but I still let them use the application. I pretty much give them a guilt trip. But if you wanna be nasty you can do this.finish();
**/
}
Click to expand...
Click to collapse
Doesn't work anymore on latest jelly bean retard. Screw your ads, oh yea, and permissions pro will straight smack down your weak ass app perm
P.s. there's other methods of ad blocking besides having a host file in system/ect. I just have crossbreader and have the target host file in a custom location. Boom, you're little hack can't find it. I will never have any ads and always be one step ahead with the latest and greatest

Or you can turn of data or WiFi
Sent from my YP-G70 using xda app-developers app

heet1 said:
Or you can turn of data or WiFi
Sent from my YP-G70 using xda app-developers app
Click to expand...
Click to collapse
You are right, but some apps have ads and need Wi-Fi. That is when you use adblock.

The Wall279, please list apps you develop so I can avoid them like the plague, please.
Sent from my YP-G70 using Tapatalk 2

heet1 said:
Or you can turn of data or WiFi
Sent from my YP-G70 using xda app-developers app
Click to expand...
Click to collapse
Cool you have the same device i do.How exactly do i "set permission "rw-r-r" (remeber mount R/W before and R/O afterwards);"?
I would really appreciate it.

heet1 said:
Or you can turn of data or WiFi
Sent from my YP-G70 using xda app-developers app
Click to expand...
Click to collapse
If I don't click on ads, the developer of the app that have ads get money or not?
If yes, I see that an ads is a webpage with no zoom on it (Times ago i saw an ads that were scrollable in my player and not scrollable in my n7000 ), can anyone make an ads invisible (or can run it in an under-game level (like photoshop)of an app?

Work on Debian ?

TheWall279 said:
if(result == false){
Click to expand...
Click to collapse
As a developer you should be ashamed of yourself.

Related

[Q] HTC Explorer android.net.sip support for developing apps

Can anyone please tell me if the phone HTC Explorer(HTC Explorer Product Overview - HTC Smartphones) allows the use of the android.net.sip API. What I mean is, will writing an application using that API work out of the box on that phone, without having to root the phone or modify android OS system files?
If anyone has this phone and would be kind enough to try a demo application like SipDemo or better yet try calling the static methods isApiSupported and isVoipSupported of the SipManager class to see if the API can be accessed, I would appreciate it very much.
To spare you some time, this is an activity that logs if the API is accessible or not:
Code:
package voip.test;
import android.app.Activity;
import android.net.sip.SipManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
public class SipTestActivity extends Activity {
private static final String TAG = "voip_test";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
if (SipManager.isApiSupported(this) && SipManager.isVoipSupported(this)) {
Log.d(TAG, "supported");
Toast.makeText(this, "supported", Toast.LENGTH_LONG).show();
} else {
Log.d(TAG, "not supported");
Toast.makeText(this, "not supported", Toast.LENGTH_LONG).show();
}
}
}
I have also attached a zip archive containing a self-signed application that uses the previous activity code and when run, logs and toasts the status of the API.
Any help with this, would be much appreciated! Thanks
heartbyte101 said:
Can anyone please tell me if the phone HTC Explorer(HTC Explorer Product Overview - HTC Smartphones) allows the use of the android.net.sip API. What I mean is, will writing an application using that API work out of the box on that phone, without having to root the phone or modify android OS system files?
If anyone has this phone and would be kind enough to try a demo application like SipDemo or better yet try calling the static methods isApiSupported and isVoipSupported of the SipManager class to see if the API can be accessed, I would appreciate it very much.
To spare you some time, this is an activity that logs if the API is accessible or not:
Code:
package voip.test;
import android.app.Activity;
import android.net.sip.SipManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
public class SipTestActivity extends Activity {
private static final String TAG = "voip_test";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
if (SipManager.isApiSupported(this) && SipManager.isVoipSupported(this)) {
Log.d(TAG, "supported");
Toast.makeText(this, "supported", Toast.LENGTH_LONG).show();
} else {
Log.d(TAG, "not supported");
Toast.makeText(this, "not supported", Toast.LENGTH_LONG).show();
}
}
}
I have also attached a zip archive containing a self-signed application that uses the previous activity code and when run, logs and toasts the status of the API.
Any help with this, would be much appreciated! Thanks
Click to expand...
Click to collapse
My phone says " Hello world, SipTestActivity".:beer:
From a HTC Explorer A310e using XDA.
Sent from a person who likes people pressing the thanks button.
ri123 said:
My phone says " Hello world, SipTestActivity".:beer:
From a HTC Explorer A310e using XDA.
Sent from a person who likes people pressing the thanks button.
Click to expand...
Click to collapse
My phone is rooted, although, sorry:thumbdown:
From a HTC Explorer A310e using XDA.
Sent from a person who likes people pressing the thanks button.
Thankyou very much for you answer, ri123, but I am looking to see if the API is available on non-rooted phones.
PS: when starting the application I attached, there should be a small toast message for a couple of seconds, near the bottom of the screen displaying either "supported" or "not supported", it is curious that you did not see it...I don't see anything wrong with the code, and it works on the emulator just fine.
But thanks anyway! Still searching for an answer to this question though...
ri123 said:
My phone is rooted, although, sorry:thumbdown:
From a HTC Explorer A310e using XDA.
Sent from a person who likes people pressing the thanks button.
Click to expand...
Click to collapse
Could you please tell me if, when you ran the SipTest app, it showed you a small Toast message saying "supported" or "not supported" in the lower half of the activity screen, and if so, what the message said?
I am asking you this question, because just acquyring root account on the phone, whithout modyfing files in /system/etc/permissions does not affect the SIP api in any way. So if you did not modify/add android.net.sip permission files in /system/etc/permissions after rooting, and now SipTest returns the "supported" message on the screen, then it should have also been accessible before rooting it.
I hope I phrased my question in an undertandable way. Please help me with answering this question. Thanks in advance, heartbyte101
heartbyte101 said:
Could you please tell me if, when you ran the SipTest app, it showed you a small Toast message saying "supported" or "not supported" in the lower half of the activity screen, and if so, what the message said?
I am asking you this question, because just acquyring root account on the phone, whithout modyfing files in /system/etc/permissions does not affect the SIP api in any way. So if you did not modify/add android.net.sip permission files in /system/etc/permissions after rooting, and now SipTest returns the "supported" message on the screen, then it should have also been accessible before rooting it.
I hope I phrased my question in an undertandable way. Please help me with answering this question. Thanks in advance, heartbyte101
Click to expand...
Click to collapse
There was a message saying "supported".
From a HTC Explorer A310e using XDA.
Sent from a person who likes people pressing the thanks button.
ri123 said:
There was a message saying "supported".
From a HTC Explorer A310e using XDA.
Sent from a person who likes people pressing the thanks button.
Click to expand...
Click to collapse
Thankyou for your help, ri123, I guess then the answer to my question should be YES, the API is available to develop applications.
If anyone else has some information regarding my question, or has used this device to develop apps and could shed some light on the status of the android.net.sip API on this device, please share, any additional information would help.
Thanks

ZXing library - intents not working

I am developing an app that needs to call "Barcode Scanner" using an Intent. Part of the ZXing library is the IntentIntegrator (http://code.google.com/p/zxing/sour...ion/src/com/google/zxing/integration/android/).
The IntentIntegrator allows me to use addExtra to the intent. My plan was to read whatever "extra" I added to the intent in the onActivityResult call after the barcode has been read. The problem is that the Barcode scanner application doesn`t return the extras to me after it reads the barcode.
This is my call to invoke the intent:
Code:
(...)if (v.equals(btBarcode)) {
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.setTitle(getString(R.string.app_name));
integrator.addExtra(Utils.EXTRA_MODO, "add");
integrator.initiateScan();
}
And then:
Code:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
// TODO Auto-generated method stub
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
if (scanResult != null) {
Bundle extras = intent.getExtras();
for (String key : extras.keySet())
Log.i("KEY_" + key, "value: " + extras.get(key).toString());
Log.i("extras", (extras != null) ? extras.toString() : "NULL");
String modo = (extras != null) ? extras.getString(Utils.EXTRA_MODO) : null;
Log.i("modo", (modo != null) ? modo : "NULL");
String barCode = scanResult.getContents();
if ((modo != null) && (barCode != null))
Log.d(modo, barCode);
}
}
None of the extras I set in the IntentIntegrator are being sent back to me. In the extras.keySet(), the only extras returned are from Zxing lib itself:
07-16 19:10:44.820: I/KEY_SCAN_RESULT(15500): value: 740617166453
07-16 19:10:44.825: I/KEY_SCAN_RESULT_FORMAT(15500): value: UPC_A
07-16 19:10:44.825: I/extras(15500): Bundle[{SCAN_RESULT=740617166453, SCAN_RESULT_FORMAT=UPC_A}]
07-16 19:10:44.825: I/modo(15500): NULL
Is this the way it is supposed to work (and thus I'll have to find a way to know what button of my app is calling the intent) or is it really a bug in the ZXIng library?
BTW, I've seeked help from the original developer of ZXing, Sean Owen, and he has been of absolutely no help. My original question is still in ZXing`s google group, but he doesn't seem to be making the littlest effort to understand the problem I`ve been having.
Thanks.
Never mind... I found a workaround.
My approach to the solution was to first acknowledge ZXing is buggy, so the solution wouldn't have to rely on it.
Anyhow, I never got any help from Sean Owen other than a very impolite reply. I am quite disappointed with him, because he is indeed a very intelligent man, but quite unwilling to help.
Mods, please close this thread.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Thanks ✟
Moving to Q&A
Simonetti2011 said:
Never mind... I found a workaround.
My approach to the solution was to first acknowledge ZXing is buggy, so the solution wouldn't have to rely on it.
Anyhow, I never got any help from Sean Owen other than a very impolite reply. I am quite disappointed with him, because he is indeed a very intelligent man, but quite unwilling to help.
Mods, please close this thread.
Click to expand...
Click to collapse
Uh, what? It's not at all buggy. As was explained to you several times on the zxing mailing list, you are expecting behavior that doesn't happen in Android. You expect that when you send an Intent, that the extras you attach to the Intent always come back in the reply Intent. They don't, in any Android app. It's kind of like expecting method calls to always return their args to you -- where have you ever observed that?
Anyone who looks for the thread titled "IntentIntegrator.addExtra() not working" on the zxing discussion group on July 13 will see the thread where I helped you -- never got any help eh? oops! (I'd post the link but the forum doesn't allow it.)
I welcome anyone to read your posts, and mine. Simonetti, what's impolite is not listening to the help you were freely given by the author. You didn't understand how Android works, and that's OK. What isn't cool is having a go at me on the maliing list, and then here, pretending the project is at fault.

[Q] AndroidAppHelper - No context. Alternatives?

Hey all,
I was attempting to get the hooked application's context with the following code:
Context moduleContext = AndroidAppHelper.currentApplication();
if(moduleContext == null)
Log.v("App", "BOOO");
else
Log.v("App", "WE GOT APP!");
I realised that when I place this snipper in handleloadpackage, moduleContext is null, however if I place it in the beforeHookedMethod for testing, it gets an application context. Are there any other suggestions for getting application context?
You cannot retrieve the application's context if the application is not in memory. handleLoadPackage is run when the package is loaded not the application. You are able to retrieve a context in beforeHookedMethod since the application is active and in memory (and therefore has a context) by that point. If you want to load an application's context as soon as it becomes available try hooking the Application.onCreate method.
If you need a context that is not dependent on an application's lifecycle then you can attempt to retrieve a system context. I have not found any particular issues with this method but if my understanding of the Android internals is correct it could potentially open you up to a memory leak. For what it's worth I've been using this method for quite some time when I need to and have yet to notice any issues. This will not work in initZygote.
Code:
Object activityThread = XposedHelpers.callStaticMethod(XposedHelpers.findClass("android.app.ActivityThread", null), "currentActivityThread");
Context systemCtx = (Context) XposedHelpers.callMethod(activityThread, "getSystemContext");
Hi Kevin M,
Thanks, I eventually ended up using the method that you described, hooking onCreate. Managed to get the context there, thanks though! Hopefully someone will find this post and this may help them too.
Regards,
han
Kevin M said:
You cannot retrieve the application's context if the application is not in memory. handleLoadPackage is run when the package is loaded not the application. You are able to retrieve a context in beforeHookedMethod since the application is active and in memory (and therefore has a context) by that point. If you want to load an application's context as soon as it becomes available try hooking the Application.onCreate method.
If you need a context that is not dependent on an application's lifecycle then you can attempt to retrieve a system context. I have not found any particular issues with this method but if my understanding of the Android internals is correct it could potentially open you up to a memory leak. For what it's worth I've been using this method for quite some time when I need to and have yet to notice any issues. This will not work in initZygote.
Code:
Object activityThread = XposedHelpers.callStaticMethod(XposedHelpers.findClass("android.app.ActivityThread", null), "currentActivityThread");
Context systemCtx = (Context) XposedHelpers.callMethod(activityThread, "getSystemContext");
Click to expand...
Click to collapse
bahbahboom said:
Hi Kevin M,
Thanks, I eventually ended up using the method that you described, hooking onCreate. Managed to get the context there, thanks though! Hopefully someone will find this post and this may help them too.
Regards,
Han
Click to expand...
Click to collapse
I recently found it out while working with dialogs, I thought it would fit here:
If you are making use of the context from onCreate multiple times, you might receive a BadTokenException error at displaying dialogs, etc if the hooked application was launched from the background. To counter this, place a hook in onResume and get the context again.
Sent from my iPhone 6 Plus using Tapatalk

Modify apnsettings.java to re-enable APN menu?

Last night I successfully compiled LineageOS 14.1 for my SPH-L720 / jfltespr S4. It works pretty darn well. I'm not really a developer but I know how to follow directions.
Trouble is that I use Freedompop, Sprint MVNO with a weird APN, and my usual method of flashing the Freedompop APNs (XDA post) doesn't work.
With the APN settings disabled, I don't have other convenient methods of tinkering with that, so my question is: Why not recompile my ROM to remove the restrictions on the APN menu?
Found the package here: apnsettings.java on Git
And I suspect the code to modify might be here:
Code:
@Override
public EnforcedAdmin getRestrictionEnforcedAdmin() {
final UserHandle user = UserHandle.of(mUserManager.getUserHandle());
if (mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS, user)
&& !mUserManager.hasBaseUserRestriction(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS,
user)) {
return EnforcedAdmin.MULTIPLE_ENFORCED_ADMIN;
}
return null;
}
So I'm really barely dipping my toe into development. Could someone offer a tip as to how to safely remove this restriction?
EDIT: OK! I think I have a clue.
All of the restrictions in this package are governed by the private boolean mUnavailable, which gets its value from isUiRestricted() . This boolean interacts with a lot of if-then statements in the package. If I wanted to be reckless and break things, I could probably just cut out all of the code that checks for that boolean.
Unless anyone objects, I'll try it and see what happens.
EDIT2: Hah, no, of course that didn't work. Terrible idea. Well I'll just poke around some more and edit here if I find something.

How to save users data individually and provide them if someone requests it

Hey, according to GDPR, the app should take the consent of users if they want the app to collect data about them or not? also if they can request their saved data anytime and the developer (app owner) is responsible for returning the app data.
How would I do that exactly? Is there any library doing that or something easy? Please let me know.
Thanks
waqasyounis334 said:
Hey, according to GDPR, the app should take the consent of users if they want the app to collect data about them or not? also if they can request their saved data anytime and the developer (app owner) is responsible for returning the app data.
How would I do that exactly? Is there any library doing that or something easy? Please let me know.
Thanks
Click to expand...
Click to collapse
It depends. What kind of data and app are we talking about? Analytics and crash reporting data? Most analytics and crash reporting services provide extensive informations about this topic.
the for GDPR form, Google has already published a library available on github for that
for your second question, you should allow the user to download its data, remove it... in other words, the user should have control over its data, this is only applicable if you're the host
Well, android lets you know if the user is from EU and in that case the Gdpr rules apply and you need to request consent from them if im not mistaken.
Code:
public void getconsentInf(){
consentInformation = ConsentInformation.getInstance(this);
String[] publisherIds = {"pub-..."};
consentInformation.requestConsentInfoUpdate(publisherIds, new ConsentInfoUpdateListener() {
@Override
public void onConsentInfoUpdated(ConsentStatus consentStatus) {
isEuropeanUser= ConsentInformation.getInstance(this).isRequestLocationInEeaOrUnknown();
// User's consent status successfully updated.
if(isEuropeanUser){
switch (consentStatus)
(...)
About delivering the information to the user, ive never saved the users information so im not sure, depends how your app is structured.

Categories

Resources