-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
There are no files selected for viewing
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 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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' | ||
} |
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()); | ||
} | ||
} |
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> |
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(); | ||
} | ||
} |