Android

[Help] Sensitivity to detect device orientation

Tasker: Total Automation for Android - Thu, 12/13/2018 - 23:56

Hi guys I've built a project to replicate Android 9's "suggest rotation" feature.
As part of this project, my profiles use the State - Orientation context.

This generally works well, however Tasker requires the device to be held vertically (with no "lean back") before it will detect the orientation change. This is not a natural position to hold the device in whilst using it.

I will also note that I have already set Preferences - Monitor - Orientation State Accuracy to "Very Low", however this has had little effect.

Is anyone aware of additional means of controlling the sensitivity to detect device orientation?

Thanks!

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

[Project Share] Automatic night mode and dark/light Gboard theme for Android 9 (root required)

Tasker: Total Automation for Android - Thu, 12/13/2018 - 23:35

This was made my my Pixel 2 XL running Android 9, and should work on any AOSP based software.

It uses the automatic "night light" screen tint schedule to toggle the system theme to dark mode, and change the Gboard theme to dark at night, then both back again in the morning.

Now that Google has started releasing dark mode for more of their apps (YouTube, Android Messages, etc) - I'm very keen to implement more apps into this project as well, if anyone is aware of any methods of invoking these via Tasker.

 

Profile

Profile: Night (5) State: Custom Setting [ Type:Secure Name:night_display_activated Value:1 ] Enter: Set Dark (6) A1: Custom Setting [ Type:Secure Name:theme_mode Value:2 Use Root:Off Read Setting To: ] A2: Variable Set [ Name:%theme To:google_blue_dark Recurse Variables:Off Do Maths:Off Append:Off ] A3: Perform Task [ Name:Gboard Color Change Priority:%priority Parameter 1 (%par1):%theme Parameter 2 (%par2): Return Value Variable: Stop:Off ] Exit: Set Light (13) A1: Custom Setting [ Type:Secure Name:theme_mode Value:1 Use Root:Off Read Setting To: ] A2: Variable Set [ Name:%theme To:google_blue_light Recurse Variables:Off Do Maths:Off Append:Off ] A3: Perform Task [ Name:Gboard Color Change Priority:%priority Parameter 1 (%par1):google_blue_light Parameter 2 (%par2): Return Value Variable: Stop:Off ]

 

Tasks

Set Dark (6) A1: Custom Setting [ Type:Secure Name:theme_mode Value:2 Use Root:Off Read Setting To: ] A2: Variable Set [ Name:%theme To:google_blue_dark Recurse Variables:Off Do Maths:Off Append:Off ] A3: Perform Task [ Name:Gboard Color Change Priority:%priority Parameter 1 (%par1):%theme Parameter 2 (%par2): Return Value Variable: Stop:Off ]

 

Set Light (13) A1: Custom Setting [ Type:Secure Name:theme_mode Value:1 Use Root:Off Read Setting To: ] A2: Variable Set [ Name:%theme To:google_blue_light Recurse Variables:Off Do Maths:Off Append:Off ] A3: Perform Task [ Name:Gboard Color Change Priority:%priority Parameter 1 (%par1):google_blue_light Parameter 2 (%par2): Return Value Variable: Stop:Off ]

 

Gboard Color Change (21) A1: Variable Set [ Name:%theme To:%par1 Recurse Variables:Off Do Maths:Off Append:Off ] A2: Run Shell [ Command:cp /data/data/com.google.android.inputmethod.latin/shared_prefs/com.google.android.inputmethod.latin_preferences.xml /sdcard/Tasker/com.google.android.inputmethod.latin_preferences.xml Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ] A3: Read File [ File:/sdcard/Tasker/com.google.android.inputmethod.latin_preferences.xml To Var:%preferences ] A4: Variable Split [ Name:%preferences Splitter:<string name="additional_keyboard_theme">assets:theme_package_metadata_ Delete Base:Off ] A5: Variable Split [ Name:%preferences2 Splitter:.binarypb Delete Base:Off ] A6: Write File [ File:Tasker/com.google.android.inputmethod.latin_preferences.xml Text:%preferences1<string name="additional_keyboard_theme">assets:theme_package_metadata_%theme.binarypb%preferences22 Append:Off Add Newline:Off ] A7: Run Shell [ Command:cp /sdcard/Tasker/com.google.android.inputmethod.latin_preferences.xml /data/data/com.google.android.inputmethod.latin/shared_prefs/com.google.android.inputmethod.latin_preferences.xml Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ] A8: Run Shell [ Command:am force-stop com.google.android.inputmethod.latin Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: ] submitted by /u/AlfLeibor
[link] [comments]

Settings Activity vs Settings Fragment

Developing Android Apps - Thu, 12/13/2018 - 23:22

I've seen the debate that we should be trying to limit the amount of activities we're using. So far in my app i've been using a preferences activity but im wondering if I should be using a preferences fragment. I did a bit of googling and no one seemed to cover this topic. I've also had a bit of trouble figuring out how I would display this fragment overtop of all the other fragments Should I be using a fragment or an activity for my app?

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

