AndroidLib.dll - Benachrichtigungen von Android abfragen

  • VB.NET
  • .NET (FX) 4.0

    AndroidLib.dll - Benachrichtigungen von Android abfragen

    Hi Leute,
    ich probiere zur Zeit, einige Informationen von meinem Android Handy auszulesen, darunter auch die Benachrichtigungen, die in der oberen Leiste stehen.

    Ich nutze dazu "AndroidLib.dll", hier zu finden: forum.xda-developers.com/showthread.php?t=1512685
    Diese DLL ist eine Schnittstelle zwischen vb.net und Android.
    Ich schaffe es bereits, Sachen wie den Akkustand, die Geräteinformationen (CPU, Laufzeit, Account Informationen etc.) auszulesen.
    Allerdings hab ich bei den Benachrichtigungen Probleme.
    Ich benutze folgenden Befehl, um die Benachrichtigungen abzurufen:

    VB.NET-Quellcode

    1. Dim adbCmd As AdbCommand = Adb.FormAdbShellCommand(device, false, "dumpsys", "notification")
    2. RichTextBox1.Text = Adb.ExecuteAdbCommand(adbCmd)


    Inhalt der Richtextbox: (Auszug daraus)
    Spoiler anzeigen

    Current Notification Manager state:
    Notification List:
    NotificationRecord(0x0d83abe4: pkg=com.whatsapp user=UserHandle{0} id=1 tag=null importance=4 key=0|com.whatsapp|1|null|10076: Notification(pri=1 contentView=null vibrate=default sound=content://settings/system/notification_sound tick defaults=0x2 flags=0x201 color=0xff075e54 category=msg groupKey=group_key_messages vis=PRIVATE publicVersion=Notification(pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0xff075e54 category=msg vis=PRIVATE)))
    uid=10076 userId=0
    icon=Icon(typ=RESOURCE pkg=com.whatsapp id=0x7f020b62) / com.whatsapp:drawable/notifybar
    pri=1
    key=0|com.whatsapp|1|null|10076
    seen=true
    groupKey=0|com.whatsapp|g:group_key_messages
    contentIntent=PendingIntent{5c7d84d: PendingIntentRecord{370217b com.whatsapp startActivity (whitelist: +30s0ms)}}
    deleteIntent=PendingIntent{28cbf02: PendingIntentRecord{5ef290 com.whatsapp broadcastIntent (whitelist: +30s0ms)}}
    tickerText=Nachricht von Vorname Nachname @ Beispielgruppe 🌻
    contentView=null
    defaults=0x00000002 flags=0x00000201
    sound=content://settings/system/notification_sound
    audioStreamType=-1
    audioAttributes=AudioAttributes: usage=5 content=4 flags=0x0 tags= bundle=null
    color=0xff075e54
    vibrate=null
    led=0xff00ffff onMs=1000 offMs=4000
    extras={
    android.title=String
    android.textLines=CharSequence[] (4)
    android.subText=null
    android.template=String
    android.showChronometer=Boolean (false)
    android.text=String
    android.progress=Integer (0)
    android.progressMax=Integer (0)
    android.appInfo=ApplicationInfo (ApplicationInfo{bdeff34 com.whatsapp})
    android.showWhen=Boolean (true)
    android.largeIcon=null
    android.infoText=null
    android.originatingUserId=Integer (0)
    android.progressIndeterminate=Boolean (false)
    android.remoteInputHistory=null
    android.summaryText=String
    }
    stats=SingleNotificationStats{posttimeElapsedMs=143318966, posttimeToFirstClickMs=-1, posttimeToDismissMs=-1, airtimeCount=24, airtimeMs=258803, currentAirtimeStartElapsedMs=147220913, airtimeExpandedMs=248961, posttimeToFirstVisibleExpansionMs=3973, currentAirtimeExpandedStartElapsedMs=147220913, requestedImportance=4, naturalImportance=4, isNoisy=true}
    mContactAffinity=0.0
    mRecentlyIntrusive=false
    mPackagePriority=0
    mPackageVisibility=-1000
    mUserImportance=UNSPECIFIED
    mImportance=HIGH
    mImportanceExplanation=null
    mIntercept=false
    mGlobalSortKey=intrsv=1:grnk=0x0000:gsmry=0:nsk:rnk=0x0000
    mRankingTimeMs=1496651029515
    mCreationTimeMs=1496647271484
    mVisibleSinceMs=1496651173441
    mUpdateTimeMs=1496651029547
    mSuppressedVisualEffects= 0
    ...
    uid=10076 userId=0
    icon=Icon(typ=RESOURCE pkg=com.whatsapp id=0x7f020b62) / com.whatsapp:drawable/notifybar
    pri=0
    ...


    Ich stelle mir jetzt die Frage, wie ich die wichtigen Informationen herausfiltern kann und ob es nicht vielleicht einen besseren ADB Command gibt?
    Google brachte keine Ergebnisse.

    Danke, Hilfe0987
    :thumbup: