PiracyChecker icon indicating copy to clipboard operation
PiracyChecker copied to clipboard

Adding button to activity

Open avipars opened this issue 4 years ago • 4 comments

I love your library but need to modify it to work with my app and prevent it from being reverse-engineered. I'd like to change the license activity a bit to allow for a button which opens an intent. I don't want to use the callback to launch my own for fear that it would be easier to reverse it.

So I forked the library but kotlin isn't my strong suite. If I want to add a button and then have my activity call it, do you think that's possible?

avipars avatar Oct 21 '20 12:10 avipars

I don't understand your inquiry 🤔

jahirfiquitiva avatar Oct 21 '20 19:10 jahirfiquitiva

So,

There is the activity that pops up if the app has been pirated. Thankfully text works fine. But I would like to modify the layout so I can have a button with an intent. In this case, it is either to open a URL or a Mailto: request.

I tried playing around with the text and was able to have it lead to a url once clicked on... they was just with xml. It would be nice to be able to add a button too ... not just a text view.

Even if this is a custom solution, it would be awesome if you can help me implement it.

avipars avatar Oct 21 '20 19:10 avipars

Well, the easy way is for you to use the callback and create your own activity, but you said you don't want to, so your only choice would be editing the library source to make it match your needs

jahirfiquitiva avatar Oct 21 '20 21:10 jahirfiquitiva

I don't mind editing the source code, but kotlin isn't my strong suite.

I can put a button in license_activity_default And have it inflate in license_activity through the kotlin class. But where do I put the on click listener? Is there a way to expose the button , like the text to my app rather than leave everything in the library (fork)

On Thu, Oct 22, 2020, 00:48 Jahir Fiquitiva [email protected] wrote:

Well, the easy way is for you to use the callback and create your own activity, but you said you don't want to, so your only choice would be editing the library source to make it match your needs

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javiersantos/PiracyChecker/issues/89#issuecomment-713896803, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLXW7YSRQ5IBSNHBPRNUZDSL5JMJANCNFSM4SZXBRXA .

avipars avatar Oct 22 '20 04:10 avipars