Rektirino

1

votes
1

answer
909

views

Expand/Collapse groups in expandable recyclerview

I am using this library to implement an expandable RecyclerView. I have implemented it, and it works fine. But what I want is the group should only expand if I click a particular view. Right now what is happening is if I click anywhere on the RecyclerView item, the group expands. I have an ImageView...
Rektirino
1

votes
0

answer
59

views

Gradle not syncing after update

I was working on a project in android studio. Unfortunately, my harddisk started giving errors, so I backed up my project. Then, I bought a new harddisk and installed android studio(ver 3.0.1). I don't clearly remember the previous version of android studio that I used but I guess it was 2.6. Here c...
Rektirino
1

votes
1

answer
87

views

Cannot set ringtone

I'm building a simple audio player. I have listed all songs from the sdcard and displayed it. I have given users the feature to set any of the songs as their device ringtone. But each time I set the ringtone, the ringtone of the device changes to 'NONE'. Yes, I have given the required permissions. T...
Rektirino
1

votes
0

answer
133

views

Not able to set lockscreen album art

I'm building an audio player. I implemented a background service for this purpose. Now, I'm trying to use mediasession for displaying the album art of the audio as lockscreen wallpaper. I have successfully implemented the lockscreen playback controls and notification but I'm not able to showthe alb...
Rektirino
1

votes
1

answer
248

views

onPause() called before onResume() in BaseActivity

I have 2 activites A and B. Both of them extend BaseActivity. Activity A is the launcher activity. From A when I click a button, it goes to Activity B. But I found something weird and I don't know if it is normal. According to the activity lifecycle, onResume() is called before onPause(). But when I...
Rektirino
3

votes
0

answer
39

views

Cannot update fragment's data (fragment in viewpager)

I have 3 activites- A,B, and C. All these 3 activities have a viewpager. And these viewpagers have 1 fragment(this fragment is common to all viewpagers). The launcher activity is A, and pressing a button in A takes me to B, and pressing a button in B takes me to C. A-> B -> C Now the problem is when...
Rektirino
2

votes
0

answer
282

views

Passing data between two RecyclerViews

I building a music player that has a tab layout. One of the tabs is 'Genres'(Genre.java) that displays the genres of songs in RecyclerView( songs that are present on the external storage of the android phone, by querying it). I have set onClickListeners too for the genres in the RecyclerView. So, wh...
Rektirino
2

votes
1

answer
256

views

How to use single instance of MediaPlayer across all activities and fragments?

I have several activities and fragments that displays songs from SD card and when I click on any of them, it plays. The problem is I have to create a new instance of media player in each of these activities and fragments. So, if I play a song in one activity and play another in another activity, bot...
Rektirino
2

votes
3

answer
54

views

Insert data into table and if already present bring it to the top SQLite

I'm making a 'Recently played' playlist in my music app. I have created a database for storing the info related to songs. What my current code does is whenever I play a song it add it the database and I can successfully display it. But the problem is when I play the same song twice, the database isn...
Rektirino
2

votes
0

answer
254

views

Reordering of recyclerview items by drag and drop in playlist

I'm working on a music player for android. I introduced the playlist feature in which users can create playlist and add songs to playlist. So, in the playlist, I have implemented the drag and drop feature (moving song from one position to other by dragging them across the list). This feature works f...
Rektirino
2

votes
1

answer
174

views

App crashing due to high resolution image

In my app, I'm giving user the feature to set an image for the app's homescreen background(from gallery). The app works fine if the image if low resolution but if the user sets a high resolution image the app crashes on startup giving this error. android.view.WindowManager$BadTokenException: Unable...
Rektirino
1

votes
1

answer
444

views

Check if album art exists?

I'm building a music player app. I'm trying to populate a recyclerView with album arts of songs. I successfully did that with the code that is given below. But some of the songs do not have embedded album art not any album art in the folder. So, I'm trying to check if the album art is null or not be...
Rektirino