Removable Batteries

Android - Thu, 12/13/2018 - 22:49

I miss the days of removable batteries. It seems like we're going backwards with these bulky portable chargers. I remember when I had my S4, I bought two batteries for $5 that I always kept charged and took one with me when leaving the house. Just pop it in and you have a fresh 100%. Way more compact and easier to carry than a portable charger that you have to plug in.

I always envisioned phones having batteries that looked like metallic cards that you could just carry around in your purse or wallet. Then you could just slide it in the back of your phone in a slot or something. Even if each battery lasted only 5 hours, the convenience of being able to carry multiple around like a credit card would be awesome!

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

/r/android, let’s talk about the state of Bluetooth audio in 2018.

Android - Thu, 12/13/2018 - 22:43

Here is my super-fresh experience from yesterday (at this time of writing).

So I bought 2018 Galaxy Gear IconX earbuds yesterday. I heard mostly good reviews about them (aside from the left ear refusing to work after three months, but that's neither here or there), so I decided to give them a go. Unfortunately, most of the features I cared about from these headphones didn't work at all with an iPhone. Given that I was already beginning to feel the itch to move back to Android but didn't want to go back to a Galaxy device (I don't like the curved screen, amongst other things), I decided to finally give the Pixel 3 a try.

It was disappointing.

I paired the earbuds with the Pixel 3. I thought these were one of the rare headphones that supported AptX, so I was excited to finally hear what I've been missing. It took about 30 seconds of YouTube to discover that:

  1. These headphones, unfortunately, did not support AptX or AptX-LL (Low Latency),
  2. Samsung actually went out of their way to develop a special streaming codec just for their headphones (the Samsung Scalable Codec) that is only supported on Samsung hardware (try finding technical information on it; oh wait, YOU CAN’T), and
  3. They drop down to “everyone’s favorite codec” (said no-one), SBC.

I really liked the Pixel, but because I can’t live with crappy audio on expensive devices, I will be returning everything tomorrow.

In a world where seemingly everyone is trying to push the headphone jack towards obsolescence in favor of using Bluetooth, I cannot understand why improving SBC in favor of AAC isn’t on top of everyone’s list. Yes, SBC is low-power and basically comes out of the box with Bluetooth hardware. However, it sounds like garbage, especially on the more expensive headphones that most manufacturers are targetting, and it has horrible inherent A/V synchronization problems (which is key given how popular streaming video is nowadays). It seems that every Android manufacturer configures their Bluetooth driver implementations to be as aggressive with SBC as possible and degrade its performance if something blows on the headphones hard enough.

It also seems that, despite many, many years of Bluetooth audio, premium Android devices still have issues with range. The entire point of truly wireless headphones is to have complete freedom of movement. That freedom really isn’t freeing when you can only realize this comfortably by having your device on the right side of your body reasonably close to the earbuds at all times.

Every time I bring this conversation up, the answer is “but AptX is better, though.” But pushing for a codec that is only really bolstered by one major manufacturer (Qualcomm) and is, I’m assuming, more difficult or costly to implement when AAC or even SBC with better tuning (like what Jaybird/Logitech does) is like trying to make fetch happen. Fetch will never happen, and neither will AptX at large scale.

I don’t understand why Apple is the only company that is getting this right. Yes, they were the first to be courageous enough to drop the headphone jack from their phones. However, they had Bluetooth audio “more-or-less” solved before they started pushing AirPods and W1. The iPhone 7 could support Bluetooth headphones with 100ft of range (on Bluetooth 4.2, none the less). Additionally, streaming with SBC from iPhone actually sounds good, even with a Low Energy device connected.

Try doing this with any Android device. Be amazed at the crap-tastic quality.

What’s more: AAC over Bluetooth had been a thing for a long time and has a long history with Bluetooth devices because Apple spent many years making AAC ubiquitous in the audio peripherals industry, even before Bluetooth audio became mainstream. The difference between Apple’s push for AAC and Samsung being Samsung and creating their own streaming codec because reasons is that AAC is an open codec developed by a consortium of research companies and is widely recognized and supported. Samsung’s Scalable Audio Codec is a dumb money grab to try and give you one more incentive to stick to their products (and it’s a weak one because the market clearly prefers AirPods, which, you guessed it, support AAC, and they work mostly perfectly on all Android devices).

/r/android. Am I crazy? What say you?

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

Beginner help - Setting a Global Variable to Built-in Variable

Tasker: Total Automation for Android - Thu, 12/13/2018 - 21:58

**Beginner Alert**

What I am trying to accomplish:

Store original state of built-in variable when profile is run and reinstate the original value on exit task.

Error:

built-in variables cannot be modified

What I tried:

  1. Create an action "Variable Set"
  2. Name "%UserVariable" To "%BUILT-IN_VARIABLE"
  • So far I can see values being updated on var tab. I add some more actions
  1. Create exit acton.
  2. Name "%UserVariable" To "%BUILT-IN_VARIABLE"

**Error**

