Skip to content

Instantly share code, notes, and snippets.

View breautek's full-sized avatar
💭
I may be slow to respond.

Norman Breau breautek

💭
I may be slow to respond.
View GitHub Profile
@breautek
breautek / stripExtraWriteExternalStoragePerm.js
Last active October 3, 2023 22:38
Strip Extra WRITE_EXTERNAL_STORAGE
/*
Copyright 2023 Total Pave Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@breautek
breautek / gpsExplained.md
Last active October 31, 2022 08:48
GPS Explained

GPS features is something I heavily use in my apps and in my experience there are two things that can effect slow/non-existent GPS updates.

1. User Settings

On most android versions, the user may have location mode set "battery saving" -- which makes it so the phone requires to be near networks such as known wifi hotspots (such as businesses), or near mobile towers because it only uses wifi & mobile networks to determine location. Or "Device Only", which means the phone must connect to satellites to obtain a location. From a cold fix, it can take 10-15 minutes even in good conditions on a decent device before you start seeing stable GPS updates. The best location setting the phone can be in is "High Accuracy" mode (not to be confused with the api's highAccuracy option), which allows the phone to use any number of strategies to obtain a GPS update as quickly as possible. Note that this is a user setting that is outside the control of the app, however I'm sure there are plugins that allows you to open up

@breautek
breautek / startvm.sh
Created December 20, 2018 14:07
VM Start with specific Date time (linux host/windows guest)
#The directory that contains VBoxManage
vbox_path="/usr/bin/"
#This should be your VM name
vm_name="<YOUR_VM_NAME>"
#Use http://epochconverter.com to find the desired time
start_utc=1489325734
#DO NOT CHANGE ANYTHING BELOW THIS LINE