java - Hide implementation of methods in jar using android studio IDE -


i build jar using android studio , when using jar in demo project, when open class demo project, able see implementation of methods in class looking when open sdkclass(in jar).

public class sdkclass{      public void paymentrequestedfromcreditdebitcard(int i) {         toast.maketext(mcontext, "payment requested:" + i, 1).show();     }      public void paymentcanceledbycustomer() {         toast.maketext(mcontext, "payment cancelled", 1).show();     }      public void paymentfailed(int i) {         toast.maketext(mcontext, "payment failed \n error code:" + i, 1).show();     } } 

i want thing

public class sdkclass{      public void paymentrequestedfromcreditdebitcard(int i) {         /* compiled code */     }      public void paymentcanceledbycustomer() {         /* compiled code */     }      public void paymentfailed(int i) {         /* compiled code */     } } 

you can use obfuscator. e.g. proguard. change names of class, variables in way code difficult reverse engineered. can't hide implementation completely. please take @ google documentation. https://developer.android.com/studio/build/shrink-code.html


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -