Jump to content

Pumila

Approved Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Pumila's Achievements

Member

Member (2/3)

  1. @flyingdutchman Thank you for your answer. I'm relieved that it's proven to be actual working code. Next is to see if it can run in my environment. Also, I'd like to ask for some advice. I'm getting the following warning messages in the runtime logs, but these aren't related, right? transport W type=1400 audit(0.0:318683): avc: denied { getattr } for path="/proc/fb" dev="proc" ino=4026531977 scontext=u:r:shell:s0 tcontext=u:object_r:proc:s0 tclass=file permissive=0 transport W type=1400 audit(0.0:318684): avc: denied { getattr } for path="/proc/keys" dev="proc" ino=4026532132 scontext=u:r:shell:s0 tcontext=u:object_r:proc_keys:s0 tclass=file permissive=0 transport W type=1400 audit(0.0:318685): avc: denied { getattr } for path="/proc/kmsg" dev="proc" ino=4026532083 scontext=u:r:shell:s0 tcontext=u:object_r:proc_kmsg:s0 tclass=file permissive=0 transport W type=1400 audit(0.0:318686): avc: denied { getattr } for path="/proc/misc" dev="proc" ino=4026531978 scontext=u:r:shell:s0 tcontext=u:object_r:proc_misc:s0 tclass=file permissive=0 transport W type=1400 audit(0.0:318687): avc: denied { getattr } for path="/proc/iomem" dev="proc" ino=4026532108 scontext=u:r:shell:s0 tcontext=u:object_r:proc_iomem:s0 tclass=file permissive=0 I don't access the /proc folder, and it's a hassle to disable SELinux, so I'm hoping that this isn't the cause. As for the execution environment, it's as shown in the attached image. I hope that's correct. I'm new to Android Studio and have never done Android app development, so I'm really sorry for not understanding much. I'd greatly appreciate it if you could teach me. Thank you in advance.
  2. @flyingdutchman I apologize for asking repeatedly. I've tried various things using ChatGPT, but it doesn't seem to be working out. Here's the source code I'm running. Does this look right to you? If any corrections are needed, it would be greatly appreciated if you could make them. Thank you in advance. package com.example.myapplication; import android.net.Uri; import android.content.Context; import android.database.Cursor; import android.content.ContentResolver; import android.util.Log; class PlayCount { public static final Uri POWERAMP_URI = Uri.parse("content://com.maxmpz.audioplayer.data/files"); public String folder_files_played_times = "folder_files.played_times as count_of_played"; public void queryPowerampData(Context context) { String[] projection = { folder_files_played_times }; Cursor cursor = null; try { cursor = get_table_content(context, POWERAMP_URI, projection, null, null, null); if (cursor != null && cursor.moveToFirst()) { int column_number_count = cursor.getColumnIndex("count_of_played"); do { int cnt = cursor.getInt(column_number_count); Log.d("PlayCount", "再生回数: " + cnt); } while (cursor.moveToNext()); } } catch (Exception e) { e.printStackTrace(); } finally { if (cursor != null) { cursor.close(); } } } public Cursor get_table_content(Context context, Uri table_uri, String[] proj, String where, String[] sel_args, String order_by) { Cursor cursor = null; if (context != null) { ContentResolver cr = context.getContentResolver(); try { cursor = cr.query(table_uri, proj, where, sel_args, order_by); } catch (Exception e) { e.printStackTrace(); } } return cursor; } }
  3. @flyingdutchman I wonder if I should use Android Studio. For now, I managed to build it, and when I run it, "Hello World" is displayed on Android. However, I get the following error log, and I can't get the desired play count. This is my first time using both Android Studio and JAVA, so I'm not sure how to resolve this issue. I would greatly appreciate it if you could suggest a solution. 2023-08-06 00:24:21.590 4371-4371 Perf com.example.myapplication I Connecting to perf service. 2023-08-06 00:24:21.602 4371-4371 FeatureParser com.example.myapplication I can't find dipper.xml in assets/device_features/,it may be in /system/etc/device_features 2023-08-06 00:24:21.612 4371-4371 libc com.example.myapplication E Access denied finding property "ro.vendor.df.effect.conflict" 2023-08-06 00:24:21.615 4371-4408 Perf com.example.myapplication E Fail to get file list com.example.myapplication 2023-08-06 00:24:21.615 4371-4408 Perf com.example.myapplication E getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array 2023-08-06 00:24:21.615 4371-4408 Perf com.example.myapplication E Fail to get file list com.example.myapplication 2023-08-06 00:24:21.615 4371-4408 Perf com.example.myapplication E getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array 2023-08-06 00:24:21.615 4371-4408 Perf com.example.myapplication E Fail to get file list oat 2023-08-06 00:24:21.615 4371-4408 Perf com.example.myapplication E getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array 2023-08-06 00:24:21.633 4371-4371 e.myapplicatio com.example.myapplication E Invalid ID 0x00000000. 2023-08-06 00:24:21.641 4371-4371 ForceDarkHelper com.example.myapplication D updateByCheckExcludeList: pkg: com.example.myapplication activity: com.example.myapplication.MainActivity@7b4d340 2023-08-06 00:24:21.643 4371-4371 chatty com.example.myapplication I uid=10348(com.example.myapplication) identical 1 line 2023-08-06 00:24:21.646 4371-4371 ForceDarkHelper com.example.myapplication D updateByCheckExcludeList: pkg: com.example.myapplication activity: com.example.myapplication.MainActivity@7b4d340 2023-08-06 00:24:21.683 4371-4371 ForceDarkHelper com.example.myapplication D updateByCheckExcludeList: pkg: com.example.myapplication activity: com.example.myapplication.MainActivity@7b4d340 2023-08-06 00:24:21.742 4371-4371 e.myapplicatio com.example.myapplication W Accessing hidden method Landroid/graphics/Canvas;->drawPatch(Landroid/graphics/NinePatch;Landroid/graphics/Rect;Landroid/graphics/Paint;)V (greylist-max-o, linking, denied) 2023-08-06 00:24:21.742 4371-4371 e.myapplicatio com.example.myapplication W Accessing hidden method Landroid/graphics/Canvas;->drawPatch(Landroid/graphics/NinePatch;Landroid/graphics/RectF;Landroid/graphics/Paint;)V (greylist-max-o, linking, denied) 2023-08-06 00:24:21.754 4371-4409 AdrenoGLES com.example.myapplication I QUALCOMM build : 033a5b0, I0e419467bc Build Date : 03/11/20 OpenGL ES Shader Compiler Version: EV031.27.05.01 Local Branch : Remote Branch : refs/tags/AU_LINUX_ANDROID_LA.UM.8.3.R1.10.00.00.520.058 Remote Branch : NONE Reconstruct Branch : NOTHING 2023-08-06 00:24:21.754 4371-4409 AdrenoGLES com.example.myapplication I Build Config : S P 8.0.11 AArch64 2023-08-06 00:24:21.756 4371-4409 AdrenoGLES com.example.myapplication I PFP: 0x016ee187, ME: 0x00000000 2023-08-06 00:24:21.757 4371-4409 AdrenoUtils com.example.myapplication W <ReadGpuID_from_sysfs:194>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model 2023-08-06 00:24:21.757 4371-4409 AdrenoUtils com.example.myapplication W <ReadGpuID:218>: Failed to read chip ID from gpu_model. Fallback to use the GSL path 2023-08-06 00:24:21.772 4371-4409 Gralloc3 com.example.myapplication W mapper 3.x is not supported 2023-08-06 00:24:23.481 4371-4371 Looper com.example.myapplication W Slow Looper main: Long Msg: seq=25 plan=00:24:22.470 late=0ms wall=1007ms running=1ms runnable=1ms io=3ms h=android.app.ActivityThread$H w=127 2023-08-06 00:24:27.041 4371-4427 ProfileInstaller com.example.myapplication D Installing profile for com.example.myapplication 2023-08-06 00:24:29.626 4371-4407 e.myapplicatio com.example.myapplication I ProcessProfilingInfo new_methods=0 is saved saved_to_disk=0 resolve_classes_delay=8000 2023-08-06 00:24:33.553 4371-4371 IInputConnectionWrapper com.example.myapplication W requestCursorAnchorInfo on inactive InputConnection The source code I'm using is as follows. import android.util.Log; import com.maxmpz.Poweramp.player.PowerampAPI; public Cursor getPowerampTrackcursor(Context context, String where, String sort_order) { String[] proj = {pamptrack_id, pamptrack_name, pampalbum, pampartist, pamprating, pampduration, pamppath, pamptimes_played}; try { Cursor cursor = context.getContentResolver().query(powerampuri, proj, where, null, sort_order); return cursor; } catch (Exception e) { e.printStackTrace(); } } cursor cursor = getPowerampTrackcursor(this, null, null); while (cursor.moveToNext()) { String trackName = cursor.getString(cursor.getColumnIndex(PowerampAPI.Track.PAMPTRACK_NAME)); // do something with trackName Log.d("Track Information", "Track Name: " + trackName); // Add this line } cursor.close();
  4. @flyingdutchman Should I use MediaSessionCompat? However, I don't quite understand how to use MediaSessionCompat. Could you provide the steps or code that you outlined in a table? I'm a beginner with Android API, so I don't know anything. Thank you in advance.
  5. @flyingdutchman I've found a place where I might be able to sort by the number of plays. How can I export this information? Also, how do I access the table below?
  6. @flyingdutchman I apologize. I read the user's guide, but I couldn't figure out how to access the folder where the target table is located. I have given the necessary permissions as shown in the attached image (sorry it's in Japanese), but nothing is displayed. Is there something wrong with the settings? I would appreciate it if you could explain in detail.
  7. @andrewilley Is the location shown in the attached image correct? There are no files inside though. I wonder if it's because I don't have the permissions to view anything. I'd appreciate it if you could enlighten me.
  8. @flyingdutchman I'm really sorry. I know I should be looking this up myself, but how can I access that screen from the Music Playlist Manager? Can I access it from "FilePicker"? It's saying I don't have permission and nothing is displayed. I've given access permissions to the folder though. Would it require rooting? I would appreciate it if you could tell me. Thank you.
  9. @andrewilley Hmm, I wonder if it's difficult. I'm thinking about contacting the Poweramp official support to ask where the database is saved and whether it can be disclosed. Do you know how I can get in touch with the official support?
  10. @andrewilley I tried opening the mp3 file, but I was unable to retrieve the number of playbacks even with the mp3 file.
  11. @flyingdutchman @andrewilley Am I correct in understanding that the Music Playlist Manager cannot retrieve information on the number of times a song has been played? Does that mean I should ask @flyingdutchman to make it possible to retrieve this information?
  12. @andrewilley I wasn't able to fetch the playback count information in the Music Playlist Manager by @flyingdutchman. How can I do that?
  13. @maxmp What are m3u8 playlists? Can I download them from the Google Play store? Could you provide a link?
  14. I'm using iSyncr to synchronize Android and iTunes. However, due to a setting issue, I couldn't sync the play count. I found out that by editing the xml file, I can sync the play count. So, I'm saving the play count with Poweramp, but could I get information about that database? It might be confidential information, but I want to sync the play count. Please help.
  15. Content: I'm using an app called "iSyncr" that can sync iTunes and Android, but the number of times played on Android doesn't reflect well on iTunes. I found out that to sync the play count, I can edit the xml file of iSyncr, but the crucial database of the play count on Android doesn't exist. I know that "Poweramp" saves the play count, but is there any way to access that information? It might be confidential, but I really want to sync the play count accurately. I would really appreciate your help. Thank you in advance.
×
×
  • Create New...