[Project Share] History of songs detected by Google Pixel's Now Playing Ambient Services

Tasker: Total Automation for Android - Fri, 03/16/2018 - 22:16

I saw an app published somewhere and thought I can surely write the same thing with Tasker only - and was right :) It's quite simple and there's probably a bug in handling entries over 20 (I wanted to limit the amount of entries in the global variable) but I'll fix it once I encouter it :P

Required modules:

  • AutoNotification
  • AutoTools (could be skipped if you want to create a Scene)
  • Table layout for AutoTools WebView (you can import it in the WebView settings window)
  • Tasker (duh)

How it looks like:



Profile: Now Playing Ambient Services History (26) Event: AutoNotification Intercept [ Configuration:Event Behaviour: true Notification Type: Only Created Notifications Notification Id: 123 Notification Apps: Pixel Ambient Services Notification App: Pixel Ambient Services (exact) Package Name: (exact) ] Enter: NewSong (27) A1: Variable Split [ Name:%NowPlaying Splitter:, Delete Base:Off ] <Skip duplicates> A2: If [ %antitle !~ %NowPlaying(2) ] A3: Array Push [ Variable Array:%NowPlaying Position:1 Value:%DATE %TIME,%antitle Fill Spaces:Off ] A4: End If A5: If [ %NowPlaying(#) > 40 ] A6: Array Pop [ Variable Array:%NowPlaying Position:42 To Var: ] A7: Array Pop [ Variable Array:%NowPlaying Position:41 To Var: ] A8: End If A9: Variable Join [ Name:%NowPlaying Joiner:, Delete Parts:On ]

And a task to actually display it (you can create a shortcut on your home screen or similar). Note you will need AutoTools if you want to use it. An alternative would be a custom Tasker scene or a pop-up

Print List (28) A1: Flash [ Text:Showing last 20 entries Long:Off ] A2: AutoTools Web Screen [ Configuration:Screen Preset: Table Display Mode: Normal Source: /storage/emulated/0/AutoTools/table/page.html Toast Duration: 5000 Status Bar Color: #1c86db Background Color: #E9E9E9 Navigation Bar Color: #2196F3 Height: 400 Gravity: Center Animation: Slide In From Top Show Duration: 500 Hide Duration: 250 Text: Now Playing history Text Color: white Background Color: #2196F3 Icon: android.resource:// Titles: Date,Title - Artist Texts: %NowPlaying Column Number: 2 Text Alignment: Center Manual Text Alignment: Center Text Size: 16 Min Row Height: 18 Text Color: black Item Separator: , Timeout (Seconds):30 ] submitted by /u/dark_skeleton
[link] [comments]

Would it be possible to achieve this sort of idea without a central server?

Developing Android Apps - Fri, 03/16/2018 - 22:02

I've never worked with Android game development before, however I've built multiplayer systems before.

I basically want to make a game where 2 player can challenge each other to a duel, both players needing to accept, then the duel plays out and both players get the result, the players not actually doing anything during. Could I do something where if both players get an "ok" to start the duel it plays out. I suppose there are a lot of issues that arise like both of them getting different results if anything is left to a chance, and people being able to modify locally.

submitted by /u/OverRatedProgrammer
[link] [comments]
Categories: Android, Linux

Hey r/Android, how do you feel about alternate stores?

Android - Fri, 03/16/2018 - 21:04

I've used F-Droid for a secondary app store for around a month now, and I have to say it's pretty useful. How do you feel about unofficial app stores?

submitted by /u/doravak
[link] [comments]

Lower notification volume when connected to BT

Tasker: Total Automation for Android - Fri, 03/16/2018 - 19:09

I've been trying to lower the volume of my notifications when I'm connected to my car radio. I have the "when connected to this BT device" part down but I can't seem to do anything to change the volume of my notifications. they always sound loader than my music/podcast and if by chance I get a notification while I'm not listening to something the volume is even loader/deafening.

I've tried every action in the Audio category and the only thing I can do is turn the notifications off with Sound Effects Off. I've noticed that the notification sound comes from both my car speakers and my phone, if I could only make it come from my phone that would be great too.

submitted by /u/cerebralcow
[link] [comments]

Possible to run a Android Studio Emulator without GPU and Google Play Store build in?

Developing Android Apps - Fri, 03/16/2018 - 18:41

Hey there,

i am struggling for days with getting any android device emulated including Google Play Store App.

For hardware reasons i am not able to get OpenGL working on my server i want to run the emulated device and therefor can run devices only with Software GLES.

Now i can't find any system image for Nexus5/5x or others where Google Play Store App is included.

If its included i can't switch off GPU.

So i ask my self if and how its possible to run the emulator with GPU off + Google Play Store App.

Appreaciate any help

By the way these errors i get when trying to run the Emulator with GPU on.

10:14 PM Emulator: failed to create drawable 10:14 PM Emulator: getGLES2ExtensionString: Could not create GLES 2.x Pbuffer! 10:14 PM Emulator: Failed to obtain GLES 2.x extensions string! 10:14 PM Emulator: Could not initialize emulated framebuffer 10:14 PM Emulator: pulseaudio: pa_context_connect() failed 10:14 PM Emulator: pulseaudio: Reason: Connection refused 10:14 PM Emulator: pulseaudio: Failed to initialize PA context 10:14 PM Emulator: audio: Could not init `pa' audio driver 10:14 PM Emulator: emulator: ERROR: Missing initial data partition file: /root/.android/avd/Nexus_5X_API_25.avd/userdata.img 10:14 PM Emulator: emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it. 10:14 PM Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

submitted by /u/mediaonline
[link] [comments]
Categories: Android, Linux

How to get xml layout to split into 3 sections with dividers

Developing Android Apps - Fri, 03/16/2018 - 18:36

Here is my current code:

<RelativeLayout xmlns:android=" android" android:layout_width="match_parent" android:layout_height="match_parent" > <!-- An invisible view aligned to the center of the parent. Allows other views to be arranged on either side --> <View android:id="@+id/centerShim" android:layout_height="match_parent" android:layout_width="0dp" android:visibility="invisible" android:layout_centerHorizontal="true"/> <RadioGroup android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_toLeftOf="@+id/centerShim" > <RadioButton android:id="@+id/radio_one" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Adjectives"/> <RadioButton android:id="@+id/radio_two" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Nouns"/> <RadioButton android:id="@+id/radio_three" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Verbs"/> <RadioButton android:id="@+id/radio_four" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Other"/> </RadioGroup> <Button android:id="@+id/btRight" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_toRightOf="@+id/centerShim" android:text="Add 'text' to the Haiku " /> </RelativeLayout>

It needs to be split up like using dividers:

It currently looks like this:

I just can't figure out how to get the layout split into 3 separate sections with the dividers like in the above image. Thanks!

submitted by /u/Choonmachine
[link] [comments]
Categories: Android, Linux

Is the era of the "thinness race" finally over?

Android - Fri, 03/16/2018 - 17:54

I switched to the Galaxy S9+ today, and one of the first things I noticed was the relative thickness of it. So, I decided to look up and compare Samsung's past phones.

Galaxy S9+ : 8.5mm thick

Galaxy S8+ : 8.1mm thick

Galaxy S7 Edge: 7.7mm thick

Galaxy S6 Edge: 7.0mm thick

Galaxy S5: 8.1mm thick

Galaxy S4: 7.9mm thick

Galaxy S3: 8.6mm thick

Galaxy S II: 8.5mm thick

Galaxy S: 9.9mm thick

So, it seems as if manufacturers (or at least Samsung, didn't bother to check all manufacturers) have realized that no one really cares about how thin their phones are anymore. So Samsung has now gone back to 2011-2012 in regards to thickness, do you think they'll keep increasing it to ~10mm, or have we reached a plateau?

submitted by /u/Istartedthewar
[link] [comments]

Dividing xml layout vertically and horizontally

Developing Android Apps - Fri, 03/16/2018 - 17:40

I have to Split my android app layout width in Half and then I have to split my height into 3 sections: 25,25, and 50. I can not figure out the xml layout that will make my buttons only take up 25% height and 50% width. This is my current xml code. I need the radio group to the left and taking up 25% vertically and then the button to the right taking up 25% vertically. With them splitting the screen 50/50. Hopefully that makes sense. Here's my current code:

<LinearLayout xmlns:android=" " android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:weightSum="100"> <RadioGroup android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="25" > <RadioButton android:id="@+id/radio_one" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Nouns"/> <RadioButton android:id="@+id/radio_two" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Two"/> <RadioButton android:id="@+id/radio_three" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Three"/> <Button android:id="@+id/button3" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button" /> </RadioGroup> </LinearLayout>

UPDATE: I was able to make changes and I can now control the percentage of the screen that the radio group takes up. Now I'm having trouble getting the button beside it and restricting both the radiogroup and the button to split the screen 50/50.

submitted by /u/Choonmachine
[link] [comments]
Categories: Android, Linux

Shell command for enabling/disabling color correction?

Tasker: Total Automation for Android - Fri, 03/16/2018 - 15:58

Anyone know a shell command for enabling/disabling the monochromatic mode for the display?

Would like to assign a gesture like the double tap(through nova) or a shake to enable/disable the mode.

submitted by /u/TiMbl4
[link] [comments]

Compiling GNU gettext using NDK

Developing Android Apps - Fri, 03/16/2018 - 15:49

Dear Android Sirs,

if anyone has successfully compiled GNU gettext library that provides libintl et al. I wouldn't mind getting examples how to do it using android NDK. Extra bonus goes to compile-script provider whose script produces a library that also works on device, preferably arm device.

I've been doing to do this for several days now, latest error message is that the library is defining memcpy function twice but the second definition is static version of the function while previous versions are not - I can't spot the differing definitions but gettext is rather popular library so someone must have done this before so please help.

submitted by /u/operatornormal
[link] [comments]
Categories: Android, Linux

PSA about Atmos for mobile devices

Android - Fri, 03/16/2018 - 15:35

Mobile devices are starting to add Dolby Atmos software as a selling point. It is misleading and confusing to most consumers.

First of all, some people have heard it and claim it sounds better. But people will also think audio sounds better if you simply boost the bass and treble. Atmos is different technology, but the result is similar. Unless you are listening to a source that is mixed and presented in surround, like Dolby Digital 5.1, etc., Atmos for stereo speakers is not going to provide any benefit. It might sound flashy by comparison, but it is not how the original creator intended for the audio to sound.

Atmos for home theaters with more than two speakers is awesome!

Atmos for mobile devices (headphones) is very different and has very limited benefits.

Atmos 'virtual surround' for headphones is decent technology (an improvement on similar technologies) and it's good to have options, but it should have been branded differently from home theater surround sound. That's my main disappointment - they're confusing customers.

Atmos only applies audio mixed for surround. While some people will occasionally watch something like Netflix with 5.1 on their phone, the vast majority of audio consumed is going to be from a stereo source like YouTube, Spotify, etc. So, there is no expectation of surround sound from those stereo sources.

Atmos doesn't improve resolution. The quality of hardware (DAC + headphones/speakers) is what matters when it comes to the fidelity of the sound.

Ultimately, with stereo devices, it's still just two speakers (with no head-tracking). You could record the Atmos-processed (stereo) audio and play it back on a non-Atmos device and it would sound the same.

It could also be argued that any attempt to take a source mixed for multiple speakers and virtualize it down to headphones will inevitably result in occasional unintended artifacts.

There is a ton of misinformation about Atmos going around. Let's educate each other on what it really is. Audio is very susceptible to placebo effect. Just because it's louder and has an effect applied doesn't mean it's better.

I am open to arguments of what I have presented, but I've been a home theater enthusiast for many years and I've done significant research.

submitted by /u/yneos
[link] [comments]

[Help] GoHome var does not work, only goes to current page

Tasker: Total Automation for Android - Fri, 03/16/2018 - 15:30

Hi, I just started using tasker and I am trying to create a task to turn on an LED light. I have a widget on home page 6 and an autoinput action to click on. This task runs fine and works if I am on the home page that has the widget. It does not work on any other home page. The home page variable seems to have no effect regardless of what value is input.

submitted by /u/thunderkitty600
[link] [comments]