Tag Archives: bug

Bulls & Cows version 3.1.5 released

I’m happy to announce that a new version of Guess a Number – Bulls & Cows is now available on Google Play

This release focus on stability, performance improvements and Android 13 support.

Bulls and Cows is a logical game for guessing numbers also known as 1A2B

Get it on Google Play

Bulls & Cows is a logical game for kids and adults, also known as Mastermind, 4digits or 1A2B. Your goal is to find the opponent’s secret number with a minimum number of suggestions.

On each guess the game announces the number of “cows” and “bulls” in your suggestion. If the matching digits are on their right positions, they are “bulls”, if they are on different positions, they are “cows”.

You can play Bulls and cows in two game modes: Single player or Against Android.

In Single player mode you try to guess a secret number. To win you must reveal your opponent number.

When playing Against Android you start by choosing your difficulty (easy, medium or hard) and entering your secret number. On the next turn your opponent generates
his secret number and announces the number of matching “bulls” and “cows”. Winner in this competitive game mode is the first person to reveal their opponent secret number.

You can make the game more challenging by choosing ‘hard’ difficulty and using five-digit or six-digit secret numbers. If you are stuck finding the secret number use a hint. To help you compete better Bulls & Cows features a draft (as we call it) where you can mark digits that you think are included or not in your opponent secret number.

If you fill like customizing there are many aspects where you can make it your own personal experience. You can for example change the theme,
or decide to play without zeroes. Check out settings…

Example:

Secret number: 8561
Opponent’s try: 3518
Answer: 1 bull and 2 cows. (The bull is “5”, the cows are “8” and “1”.)

Bulls and Cows is a logical game for guessing numbers also known as 1A2B Bulls and Cows is a logical game for guessing numbers also known as 1A2B Bulls and Cows is a logical game for guessing numbers also known as 1A2B

Bulls & Cows / Guess a number features:
* Single player and multiplayer game modes.
* Different difficulties: ‘Easy’, ‘Medium’, ‘Hard’
* Playing with 3, 4, 5 or 6 digits
* Ability to choose whether to play with leading zero in numbers, or disable zeroes at all.
* Hints to help you when you are stuck.
* Draft, where you can mark digits that you think are included or not in your opponent secret number.
* Analyzing your moves in the game history.
* Themes (dark ocean green, light ocean green, dark blue, orange, pink)
* Intuitive interface featuring Material design.
* Multi window mode (Android 7.0 and up)
* Notch (display cut outs) support
* Touch and sound effects.

Get it on Google Play

Brick Game version 4.0.4 released

I’m happy to announce that a new version of Brick Game is now available on Google Play

This release focus on stability, performance improvements and Android 13 support.

Brick Game - Classic puzzle game with falling bricks where you remove lines and gain points

Get it on Google Play

Bricks Game’ is an interesting classic puzzle game with falling bricks where different types of shapes continuously fall from above. You should place bricks in order to have full lines with blocks. The goal of Falling Bricks game is to score as many points as possible by clearing horizontal lines of blocks. Lines are cleared when they are fully filled with blocks and have no empty spaces. Each removed line gives you 100 points. When playing the game, you rotate the falling bricks or move them, left and right.

Check upcoming brick in the top right corner of the screen and plan for it. Complete lines to gain points and raise the level. When you pass a level the blocks start to fall faster and the game becomes a real challenge. If the bricks land above the top of the playing field, the game is over.

Brick classic game features:
✅ Different level of difficulty – easy, medium, hard, expert
✅ Customizable controls
✅ Endless mode
✅ Beautiful patterns
✅ 11 different shapes of bricks
✅ Increasing speed and level ↗️
✅ Pause/Continue game
✅ Best score
✅ Easy to play and pleasurable game for all ages
✅ Easy to learn and fun to master game play
✅ Play game without internet and no time limit
✅ Play free game anytime and anywhere

Get it on Google Play

Fuel Oil Mix Calculator version 2.0.4 released

I’m happy to announce that a new version of Fuel Oil Mix Calculator is now available on Google Play.

This release focus on stability and performance improvements.

Fuel Oil Mix Calculator

Fuel Oil Mix Calculator is a small app designed for calculating the amount of oil required for fueling a 2 stroke gasoline engines.

Enter the desired mixture ratio (or choose from the list of vehicles) and enter the quantity of fuel. Click the calculate button and you will know the exact amount of oil for the mix.

Features:
– Custom mixture ratio
– ‘Vehicle Editor’ which let’s you manage all yours 2-cycle gasoline equipment.
– Supports US and metric units.
– Option to keep the screen on while using the app.

Get it on Google Play

Copying Cyrillic URLs in Google Chrome and Firefox

Using Google Chrome, I encountered strange bug affecting the copying and pasting of cyrillic urls.

When pasting, the non ASCII characters in the Url are converted to Punycode.

