Uncodin / bypass

Skip the HTML, Bypass takes markdown and renders it directly on Android and iOS.
http://uncodin.github.com/bypass/
Apache License 2.0
1.52k stars 193 forks source link

Setting up Bypass on Android Studio #158

Open krngrvr09 opened 10 years ago

krngrvr09 commented 10 years ago

Hey I am relatively new to Bypass and android. If its not much trouble, can any of you tell me how to set this up on android studio. Thanks you very much. :)

martnst commented 10 years ago

+1

ZacSweers commented 10 years ago

Bypass relies on the NDK to be built, which isn't available in Android Studio right now. It would be convenient if an AAR was made available with pre-built binaries included, similar to how cwac-anddown does.

jonneymendoza commented 10 years ago

why does it need ndk to be build?

PhaniGaddipati commented 9 years ago

After downloading the NDK and boost libs, the binaries can be build into the *.so libraries. In Android Studio, these can be included main/jniLibs

jonathan34c commented 9 years ago

Anyone figured out how to solve this yet?

damien5314 commented 9 years ago

@jonathan34c My experience with NDK-dependent libraries is fairly limited, but last night I think I managed to get this working in Android Studio.

  1. Build the library .so files via the instructions under /platform/android/README.md. You just need to run ndk-build in the /platform/android/library directory, making sure you have the proper environment variables defined.
  2. Copy the built .so file structure (there should be bunch of folders each with a libbypass.so) into /src/main/jniLibs for your app module.
  3. Copy the java files from /platform/android/library/src to /src/main/java for your app module.

Here's a screenshot of my app src folder, if that helps.

I thought I would have to copy the files from /platform/android/library/jni to my /src/main/jni folder where my other native code sits, but my project is working without them. Ideally I would like to be able to import the entire /library/ directory as its own module similar to how I think they describe it works for Eclipse, but I haven't figured out how to get that working.

It would be great if someone with more experience integrating NDK-dependent libraries could include a sample Android Studio project under /platform/android, to ease the integration process.

jonathan34c commented 9 years ago

Hey @damien5314 , thank you. I eventually managed to make it works as well. I am trying to make image show with the text and changed the color of text with notations:). Again, thank you for the instruction. thank you

MatthewBooth commented 9 years ago

I have just come to report the same thing as @damien5314 . Looks like he beat me to it, ha!

I also toyed with getting it to build with NDK too, but had little luck.

Damien, I have this makefile building with AOSP's build system here if it helps: https://github.com/MatthewBooth/OTAUpdates/tree/aosp/jni. I'm pretty sure I saw a gradle hack to run a makefile

ex3ndr commented 9 years ago

185 Please, take a look at my PR

Jawnnypoo commented 9 years ago

For your convenience, I have compiled Bypass into a gradle compatible library here: https://github.com/Commit451/bypasses

Sheshlok commented 8 years ago

How do you generate '.so' files for Android Studio ? The structure I am looking for is something similar to this - Note there are no 'mk'/'cpp'/'h' files. I don't want to add Commit451's gradle dependency since I want to add some custom styles (as seen in the below snapshot).

screen shot 2016-07-28 at 9 50 40 am
amit-upadhyay-IT commented 7 years ago

@Sheshlok do you found any solution for your custom requirements? I also need the same bypass library as you mentioned in your pic.

amit-upadhyay-IT commented 7 years ago

To easily import the updated bypass library in android follow this link - https://github.com/amit-upadhyay-IT/bypass-android