Giter Site home page Giter Site logo

sondosaabed / paltales Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 2.32 MB

PalTales is a mobile app that shows Palestinian Inspiring Tales through lists of Movies & Books. ๐Ÿ‡ต๐Ÿ‡ธ

License: MIT License

Java 100.00%
anroid-studio gaza gson mobile-app palestine sharedpreferences volly webservices encryption sha256

paltales's Introduction

PalTales

In response to the ongoing Israeli offensive Forces, the ethnic cleansing and aparthhied of the Palestinian People, this app emerges as a platform to illuminate our unique narrative. Palestinians are resilient and creative, garnering recognition through various awards in cinema and literature with these works. The app's primary objective is to present insight into the inspiring resilience of our people and our tales. Hence the name (Pal: Palestine, Tales).

Over time, I have personally compiled a list of Palestinian movies and documentaries, both created by Palestinians and others, accessible through the Internet Movies Database (IMDB) which I have used in this app. I have also created a list of Palestinian books list on the open library database online. So this requiremnt is met by these by these two services:

Features:

A complete android app was developed that provides the following functionalities:

Web Services

  • The app reads data from real external web servicces, Only Volly API was used.

  • List of books that delves into the Palestinian narrative:

    https://openlibrary.org/people/sondos_aabed/lists/OL243427L/Palestinian/export?format=json
    
  • Collection of films, providing a visual representation of our experiences:

    https://github.com/sondosaabed/Palestinian-Movies-JSON-Dataset/tree/main
    

Requiremnts

  • The project contains the following activities (was required at least 4):

    • Create Account Activity: Users are able to to register and create multiple accounts in the same device. Where there data is saved locally.
    • Loign Activity: Provides login Functionality, with a remeber me feature that saves on their local storage (the last account set to remeber me is the one that is remebered).
    • Home Activity: let's the user chose if tehy want to broswe movies or books.
    • List Activity: based on what they want to broswe they are shown either a list of movies or a list of books provided by the json response of two web services.
    • Item Activity: is shown on click the item (Movie || Book) Details
    • Tow Informational Activites:
      • Getting Started: If (is first time) and redirects to create account.
      • Welcome Back: If rember me is set leads to Home, if there is no remeber me then Login.
  • The activites have variety of attributes: TextEdit(Diffrent input Types), TextView, Button, ListView, ImageView, ScrollView, CheckBox, ImageButton

  • The layouts have variety of Layout Managers: Contriant Layout, Relative Layout, Linear Layout.

  • The project have Centralized and coceptual design styles (light and dark themes), that are related to the concept (Palestine Flag Colors)

PalTales Logo Palestine Flag Colors
  #F6F5F4 White
	#000000 Black
	#993B3B Red
	#9A1212 Red Light
	#064C2B Green
	#A8A196 Grey

Additional Features

  • Password Encryption using SHA-256 algorithm. (MessageDigest Java)
  • One device can create multiple accounts and be saved in their shared prefrences.
  • Check if first time users from prefrences.
  • Provided an ADMIN account (I created it for testing although I don't like this logic of me doing that because it was hard coded #TODO)
  • Created Custom List Items using Linear Layout for Book & Movie Object.
  • Created Custom Adapters for books & movies.
  • Implemneting Generic Programming (in some cases I fail to do so, but have reduced a lot of code redundancy since there exists intersections in the two Data types)
  • Created (API) interface to be implemnted for both books & movies (I figured since they have the same methods but didn't finish this yet since it's addtional)

DEMO (UX)

PalTales.DEMO.mp4

(UI)

Getting Started Create Account Login Welcome Back Home option
Getting Started Create Account Login Welcome Back Home option
Book List Book Item Movie List Movie Item
Book List Book Item Movie List Movie Item

Resources

  • Stackoverflow custom item of listvew
  • Stackoverflow custom listAdapter
  • My Palestinian Movies List
  • APIfy IMDB Advanced Scrapper
  • My Palestinian Books List
  • picasso for cached images
  • Android Image Loading Libraries?
  • Volly Documentation
  • Login Activity I created before
  • Lecture Code Volley2
  • Lecture Code Shared Pref2
  • Prefrences I used in prev. assignment
  • Prev. Project I worked on Hash for password

paltales's People

Contributors

sondosaabed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

paltales's Issues

Use EncryptedSharedPreferences instead of hashing string

https://stackoverflow.com/questions/30148729/how-to-secure-android-shared-preferences

String masterKeyAlias = MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC);

SharedPreferences sharedPreferences = EncryptedSharedPreferences.create(
    "secret_shared_prefs",
    masterKeyAlias,
    context,
    EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
    EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
);

// use the shared preferences and editor as you normally would
SharedPreferences.Editor editor = sharedPreferences.edit();

Volley Singleton & Image Loader


RequestQueue queue = MySingleton.getInstance(this.getApplicationContext()).
    getRequestQueue();

MySingleton.getInstance(this).addToRequestQueue(stringRequest);

https://github.com/CypressNorth/Volley-Singleton/blob/master/VolleySingleton.java

https://google.github.io/volley/requestqueue.html

`public class MySingleton {
private static MySingleton instance;
private RequestQueue requestQueue;
private ImageLoader imageLoader;
private static Context ctx;

private MySingleton(Context context) {
    ctx = context;
    requestQueue = getRequestQueue();

    imageLoader = new ImageLoader(requestQueue,
            new ImageLoader.ImageCache() {
        private final LruCache<String, Bitmap>
                cache = new LruCache<String, Bitmap>(20);

        @Override
        public Bitmap getBitmap(String url) {
            return cache.get(url);
        }

        @Override
        public void putBitmap(String url, Bitmap bitmap) {
            cache.put(url, bitmap);
        }
    });
}

public static synchronized MySingleton getInstance(Context context) {
    if (instance == null) {
        instance = new MySingleton(context);
    }
    return instance;
}

public RequestQueue getRequestQueue() {
    if (requestQueue == null) {
        // getApplicationContext() is key, it keeps you from leaking the
        // Activity or BroadcastReceiver if someone passes one in.
        requestQueue = Volley.newRequestQueue(ctx.getApplicationContext());
    }
    return requestQueue;
}

public <T> void addToRequestQueue(Request<T> req) {
    getRequestQueue().add(req);
}

public ImageLoader getImageLoader() {
    return imageLoader;
}

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.