Performing some tests revealed that the same behaviour is present also in Firefox.

Punycode produced by Google Chrome and Firefox

Punycode produced by Google Chrome and Firefox

Doing some research led me to Issue 68718, unfortunately marked as WontFix stating:

Links on Wikipedia itself are a red herring, as comment 50 notes -- they're escaped in the page source.  The actual issue here is demonstrated by the link in comment 0.  We escape URLs when copying them.  This behavior matches Firefox 4 (by default) and Safari 5, though not IE9.

We added this behavior on  issue 2820  to fix a variety of problems in languages like Japanese.  Because those problems resulted in users unable to navigate to the pasted links, whereas this issue seems to be solely about cosmetics (in that escaped URLs are ugly and hard to read), preserving that behavior change seems like the more important thing to do.

Workarounds

Few things can be done if this issue is affecting your day to day usage of Google Chrome…

  • Before copying the URL add any character at the end of it, then erase it. After this operation the copied URL will preserve its structure not producing punycode when pasted.
  • Use the COPY URL extension.
  • Use a different browser. Microsoft Edge on Windows and Safari on OSX are producing the expected results.

Featured Image: https://wallpapercave.com/w/A7ZAUTz

Settings.canDrawOverlays() allays returns ‘false’ on Android O


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/paskov1/addon_domains/vmsoft-bg.com/paskov/root/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/paskov1/addon_domains/vmsoft-bg.com/paskov/root/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

I was updating one of my clients app, and testing it how it behaves on Android O (API 26). The app requires permissions to draw over system windows (android.permission.SYSTEM_ALERT_WINDOW). On Android 6 (API 23) and up, you are obligated to request ‘special’ permissions while the app is running.

The ‘SYSTEM_ALERT_WINDOW’ permission is a special permission that breaks the rules set by the new permission model available on Android 6 (API 23) and up. It’s request involves calling Settings.canDrawOverlays() and if it returns ‘false‘ starting ‘Settings‘ where the user can choose to grant your app the ability to draw overlays or not.

if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
{
   // On API 23 and later ask the user to grant us permission to draw system overlay
   // windows.
   if (!Settings.canDrawOverlays(this))
   {
      Intent intent = new Intent(
             Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
             Uri.parse("package:" + getPackageName()));
 
      startActivityForResult(intent, REQUEST_PERMISSION_SYSTEM_OVERLAY_RESULT);
   }
}

There is a bug with Settings.canDrawOverlays() (only) on API 26 where it will always return ‘false’ disregarding the actual user decision. The workaround provided here is a bit ugly, but does not involves restarting the app (which will be quite annoying for the user) after the permission is granted.

The code below first checks the result of System.canDrawOverlays() if it returns ‘true’ it continues with the rest of the application flow. If it returns ‘false’ a check if we are running on Android O (API 26) is performed. If that’s the case, we are calling our ‘workaround’ method.

The ‘workaround’ method tries to add an invisible overlay window on the screen, and if that’s OK we assume that we have a permission to draw overlays, else an exception is thrown.

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        super.onActivityResult(requestCode, resultCode, data);
 
        if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return; if(requestCode == REQUEST_PERMISSION_SYSTEM_OVERLAY_RESULT) { if(Settings.canDrawOverlays(this)) { m_permissionSystemOverlayWindowGranted = true; if(m_permissionReadPhoneStateGranted && m_permissionProcessOutgoingCallsGranted) { startService(new Intent(this, EstatePlusService.class)); m_layoutNoPermissions.setVisibility(View.INVISIBLE); m_progressBar.setVisibility(View.INVISIBLE); m_layoutLogin.setVisibility(View.VISIBLE); } } else if(Build.VERSION.SDK_INT == Build.VERSION_CODES.O) { // NOTE: This is a workaround to fix the bug in Android O where the // Settings.canDrawOverlays() will always return 'false' if(canDrawOverlays(this)) { m_permissionSystemOverlayWindowGranted = true; if(m_permissionReadPhoneStateGranted && m_permissionProcessOutgoingCallsGranted) { startService(new Intent(this, EstatePlusService.class)); m_layoutNoPermissions.setVisibility(View.INVISIBLE); m_progressBar.setVisibility(View.INVISIBLE); m_layoutLogin.setVisibility(View.VISIBLE); } } } } } /** * Workaround for Android O */ public static boolean canDrawOverlays(Context context) { try { WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); if (windowManager == null) { return false; } final View viewToAdd = new View(context); WindowManager.LayoutParams params = new WindowManager.LayoutParams( 0, 0, android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O ?
                                    WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY : WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
                            WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.TRANSPARENT);
            viewToAdd.setLayoutParams(params);
            windowManager.addView(viewToAdd, params);
            windowManager.removeView(viewToAdd);
            return true;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
 
        return false;
    }