Disable notification features for libraries

Is it possible for me to leave the optional jar library from the notifications ever sent?

I am an independent game developer and have recently contacted a publisher who wants to work with me. The conditions were fine, and now I have to implement my sdk ads in the game, and I am worried that they may use advertisements that are contrary to the developer's policy ( http://play.google.com/intl/en/about/ developer-content-policy.html Advertising Policy 3 "... Ads must not mimic or impersonate system notifications or warnings."). I do not want to risk blocking my publisher account.

+4
source share
3 answers

AFAIK there is no direct way to intercept the Notification display in your application.

But in my experience, if you need to integrate advertising-sdk , for them to display / receive notifications, they usually register <receivers> in AndroidManifest.xml or require all types of <permissions> . To do this, you need to add those actual <receivers> and <permissions> to your application, so if you do not declare them, a possible Receivers that will run Notifications will not work.

If you know that they start or run some Notifications , say when you start the application ... you can use NotificationManager.cancelAll() to cancel them.

Another thing I could do is access their source code and see if they are doing something โ€œevilโ€. If they ... try to break it or something.

+3
source

If you do not trust the provider of this JAR, do not post its code on the devices of your users. Show notifications is just one of the many heinous things he could do. You may mask his notifications, but you donโ€™t understand that he secretly collects confidential information for transmission over the Internet. Maybe it shows pornographic ads for users when your app is for children. Perhaps he is using a user device as part of a botnet or launching a user battery using bitcoins. Unable to detect any of these things.

You must make the author of the library describe the behavior of his library and pass in writing what she does or does not do. If he does not, or you do not trust him to abide by this agreement, remember that you are responsible for the malware containing your application. In particular, I would be inclined not to trust the ad network that sent the email address indicated on Google Play: many of them are not trustworthy, and Airpush is by far the most serious spammer in this regard.

+1
source

These libraries need a background service to display advertisements in the application. Usually you need to add something similar to your manifest:

 <service android:name="com.adnetworksdk.AdService" > <intent-filter> <action android:name="com.adnetworksdk.AdServicecom.yourapp.packagename" /> </intent-filter> </service> 

If this is not indicated in your manifest, nothing can start when your application is not running, so advertisements cannot be sent.

And if you really want to check, decompile the JAR using the JD-GUI and view the source. He is probably confused, but you should be able to see what he is doing. Decompiling a JAR for readable Java is surprisingly simple.

0
source

Source: https://habr.com/ru/post/1487819/


All Articles