Student Book Application
Budget: $10 – $30 USD
1. UI/UX Implementation
Main Screen:
Colorful, playful main screen showing a book index (chapter list).
Designed using RecyclerView with vibrant, card-style layouts.
Each chapter card includes a fun icon or image.
Tapping a chapter opens the first image in that chapter.
Design Considerations:
Use bright, kid-friendly colors and playful fonts.
Follow Material Design for smooth animations and accessibility.
Placeholder data for now; real encrypted assets will be added later.
Splash Screen:
A splash screen appears when the app launches.
A banner ad loads behind the splash to reduce visible ad load time.
Theme:
Funky, colorful, and lively — reflecting a kids' book app.
2. Core Features
Dynamic Activity Creation:
Every image opens in a separate Activity (not reusing the same one).
Essential Functions:
Bookmark pages for quick access.
Zoom into images for better readability.
Highlight parts of an image.
Share the highlighted area directly from the app.
Book Index:
Easy-to-navigate list of chapters/pages.
Book Image Display:
Book images are shown dynamically, using decrypted assets at runtime.
3. Ads Integration
AdMob Ads:
Banner ads at the bottom of each page (no iframe/browser hack).
App Open Ads are integrated following AdMob policies.
Offline Behavior:
If the internet is disconnected:
All ad spaces disappear.
A centered message: "Internet not available".
The app becomes non-functional until reconnected.
4. Security
Resource Extraction Protection:
Proguard enabled for release builds.
Encrypted images stored in the assets folder.
Images are decrypted at runtime only, in memory.
The decryption key is obfuscated (not in plain text).
Offline Image Encryption Before Packaging:
Images must be encrypted offline using a script before adding them to the assets.
5. Encryption Workflow (Complete Details)
a) Offline Image Encryption Script (Python)
python
Copy
Edit
# encrypt_images.py
import os
from Crypto.Cipher import AES
from hashlib import sha256
SECRET_KEY = "mydreambook_super_secret_key_2025"
KEY = sha256(SECRET_KEY.encode("utf-8")).digest()
def pad(data):
return data + b'\0' * (AES.block_size - len(data) % AES.block_size)
def encrypt_file(infile, outfile):
with open(infile, "rb") as f:
data = f.read()
cipher = AES.new(KEY, AES.MODE_ECB)
enc = cipher.encrypt(pad(data))
with open(outfile, "wb") as f:
f.write(enc)
assets_dir = "assets"
for fname in os.listdir(assets_dir):
if fname.endswith(".jpg") or fname.endswith(".png"):
encrypt_file(os.path.join(assets_dir, fname), os.path.join(assets_dir, fname))
print(f"Encrypted {fname}")
Encrypt images before APK build.
Only encrypted images should be included.
b) Runtime Decryption Utility (Java)
java
Copy
Edit
// AssetEncryptionUtil.java
package com.notes.mydreambook;
import android.util.Base64;
import java.io.InputStream;
import java.io.ByteArrayOutputStream;
import java.security.MessageDigest;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class AssetEncryptionUtil {
// Replace this with an obfuscated key in production
private static final String SECRET_KEY = "mydreambook_super_secret_key_2025";
private static SecretKeySpec getKey() throws Exception {
MessageDigest sha = MessageDigest.getInstance("SHA-256");
byte[] key = SECRET_KEY.getBytes("UTF-8");
key = sha.digest(key);
return new SecretKeySpec(key, "AES");
}
public static byte[] decrypt(InputStream is) throws Exception {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int nRead;
byte[] data = new byte[4096];
while ((nRead = is.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, nRead);
}
buffer.flush();
byte[] encrypted = buffer.toByteArray();
Cipher cipher = Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE, getKey());
return cipher.doFinal(encrypted);
}
}
Reads encrypted images from assets.
Decrypts images in memory at runtime only.
No decrypted images are saved on the device.
6. Final Notes
Placeholder assets are ready and will be replaced by encrypted final assets.
Dynamic activity per page/image already planned.
AdMob, Splash Screen, Offline Handling, Security, and UI/UX are completely covered.
Further security hardening (e.g., splitting the key, native decryption) can be implemented if required later.
Main Screen:
Colorful, playful main screen showing a book index (chapter list).
Designed using RecyclerView with vibrant, card-style layouts.
Each chapter card includes a fun icon or image.
Tapping a chapter opens the first image in that chapter.
Design Considerations:
Use bright, kid-friendly colors and playful fonts.
Follow Material Design for smooth animations and accessibility.
Placeholder data for now; real encrypted assets will be added later.
Splash Screen:
A splash screen appears when the app launches.
A banner ad loads behind the splash to reduce visible ad load time.
Theme:
Funky, colorful, and lively — reflecting a kids' book app.
2. Core Features
Dynamic Activity Creation:
Every image opens in a separate Activity (not reusing the same one).
Essential Functions:
Bookmark pages for quick access.
Zoom into images for better readability.
Highlight parts of an image.
Share the highlighted area directly from the app.
Book Index:
Easy-to-navigate list of chapters/pages.
Book Image Display:
Book images are shown dynamically, using decrypted assets at runtime.
3. Ads Integration
AdMob Ads:
Banner ads at the bottom of each page (no iframe/browser hack).
App Open Ads are integrated following AdMob policies.
Offline Behavior:
If the internet is disconnected:
All ad spaces disappear.
A centered message: "Internet not available".
The app becomes non-functional until reconnected.
4. Security
Resource Extraction Protection:
Proguard enabled for release builds.
Encrypted images stored in the assets folder.
Images are decrypted at runtime only, in memory.
The decryption key is obfuscated (not in plain text).
Offline Image Encryption Before Packaging:
Images must be encrypted offline using a script before adding them to the assets.
5. Encryption Workflow (Complete Details)
a) Offline Image Encryption Script (Python)
python
Copy
Edit
# encrypt_images.py
import os
from Crypto.Cipher import AES
from hashlib import sha256
SECRET_KEY = "mydreambook_super_secret_key_2025"
KEY = sha256(SECRET_KEY.encode("utf-8")).digest()
def pad(data):
return data + b'\0' * (AES.block_size - len(data) % AES.block_size)
def encrypt_file(infile, outfile):
with open(infile, "rb") as f:
data = f.read()
cipher = AES.new(KEY, AES.MODE_ECB)
enc = cipher.encrypt(pad(data))
with open(outfile, "wb") as f:
f.write(enc)
assets_dir = "assets"
for fname in os.listdir(assets_dir):
if fname.endswith(".jpg") or fname.endswith(".png"):
encrypt_file(os.path.join(assets_dir, fname), os.path.join(assets_dir, fname))
print(f"Encrypted {fname}")
Encrypt images before APK build.
Only encrypted images should be included.
b) Runtime Decryption Utility (Java)
java
Copy
Edit
// AssetEncryptionUtil.java
package com.notes.mydreambook;
import android.util.Base64;
import java.io.InputStream;
import java.io.ByteArrayOutputStream;
import java.security.MessageDigest;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class AssetEncryptionUtil {
// Replace this with an obfuscated key in production
private static final String SECRET_KEY = "mydreambook_super_secret_key_2025";
private static SecretKeySpec getKey() throws Exception {
MessageDigest sha = MessageDigest.getInstance("SHA-256");
byte[] key = SECRET_KEY.getBytes("UTF-8");
key = sha.digest(key);
return new SecretKeySpec(key, "AES");
}
public static byte[] decrypt(InputStream is) throws Exception {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
int nRead;
byte[] data = new byte[4096];
while ((nRead = is.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, nRead);
}
buffer.flush();
byte[] encrypted = buffer.toByteArray();
Cipher cipher = Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE, getKey());
return cipher.doFinal(encrypted);
}
}
Reads encrypted images from assets.
Decrypts images in memory at runtime only.
No decrypted images are saved on the device.
6. Final Notes
Placeholder assets are ready and will be replaced by encrypted final assets.
Dynamic activity per page/image already planned.
AdMob, Splash Screen, Offline Handling, Security, and UI/UX are completely covered.
Further security hardening (e.g., splitting the key, native decryption) can be implemented if required later.
Related categories:
Business, Accounting, Human Resources & Legal
Android
Android App Development
Android Studio