Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
BitJam (0.1.0)
  • Loading branch information
shockch4rge committed Aug 12, 2021
1 parent 201b8e4 commit 218f541
Show file tree
Hide file tree
Showing 172 changed files with 5,168 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
google-services.json
key.xml

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/dictionaries/Dell.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# java-BitJam
A really basic music player app for Android.
# BitJam
A music player incorporating basic Java functionalities and features with a highly object-oriented structure, for Android devices. Requires an internet connection.

# Features
1. Login with your Google Account (don't worry, your email is not logged)
2. Filter through a list of existing songs with a search bar
3. A robust music player with queue preview
4. Add songs to Liked for easy referral
5. Create your own playlists and/or add songs to existing ones.

Note: This Android app does not follow the MVVM architecture. It looks like a mess right now but this might/will be fixed in the future.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
58 changes: 58 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
plugins {
id 'com.android.application'
id 'androidx.navigation.safeargs'
id 'com.google.gms.google-services'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

buildFeatures {
viewBinding true
}

defaultConfig {
applicationId "com.bitjam.android"
minSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

vectorDrawables.useSupportLibrary = true
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
implementation "androidx.transition:transition:1.4.1"
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'jp.wasabeef:picasso-transformations:2.4.0'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
implementation 'org.jetbrains:annotations:15.0'
implementation platform('com.google.firebase:firebase-bom:28.3.0')
implementation 'com.google.firebase:firebase-firestore'
implementation 'com.firebaseui:firebase-ui-auth:7.2.0'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'androidx.palette:palette:1.0.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.example.bitjam;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.tunein", appContext.getPackageName());
}
}
34 changes: 34 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bitjam">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BitJam.Final">
<activity android:name=".SignInActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>
<activity android:name=".MainActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>
<activity android:name=".WelcomeActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>
<activity android:name=".SplashActivity"
android:configChanges="orientation"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Binary file added app/src/main/cover_art_placeholder-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/evening_machines-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions app/src/main/java/com/example/bitjam/Adapters/DialogAdapter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
package com.example.bitjam.Adapters;

import android.annotation.SuppressLint;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.example.bitjam.Fragments.Dialogs.DialogAddToPlaylist;
import com.example.bitjam.Models.Playlist;
import com.example.bitjam.R;

import java.util.ArrayList;
import java.util.List;

public class DialogAdapter extends RecyclerView.Adapter<DialogAdapter.ViewHolder> {
private final List<Playlist> mPlaylists;
private final OnRecyclerClickListener<Playlist> mOnRecyclerClickListener;

/**
* An adapter for the {@link RecyclerView} in {@link DialogAddToPlaylist}.
*
* @param listener Requires the {@link OnRecyclerClickListener} interface to perform click
* functionality
*/
public DialogAdapter(OnRecyclerClickListener<Playlist> listener) {
mPlaylists = new ArrayList<>();
mOnRecyclerClickListener = listener;
}

@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
View v = inflater.inflate(R.layout.dialog_recycler_items, parent, false);

return new ViewHolder(v);
}

@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
Playlist playlistInfo = mPlaylists.get(position);
holder.bind(playlistInfo);
}

@Override
public int getItemCount() {
return mPlaylists.size();
}

class ViewHolder extends RecyclerView.ViewHolder {
final TextView titleHolder;
final TextView sizeHolder;

public ViewHolder(@NonNull View itemView) {
super(itemView);
titleHolder = itemView.findViewById(R.id.dialogTitleHolder);
sizeHolder = itemView.findViewById(R.id.dialogSizeHolder);
}

@SuppressLint("SetTextI18n")
public void bind(Playlist playlist) {
int size = playlist.getSongs().size();
sizeHolder.setText(size + (size == 1 ? " song" : " songs"));
titleHolder.setText(playlist.getTitle());
itemView.setOnClickListener(v -> mOnRecyclerClickListener.onItemClick(playlist));
}
}

public void updateAdapter(List<Playlist> playlists) {
mPlaylists.clear();
mPlaylists.addAll(playlists);
notifyDataSetChanged();
}
}
Loading

0 comments on commit 218f541

Please sign in to comment.