An Instant Music App
anyaudio / anyaudio-android-app Goto Github PK
View Code? Open in Web Editor NEWOne Stop Music Application
Home Page: http://api.anyaudio.in/app
One Stop Music Application
Home Page: http://api.anyaudio.in/app
I have done lot of stackoverflow search for the issue, but got no efficient solution to show multilple downloads at the same time on downloads page.
There should be efficient threads running in background so that UI doen`t get stuck.
SharedPreferences can be taken into account
previous info on stream sheet persists
If Memory gets low then Thread throws a IOException as
...
...
﹕ audTsk20160814013828 done..50 %
08-14 13:39:08.010 18525-19577/musicgenie.com.musicgenie D/TaskHandler﹕ audTsk20160814013828 done..50 %
08-14 13:39:08.012 18525-19577/musicgenie.com.musicgenie D/TaskHandler﹕ audTsk20160814013828 done..50 %
08-14 13:39:09.483 18525-19577/musicgenie.com.musicgenie D/TaskHandler﹕ callback: download error
08-14 13:39:09.484 18525-19577/musicgenie.com.musicgenie D/TaskHandler﹕ IO exception java.io.IOException: write failed: ENOSPC (No space left on device)
08-14 13:39:09.484 18525-19576/musicgenie.com.musicgenie D/TaskHandler﹕ thread joined !
...
...
there should be meaningful notification and clearification about absolute problem.
make stream fragment height bit narrower
make streaming content`s title size bigger
Hello all!
Hope the development is going fine. We are almost set to go public. The plan is to do it by September 5, 2016.
Please fasten up the development and make sure there are no crashes. Soon as you get your issues fixed, upload an APK
release to Github (so that we may provide a download link).
Since we will not be launching on Google Play Store, we have to work out some mechanism which notifies the user that some update is available.
We can make use of some API call that will tell the user about latest version -
/api/v1/appupdate
{
"stable": {
"version": "1.1",
"download_link": "http://link/for/github/release/musicgenie1.1.apk"
},
"beta": {
"version": "1.1.2",
"download_link": "http://link/for/github/release/musicgenie1.1.2.apk"
}
}
But I think that Github API (or page scraping) can also be used for achieving this.
There is activity transition while network state change............unregister it after one use in error splash
Error Log :
FATAL EXCEPTION: main
Process: musicgenie.com.musicgenie, PID: 20342
java.lang.RuntimeException: Unable to start activity ComponentInfo{musicgenie.com.musicgenie/musicgenie.com.musicgenie.activity.MainActivity}: android.view.InflateException: Binary XML file line #42: Binary XML file line #42: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2584)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2666)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1493)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5769)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.view.InflateException: Binary XML file line #42: Binary XML file line #42: Error inflating class fragment
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at musicgenie.com.musicgenie.activity.MainActivity.onCreate(MainActivity.java:64)
at android.app.Activity.performCreate(Activity.java:6583)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1114)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2531)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2666)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1493)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5769)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.view.InflateException: Binary XML file line #42: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:782)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at musicgenie.com.musicgenie.activity.MainActivity.onCreate(MainActivity.java:64)
at android.app.Activity.performCreate(Activity.java:6583)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1114)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2531)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2666)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1493)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5769)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: java.lang.NullPointerException
color of each component should be matched with the documentations and mock-ups.
Currently there is not valid informative message to notify a failure during search.
Only if connection`s absent is introduced through SanckBar.
So there is need to take some steps at:
MainActivity`s fireSearch()
...
...
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError volleyError) {
log("[fireSearch()] Error While searching :" + volleyError);
}
});
...
...
while the app is in background and stream finishes, streaming bar is still persists.
it should close down.
audio url which app receives from api is not able to stream in browser even.
there is some issue on server or youtube-dl
Issue:
previous thumbnail persist.
previous title persist
at initial
08-11 06:26:34.922 10455-10455/musicgenie.com.musicgenie D/TaskHandler﹕ removing dispatch task audTsk20160811062634
08-11 06:26:34.922 10455-10455/musicgenie.com.musicgenie D/TaskHandler﹕ writing back the tasks :
08-11 06:26:34.926 10455-10679/musicgenie.com.musicgenie D/TaskHandler﹕ succ: dispatched audTsk20160811062634
dispatchTask audTsk20160811062634 is removed
but after prev. task finished, Handler again dispatched same audTsk20160811062634
08-11 06:28:55.044 10455-11659/musicgenie.com.musicgenie D/TaskHandler﹕ succ: dispatched audTsk20160811062634
...
...
08-11 06:28:51.357 10455-10680/musicgenie.com.musicgenie D/TaskHandler﹕ audTsk20160811062634 done..90 %
08-11 06:28:55.018 10455-10680/musicgenie.com.musicgenie D/TaskHandler﹕ audTsk20160811062634 done..100 %
08-11 06:28:55.018 10455-10680/musicgenie.com.musicgenie D/TaskHandler﹕ removing download task audTsk20160811062634
08-11 06:28:55.018 10455-10680/musicgenie.com.musicgenie D/TaskHandler﹕ writing back the tasks :audTsk20160811062653#
08-11 06:28:55.028 10455-10680/musicgenie.com.musicgenie D/TaskHandler﹕ downloaded task audTsk20160811062634
08-11 06:28:55.038 10455-10679/musicgenie.com.musicgenie D/TaskHandler﹕ thread joined !
08-11 06:28:55.038 10455-10679/musicgenie.com.musicgenie D/TaskHandler﹕ posting handler
08-11 06:28:55.039 10455-10455/musicgenie.com.musicgenie D/TaskHandler﹕ callback: handleMessage
08-11 06:28:55.039 10455-10455/musicgenie.com.musicgenie D/TaskHandler﹕ initiating Handler
08-11 06:28:55.040 10455-10455/musicgenie.com.musicgenie D/TaskHandler﹕ removing dispatch task audTsk20160811062634
08-11 06:28:55.040 10455-10455/musicgenie.com.musicgenie D/TaskHandler﹕ writing back the tasks :audTsk20160811062653#
08-11 06:28:55.044 10455-11659/musicgenie.com.musicgenie D/TaskHandler﹕ succ: dispatched audTsk20160811062634
AsyncTask issues duplicate request if there is lag in server response. even after minimizing time-out, it issues it.
due to which server get confuse to response ,
After one pause, progress Bar and play-time is not updating
Error Log:FATAL EXCEPTION: main
Process: musicgenie.com.musicgenie, PID: 8245
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference
at android.support.design.widget.Snackbar.(Snackbar.java:185)
at android.support.design.widget.Snackbar.make(Snackbar.java:217)
at musicgenie.com.musicgenie.activity.MainActivity.makeSnake(MainActivity.java:540)
at musicgenie.com.musicgenie.activity.MainActivity.fireSearch(MainActivity.java:257)
at musicgenie.com.musicgenie.activity.MainActivity.access$000(MainActivity.java:51)
at musicgenie.com.musicgenie.activity.MainActivity$2.onSearchAction(MainActivity.java:194)
at com.arlib.floatingsearchview.FloatingSearchView$9.onSearchKeyClicked(FloatingSearchView.java:635)
at com.arlib.floatingsearchview.util.view.SearchInputView$1.onKey(SearchInputView.java:19)
at android.view.View.dispatchKeyEvent(View.java:9323)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1672)
at com.android.internal.policy.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:2494)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1783)
at android.app.Activity.dispatchKeyEvent(Activity.java:2779)
at android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:533)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:53)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:254)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2402)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4659)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4615)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4110)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4163)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4129)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4293)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4137)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4350)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4110)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4163)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4129)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4137)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4110)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6593)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6567)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6499)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3890)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5769)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.j
New activity task is created after the suggestions activity launch.
cancelled pending reqs. for suggestions
Results loaded after search is lost after navigation to another activity.
so results loaded should be saved to instance and make Parcel.
and when activity re-gains the focus , results should be reloaded instead of re-load from API.
...
...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(savedInstanceState!=null){
//TODO: getParcelable arrayList and populate the result list
}
...
...
It Needs to be fixed.
played-time is persist on second time
SearchView is creating UI crash issues, due to missing drawables,
so we need to migrate to FloatingSearchView
<com.arlib.floatingsearchview.FloatingSearchView
android:id="@+id/floating_search_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:floatingSearch_searchBarMarginLeft="@dimen/search_view_inset"
app:floatingSearch_searchBarMarginTop="@dimen/search_view_inset"
app:floatingSearch_searchBarMarginRight="@dimen/search_view_inset"
app:floatingSearch_searchHint="Search..."
app:floatingSearch_suggestionsListAnimDuration="250"
app:floatingSearch_showSearchKey="false"
app:floatingSearch_leftActionMode="showHamburger"
app:floatingSearch_menu="@menu/menu_main"
app:floatingSearch_close_search_on_keyboard_dismiss="true"/>
this gives us action button and more action button control
here i try to dispatch single task at a time and when ongoing task finishes and joins the parent thread
, another should dispatch
but due to lag in thread actvity and misplacement of method call , unexpected behavior is observed
if(SharedPrefrenceUtils.getInstance(context).getCurrentDownloadsCount()<1) {
new Thread(new Runnable() {
@Override
public void run() {
dispatch(taskID);
}
}).start();
removeDispatchTask(taskID);
}
Its annoying to see update notification on home screen, and so frequent.
While Updating, Update
versions.txt
And Update the anyAudio.apk
in releases section.
Update check should be from releases sections of github.
On Trying Stream before one requested Stream before cause multiple streaming at a time:
Explorer card UI should have well padded cards with possibly rounded corners.
Although event Listeners are subscribed , no callbacks are received
Listeners are as declared
private void subscribeToTaskAddListener(){
SearchResultListAdapter.getInstance(this).setOnTaskAddListener(new TaskAddListener() {
@Override
public void onTaskTapped() {
log("callback: task tapped");
progressDialog = new ProgressDialog(MainActivity.this);
progressDialog.setMessage("Requesting Your Stuff..");
progressDialog.setCancelable(false);
progressDialog.show();
}
@Override
public void onTaskAddedToQueue(String task_info) {
log("callback: task added to download queue");
progressDialog.dismiss();
makeToast(task_info + " Added To Download");
//TODO: navigate to DownloadsActivity
}
});
}
and set as
..
..
setSearchView();
pinFAB();
subscribeToTaskAddListener();
}
..
in
onCreate();
In the Web Platform, it would be more awesome if the search suggestions which pops up can be selected and navigated through keyboard keys.
I tried to clone the project but , studio stuck at refreshing gradle.
add download button to side of play/pause btn on streaming fragment
Line 35 https://github.com/bxute/musicgenie/blob/master/app/src/main/res/layout/song_item.xml#L35
android:id="@+id/songTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sanam Re | Ankit "/>
d <TextView
android:paddingBottom="8dp"
android:paddingRight="8dp"
android:paddingLeft="8dp"
android:id="@+id/artist"
after streaming ends , stream fragment should disappear
Issue:
multiple streaming get started while trying streaming over disappeared fragment
App is unresponsive on user taps the item to download.
It should serve with progress bar in order to notify about its tasks.
some where
ProgressDialoge progressDialog = new ProgressDialoge(context);
progressDialog.show()
progressDialog is initialized but somewhere its show() method is missing.
While issuing 'StringRequest' on Worker thread cause UI to stuck down , and frees it upon dowload complete.
I tried posting android.os.Handlers on Worker thread but the issues continued.
App get crashed due to Broadcast Receiver.
crash log
...
...
java.lang.RuntimeException: Unable to instantiate receiver musicgenie.com.musicgenie.activity.ErrorSplashActivity$ConnectivityBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "musicgenie.com.musicgenie.activity.ErrorSplashActivity$ConnectivityBroadcastReceiver" on path: DexPathList[[zip file "/data/app/musicgenie.com.musicgenie-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2717)
at android.app.ActivityThread.access$1700(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1489)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5529)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
Caused by: java.lang.ClassNotFoundException: Didn't find class "musicgenie.com.musicgenie.activity.ErrorSplashActivity$ConnectivityBroadcastReceiver" on path: DexPathList[[zip file "/data/app/musicgenie.com.musicgenie-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2712)
at android.app.ActivityThread.access$1700(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1489)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5529)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
Suppressed: java.lang.ClassNotFoundException: musicgenie.com.musicgenie.activity.ErrorSplashActivity$ConnectivityBroadcastReceiver
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 11 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
...
...
There is no need of receivers as per current requirements
Currently the file names are trimmed. e.g. hai meri jindgi me tu.mp3
is trimmed to hai meri jin.mp3
.
There is need of some file name reformatting which can generate meaningful names for these files.
What I have observed from the logs is that the app is making calls to all the possible trending playlist. This is not a good practice. Even if it were, we do not have sufficient resources to entertain such requests. Please implement lazy loading for trending playlists on the app.
We need sectioned GridView for Trending items,
section will have tittle and below there will have its type songs.
It will resemble Web Interface.
Should be implemented keeping in mind the UI blocking constraints, and excessive UI thread usage.
Items should be aligned in grid sections title should have full width space.
issues can be with maintaining data for adapter .
Data Structure can be
HashMap< String, ArrayList<Song>>
and
ArrayList<Song>
both can be used to generate such sectioned view
Issue:
While streaming song, if we navigate to another activity
on returning back, fragment disappears
On network failure there should corresponding event notification , and UI updation.
Files which are being downloaded incomplete due to any issue should be deleted out of memory as it fails.
DownloadListener listener = new DownloadListener() {
@Override
public void onError(String error) {
SharedPrefrenceUtils.getInstance(context).setCurrentDownloadCount(0);
log("callback: download error");
//TODO: handle error during download
}
It causes inconsistency due to lack of pause/resume system in our current version of app.
NavigationView for sliding drawer layout is not supported below API level 19,
App suddenly got breaked.
Since we are using SearchView which replaces the ActionBarMenu Buttons, so we need to provide navigation to Downloads Activity.
We need some alternative
via - floating action button or else
After app start the player control should be hidden or last item played should be shown.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.