Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to add Ackeydo to Android Apps

To install Ackeydo, follow these simple steps:

  • Download the Ackeydo library from the link provided.
  • Open your application on Android Studio, right click on ‘app’ folder and click on New-> Module
  • From list of available options, select ‘Import JAR/. AAR Package’ and click Next.
  • Select the ‘ackeydo.aar’ file from the location on your machine and click Finish.
  • Open your app’s build.gradle file and add these lines:
import com.android.build.gradle.LibraryPlugin
import org.aspectj.bridge.IMessage
import org.aspectj.bridge.MessageHandler
import org.aspectj.tools.ajc.Main

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.aspectj:aspectjtools:1.8.1'
  }
}
apply plugin: 'com.android.application'
dependencies {
compile 'org.aspectj:aspectjrt:1.8.1'
}
  • In order for AspectJ to work with Android properly, at the bottom of build.gradle file, add these lines:
final def log = project.logger
final def variants = project.android.applicationVariants
variants.all { variant ->
if (!variant.buildType.isDebuggable()) {
   log.debug("Skipping non-debuggable build type '${variant.buildType.name}'.")
return;
}
JavaCompile javaCompile = variant.javaCompile
javaCompile.doLast {
String[] args = ["-showWeaveInfo",
      "-1.5",
      "-inpath", javaCompile.destinationDir.toString(),
      "-aspectpath", javaCompile.classpath.asPath,
      "-d", javaCompile.destinationDir.toString(),
      "-classpath", javaCompile.classpath.asPath,
      "-bootclasspath", project.android.bootClasspath.join(File.pathSeparator)]
log.debug "ajc args: " + Arrays.toString(args)
MessageHandler handler = new MessageHandler(true);
new Main().run(args, handler);
for (IMessage message : handler.getMessages(null, true)) {
switch (message.getKind()) {
   case IMessage.ABORT:
   case IMessage.ERROR:
   case IMessage.FAIL:
log.error message.message, message.thrown
break;
    case IMessage.WARNING:
log.warn message.message, message.thrown
break;
     case IMessage.INFO:
log.info message.message, message.thrown
break;
     case IMessage.DEBUG:
log.debug message.message, message.thrown
break;
     }
    }
  }
}
  • Finally, add ‘ackeydo’ as dependencies as shown below:

The post How to add Ackeydo to Android Apps appeared first on SynRadar.



This post first appeared on Why Thinking Security At An Early Development Stage Is Extremely Vital For Mobile Apps!, please read the originial post: here

Share the post

How to add Ackeydo to Android Apps

×

Subscribe to Why Thinking Security At An Early Development Stage Is Extremely Vital For Mobile Apps!

Get updates delivered right to your inbox!

Thank you for your subscription

×