This repository contains a sample app to retrieve pictures from Pexels API, based on key word informed by user.
- Get a Pexels API key
- Clone this repository
- Create a lib.cpp file in the following directory
app/src/main/cpp
- Insert the following code in lib.cpp file and replace with your Pexels API key.
#include <jni.h> #include <string> extern "C" JNIEXPORT jstring JNICALL Java_br_com_geshner_photosearch_utils_Keys_pexelsApiKey(JNIEnv *env, jobject /* this */) { std::string pexels_key = "Your Pexels API key"; return env->NewStringUTF(pexels_key.c_str()); }