Hello.
So I've been tampering with the android SDK and made an app for practice. However, while trying to stick to my basic level goals, it seemed like I was going against the grain of how stuff seemed to work. I'm gonna read up on theory now, but it'd be a real help if you could tell me if there were any glaring dumb/broken/bad things there.
Anyway, the general idea was to have a reverse-stopwatch that I could populate with types of laps with custom durations. So I'd have, for example, WALK 10sec, RUN 30sec JOG 15sec *10 times. I wanted the app to vibrate every time one of these laps ended (no matter what, even in screen lock) but I also wanted those laps and their duration-countdowns to be dynamically shown in a ListView inside the main Activity.
In order to do that, I populated an Object that extended Application with my dataset, plugged it into an Adapter to update the ListView with, then when I had a populated list, I'd invoke an IntentService which would make a deep copy of the data and do countdowns inside logic loops. That IntentService also periodically sent messages to a BroadcastReceiver, who would update durations and remove expired laps on the Original List (linked to the Adapter) and handle vibrations. The intentService could be aborted prematurely , I haven't been able to think of a way to pause it.
Well, it works if you don't ever let it re-orient screens and while phonecalls don't break it, some of the listview data appearance was corrupt after one (the timers were fine tho which is weird).
Related
‘Life’, as per John Horton Conway’s original creation. It simulates the existence of a two dimensional array of cells which will continue, or not, into the next generation based on a few simple rules. Which are:
If a cell has two or three neighbours, it will continue into the next generation. If an empty square is surrounded by three neighbours, then a new cell will be ‘born’ into it on the next generation. In all other cases which is where a cell has less than two or more than three neighbours, then the cell will die, simulating a lack of breedable neighbours, or lack of food due to overcrowding, respectively.
These simple rules create a complex world, where order and chaos reign, and quite often change places with each other, before finally settling down to a stable or completely static state, sometimes after hundreds, if not thousands, of generations.
The program is a Win32 C++ implementation in an executable of only 13Kb in size, although it consumes around 200Kb of memory when running. It uses basic GDI drawing functions so it will run on any ARM powered Pocket PC or Smartphone, from WM2003 onwards. Just drop the executable on your device and run it. It will also run on any sized screen up to 1024x1024 pixels, so that should take care of all current devices. It matches the grid size to the screen size. Cell populations cycle every half a second.
The original population is a randomly generated, with a one in four chance of a cell being present, after that the above rules take over.
MENU OPTIONS:
Restart will regenerate another random selection.
Auto Restart will make an intelligent guess that the population has reached a stable or static situation and will automatically restart after around 20 seconds of such a situation being reached. It has a reasonable attempt, but it cannot spot all possible stable or static situations.
Start Edit: Stops the generation and allows you to edit the cell pattern.
Pocket PC: - Tap the screen to create or remove a cell.
Smartphone:- Use the D-Pad to move the inverted cursor to the required square and press the centre Enter button.
Clear will erase all cells.
Run restarts the generations.
Wraparound removes the bounding effects of the edges of the display. When selected, cells' affects are allowed to roll over, left/right and up/down. The display, in effect, then becomes part of an infinitely repeating pattern.
Pressing the OK button does not terminate the program. Select End Program to close it completely.
If you have a Wizard, Kaiser or similar device, where the display can be switched from portrait to landscape, and if you do so, the program will continue, but you may invoke a near catastrophic extinction, as the display gets realigned to the new layout.
For a more complete article on this topic, have a look at:-
http://en.wikipedia.org/wiki/Conway's_Game_of_Life
The samples image shows a few shapes to try. They are the glider, the R pentamino, the spinner and the 10 consecutive cells. The R Pentamino generates a chaotic pattern of many cycles before it settles down, all the others are static/cyclical patterns. Auto Restart cannot detect the 10 consecutive cells, the repeating pattern is too complex for it to spot.
Update: 17/06/2011 Version 1.1 fixes the Embedded C++/WinMo 6.5.3 Dialog Box issue mentioned in
http://forum.xda-developers.com/showthread.php?t=635063
If you are running Winmo 6.5.3 and you downloaded this before 17/07/2011, you will need version 1.1 in the zip file below.
UPDATE: CE Version added.
If you have bought an ARM powered Windows CE device and are thinking
"What the hell do I do with this?!!"
try the CE version, then you can think,
"What the hell does this do?!!!"
Do not run the CE version on your SmartPhone or PPC device, the display will look awful. The same applies to running the Mobile version on a CE device, but try it if you must. An extra caveat is that your CE device should be running a version backwardly compatable with the Embedded C++ 4.0 'Standard' SDK
P.S. I wrote this program originally to run under DOS, over twenty years ago. It was written in 8086 assembly language, as it was the only way to get it run fast enough on a 12Mhz 80286, and drive an 640x480 mono VGA screen fast enough for it not to look awful. These days, on a current Intel Core class processor, the same program now runs through hundreds of generations per second, rendering it almost useless. Even though the program is now ported to C++ under a completely different platform, some of the original code optimization methodologies remain. They still work!
Thanks a lot.
Updated to 1.2
On Pocket PC/WinMo Professional/Windows CE platforms only:-
During 'Edit' mode, click and drag to set or erase a series of consecutive cells. Set or erase depends on whether the first cell clicked was empty or occupied, respectively, and will continue in the same mode until the mouse or stylus is lifted.
This makes it much easier to create the 10 cell line pattern as mentioned above.
None of this applies if the program is running on Smartphone or WinMo Standard platforms.
So I got tasker up and running and have set up a small scene for when I plug my headphones in. It pops up a small screen asking what I'm doing, and I can either click do nothing (does just that), play music (sets volume levels and starts music), or car mode, which sets volume levels/wifi/blutooth/gps sensors and starts my ecu communication app (torque).
The only problem is, like any good computer science student, I know to unload something when done with it, and I unload the scene. This has the wonderfull effect reverting everything that little menu did back to it's previous state. I've come up with a few possible solutions, but have some gripes with each of them (see below). My question is though, is there any way to make those system changes static, so that when I unload the menu, it doesn't revert it's changes?
Solution 1 - Do not unload the menu, just hide it and have the profile that activates when I unplug my headphones unload it.
Problem - This leaves it in memory. Not the largest chunk of wasted space ever, but still less than desirable. Looks better to me than solution 2 though.
-------------------------------------------------------------------------
Solution 2 - Have the button set a variable which when active starts another profile to do all those things
Problem - That just creates 1 (or more) extra profiles that I assume tasker is constantly monitoring the status of. That's wasted cpu cycles right there.
-----------------------------------------------------------------------
Solution 3 - Somehow make the changes persistent, so that they do not revert when the scene is unloaded.
Problem - I'm not sure if it's possible to do this. Help would be appreciated, thank you!
OK so I got my Z4 tablet three days ago. Fantastic construction, fantastic specs on paper.
I had a Z tablet up until last weekend that I sold for a good price and got this as a much needed replacement.
Both are LTE versions.
Anyway, here are some things I've noticed and I would like to have your comments on.
1) The "antitheft" system for the first two days seemed to be a PITA. As my device is set for three users (me, my wife, my son), it kept popping for the others that it locked and needed MY credentials to unlock. I did unlock it at least five times for each, which means I can't really be... far from the device and let them use it. That I use two step authentication, makes things even harder. Once my "authenticator" phone was out of power and I had to wait several minutes to unlock the tablet. Yesterday I updated to latest firmware and I haven't noticed the issue since. But it's just one day, it may come back. Once (before updating firmware) I tried to disable My Xperia (although I love the find my device feature) so they could work, but it kept me "waiting". In the end I pressed back and it didn't get disabled. Any similar experiences with the theft protection?
2) Backlight (set in auto) seems to be too dark some times. I clicked on the intensity bar, set it brighter while STILL in auto (like it is now set to have a brighter "base value"?). Does this sound normal?
3) This is not a Z4 issue, I also had this in Z. It's probably a lollipop thing or I don't understand something properly. Clicking the volume buttons I can set it to "no" sound from home screen. Or so I think. Because even if I set it to "off", apps STILL have sound and I have to RE-adjust the volume to off from within the app (without the "priority buttons" under the volume bar)... Am I the only one to find this stupid?
4) Anybody notices some lag or ESPECIALLY stuck web browser, when other profiles (users) have run apps? If I reset the device and not visit the other profiles, the device is more snappy. If some other user goes in, even quiting every app they run, the device seems to get slower when back in "owner" user. Still fast but not as "snappy". Anybody noticed the same?
5) Any idea when we get Android M? Will we get 5.1 before that? I mean official firmware. Anybody?
6) Is there a way to go to test menu? The tablet Z method doesn't seem to work.
7) Serious. No restricted profiles. Why? Sony support replied that lollipop has this disabled only on 3G/LTE devices (that makes no sense), yet my Z was also LTE and both are on lollipop 5.0.2 and it DID have restricted profiles. What's up with that?
Thank you for your time people, have fun.
...wow
2) Yes.. brightness is usually set a little low at first for battery purposes.
3) There are different volumes for different things. Using the volume rocker on the home screen and putting it all the way down will only adjust ringer/notification volume. In-app sounds will use the media volume which you will need to adjust while media sounds are playing or you can adjust it in your sound settings. Not stupid imo, just gives more flexibility.
5) It'll come when it comes.. nobody knows except google and sony. I'd like to hope we'd get 5.1 before 6.
(pending something on the other questions above)
2) So the set value, when brightness is in "auto" is like a base value?
3) Well I find it stupid. Why: Because when I am in home screen I used to be able to manage the universal audio settings of the device. Turning device to mute, would turn it to mute. As simple as that. Also clicking a simple icon next to volume bar, you could separately adjust notification and ringer and stuff like that. Now? You THINK you set your device to mute, but you have only set the notifications. You sleep in a silent house (next to the wife or something), start a game, it YELLS with the last volume settings, ignoring that you set the device to mute in home screen and you have to "run" and re-adjust the volume to zero, usually with some delay (in the meantime waking everybody) since the device won't let you adjust anything while loading the game. No, I call this stupid.
5) Well if it won't delay 6, I don't mind for 5.1. But I want 6 the soonest possible.
Hello! I have just transferred from Apple to Android, and I couldn't be happier!
There are a few things I would like to know to enhance my experience:
1. How do you move, not copy, my pictures/videos from my Galaxy S6 Edge to my computer (Mac)? I tried Android File Transfer and AirDroid and both copy the files, not move the files. In addition, if there is an app that can modify the file names upon import, that will be super! For example, I used to use Nikon Transfer which allows me to set rules for the filenames upon import (e.g. MMDDYYYY_###).
2. I find the night clock function to be useful during the day when I need to glance at a time without pressing any button. I set it to be on from 8 am to 8 pm, but I find that a lot of the times the clock is not there even though it's set to be on. In addition, when it is on, the brightness is so dim that I can't see. Swiping on the edge left and right a few times make it brighter, but I want to make it as bright as possible all the time and also be on.
3. What is the most convenient, universally accepted pay app in the U.S.? (live in the northeast). Android Pay or Samsung Pay?
4. How do you turn off the startup sound and annoying Verizon logo?
Being a noob to android and also with the warranty I don't want to root the device yet.
Please share your expertise!
if i am not wrong the night clock feature turns on while your phone is on idle for a specific amount of time maybe you receive notifications etc which prevents it from turning on. secondly i have never used the feature outdoors but as the name suggests it's a night clock and is supposed to be always on at your side table etc during night time i assume it was designed to be dim to conserve battery.
in order to change your boot animations and startup sounds you need to be rooted. rooting is the android equivalent of jailbreaking in iphones which gives you complete access to your phone after which you can flash mods, custom roms which have there own unique features, custom kernels tailored for different needs (performance, battery savers etc) and many more there are some nice mods for the edge which i think you'll like.
http://forum.xda-developers.com/gal...4-cocktail-autoon-mod-galaxy-s6-edge-t3116699
http://forum.xda-developers.com/gal...4-28-musicplayer-feed-galaxy-s6-edge-t3095371
the second link does not require root..welcome to the dark side bro
The app is setedit and you'll need to hand over almost $3 Canadian if you want these tweaks. 1 of them will work for sure without needing to enforce but I think it's a sweet deal and 3 of these are working on Pie. 2 of them, or even 1 is worth the price.
You'll need to go into a shell and enter exactly:
pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS
Copy and paste it. If you don't know how to do that just look up ADB, android developer options, and Samsung USB drivers.
First the freebie. Go into Secure Table and click +add new setting (your first entry may ask you to grant a permission. DO IT)! enter: clock_seconds value: 1 BOOM! Hope you like it because it'll NEVER go away! Just kidding. If you factory reset... or simply enter a value of 0 you'll be rid of the ticker.
Next up I think is a freebie, too. Still in Secure Table, scroll down to sysui_qs_tiles delete everything. NO DON'T! Carefully, without erasing the entire list, add in MobileData exactly like that. So actually it'll be a comma first. Have a look around for other tiles because 'ol Sammy likes to keep things real tight with the carriers. You can also remove some but I think it's best to not potentially freezing your phone up.
Now, pretty sure these ones will need the guardian to stick so if you can manage 3 bucks it'll be worth it, especially the last 2!
Change tile rows and columns.
Right above the tile edit in Secure Table is sysui_qqs_count I like a value of 7. Don't go too small or too high. Or do it and see what happens. Please don't. I can only vouch for 7 and 8. I have heard of 3 but never tried it. This changes the first row, first pull on notification menu.
Now to change the rows, the long pull I guess you can call it, qs_tile_row in Secure Table still. I do 4. I heard if you enter in 50 you get a widescreen TV. No idea. I only tried 4.
Screen Timeout not long enough?
While some of you may not need it, I need more than 10 minutes. Head to System Table and... not sure why, but I think this needs both screen_off_timeout_rollback AND screen_off_timeout to work. I set mine to 1800000 (yes 5 zeroes) to get 30 minutes. Do it on both. Double that, 3600000 will give you an hour. So if you want 13 minutes and 27 seconds, figure it out. I think entering a value of 1 will get you a free trip to the ODIN app. Don't know what that is? You'll find out pretty quick if you screw this one up. Of course you're gonna head to the menu and look to see a new entry of 18 minutes and 55 seconds. Not happening. What you will see is that no selection is made. DON'T TOUCH IT! Just leave it alone. It's working. This one works in Pie. Only one setting is needed. Can't remember but you'll find it.
These 2 are the bestest and they work in Pie.
Goodbye HIGH BRIGHTNESS and HEADPHONE VOLUME warning!
In Global System set audio_safe_volume_state to a value of 2. "But mine's already at 2." So then you've been warned. Now add it to the guardian.
In System Table, you'll want to alter a value of 1 in the shown_max_brightness_dialog "But I don't have that entry." So close the app, crank up the brightness and be told how evil it is. Wasn't that fun? Now fix up the entry. Add it to the guardian with the 1 value and if set to 0 don't forget to change to 1
*NOTE* most of these values take about 15-45 seconds to kick in after every reboot. So, before you reboot and say it doesn't work, well, you're kinda right. But you'll soon forget about it and one day be able to reboot without seeing if it works or not. Finally, one day, you'll go to turn up the brightness, or volume, and that warning will not appear. And THAT'S when the real joy is felt. As you're cranking up that slider, in all of .02876 seconds, you're going to think, "Stupid warning" "OMG I am not gonna get a warning" "Hey cool I didn't get the warning. Anyone see that?"
Bonus Feature! When bored I random;y change values of random entries. See how fast you can screw yours up! Don't play with anything unless it's your friend's phone. We're not friends.
I can't vouch this works on any other device except A8. It's a representation of what's on your phone. Adding a custom ROM will change the output and results. Use your noggin, yo
Finally, I turned off battery optimization for the app and feature pack, and turned off notifications. It works fine. No usage pops up because it's very small and no problems with enforcing the edits. No annoying notification required.
mindlery,
I'm doing an article about Drone flight and high NITS display devices. A tablet or phablet that can display the sun equivalent brightness is very expensive so most pilots use cell phones. Of these cell phones samsung and lg both have models that will BOOST brightness (manually at least on the lg G7) but it will only boost for up to 3 minutes. one might think its' a heat issue but the timer is probably a battery saver because when flying I keep resetting my boosted brightness on the Lg-G7 and the phone never gets warm.
So you appear t6o have knowledge on this and there may be an opportunity to help a bunch of pilots if a boost timeout can be changed (easily via app or some easy method) to fix the boosted time to about 30 minutes or make it a manual switch.
If you are at all interested, I'm going to do an article and video for other pilots on this if I can get a solution down.
Bill