I am able to set media vol variable by ActionAudioMedial Volume>>"%User_Variable

However I am not aware of setting other built-in variables such as %WIFI.

I could mess up with terminologies I have no programming knowledge. Got started with tasker yesterday.

Could someone please help or direct me towards right section of variables tutorial.

P.S. I comprehend lot better when I look for stuff I want and get it done than following the whole tutorials. Sorry! >_<

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

Needs some direction

Developing Android Apps - Thu, 12/13/2018 - 21:42

So, I should probably preface this by say I don't as of yet write applications, but I understand well enough to figure things out.

I'm after an app that I can use to activate a key command based on a gesture in motion from a phone. It then needs to allow for mouse manipulation as well as having a couple of assignable buttons (it's to control a program running on my computer). It also needs to be in a dormant state while the phone screen is locked but still run in the foreground.

I don't know how to search for information on the best way to execute this. Any suggestions please?

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

Make an "offtime" like task?

Tasker: Total Automation for Android - Thu, 12/13/2018 - 21:40

i found this app:
https://play.google.com/store/apps/details?id=co.offtime.kit

and I love the idea, but it does not perform good enough and it has not all the functionality that I need.

So I tought about making a task like that.
I can easily switch on/off data, wifi, sound, etc.
Plus I already found/made scripts to block calls/sms (except from specific numbers).

What I lack is the ability to stop the people using the phone to open any app (excluding maybe one of two) while the task is active

Anyone has any idea how to manage to do that?

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

Trump is using adderall?

Developing Android Apps - Thu, 12/13/2018 - 21:05

Haha did y'all hear about this in the news?

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

[Help]using tasker to automatically hit enter

Tasker: Total Automation for Android - Thu, 12/13/2018 - 20:33

Thanks for the subreddit guys! Pretty new to it all and I was wondering if there is any way for Tasker to hit "enter" without autoinput or plugins that simulate touch. Any other method? Thank you so much.

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

How do you use SQLite in your application?

Developing Android Apps - Thu, 12/13/2018 - 20:17

I understand that's very common on the Android world to use SQLite for local data storage, but how do you do that? How and when do you decide to update it? What are the problems you faced with this approach so far and how did you overcome them? Is it fast enough, even with thousands of hundreds of rows in several tables?

Best regards!

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

[HELP] Tasker default browser with Javascript

Tasker: Total Automation for Android - Thu, 12/13/2018 - 19:47

Please, can someone tell me how to integret Javascript with Tasker browser. I can't find it anywhere or maybe I suck at searching for this topic. I need to know where to start. Thank you.

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

[Dev] Albatross For Twitter 2.0 - App Widget, translate tweet shortcut, and more!

Android - Thu, 12/13/2018 - 19:32

Hi everyone, I just pushed update 2.0 to Albatross For Twitter! Albatross has come a long way since its 1.0 release a month ago, and it still has a lot more to go as well!

I have designed Albatross to be a simple yet pleasing material design experience with sleek animations yet providing a truly useful experience. If anyone has any ideas on better layouts, designs, options etc. then please let me know as I am open to ideas!

Here are recent features and additions to Albatross:

  • App widget
  • Translate Shortcut
  • Tweet count option (show how far to the top of the timeline)
  • # and @ suggestions
  • delete own tweets
  • view entire reply threads at once (also improved how many tweets are queried)
  • Added source of tweet
  • Tablet / Chromebook UI
  • Notifications for mentions

I already have plans for future updates with the following priority (highest to less)

  • DMs
  • App widget with only shortcuts to parts of the app
  • Option to truly remember timeline position
  • profile editing
  • gestures
  • many more that haven't been listed

If y'all have any other features requests, ideas, feedback, or bug reports I would be happy to help so please let me know! Thanks!

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

What are my options? I don't have my app signing key...

Developing Android Apps - Thu, 12/13/2018 - 19:29

So, about 5 years ago I signed up for this web-based app making site that compiled and signed your app automatically. I didn't really think much about it because I didn't expect any of my apps to become popular. But one became quite popular. Now that web site that makes the app has sort of fallen into disrepair and I'd love it if I could just move on and update my apps without using it. But since I don't have the app signing key, I'm screwed, right?

I know Google came out with an app signing program. Is there any way I could use that method instead? What happens if i try to upload an already signed apk?

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

Latest Google Fit update brings back widgets

Android - Thu, 12/13/2018 - 19:03

Just got an update (version 2.06.32-130) and it brings back widgets, this is how it looks like: http://i.imgur.com/b61Q5FX.jpg

There's also one for objectives but since I don't have any yet I can't show it right now.

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

Need Help to Enable/Disable SIM2 using tasker

Tasker: Total Automation for Android - Thu, 12/13/2018 - 19:00

Hey guys. I would like to automatically disable my work SIM card (SIM2) on my off-shift hours. But i cant seem to find any intent or adb commands to accomplish this with tasker. Anyone knows if it is possible? How?

submitted by /u/yurividal-br
[link] [comments]

Pages