386 views

htaccess code

Change sitemap.txt to sitemap.php if url http://domain.com/sitemap.txt

# http://domain.com/sitemap.txt open sitemap.php
# in sitemap.php is function what return list of address
RewriteRule ^sitemap\.txt$ sitemap.php [L]
RewriteRule ^sitemap$ sitemap.php [L]

Remove www before subdomain name
www.www.subdomain.example.com
to
subdomain.example.com

RewriteCond %{HTTP_HOST} (^|\.)(www\.)([^\.]*)\.example\.com$ [NC]
RewriteRule (.*) http://%3.example.com/$1  [R=301,QSA,L]
Posted in Uncategorized | Tagged | Comments Off on htaccess code
1,274 views

Android Speedometer Tempomat Utility Tools

Speedometer Cruise Control Tempomat – warning sound after exceeded speed limit DOWNLOAD only from PLAY GOOGLE.
Do not set up while driving (To comply with the laws Your country).
1.) Button MILE / KILOMETER change units.
Set up warnings:
2.) Buttons 15 to 130 set up the speed limit.
3.) Button CURRENT SPEED set current speed like the speed limit.
4.) Stop Start the Warning Sound button
5.) Button UNLIMITED set unlimited speed.
6.) Hide/Show unused buttons
The warning sound sounds when the limit is exceeded by 10%.
For example: Limit:70 – warning sound sounds if speed is 77 and more.

speedometer_tempomat_guide_1.png

speedometer_tempomat_guide_2.png

Menu: Edit Warnings
You can to create new location of warning and update this one.

edit_warnings-location.png

Edit warning location – click to new place of map. Edit bearing if it is different from the previous point. Press UPDATE button.

bad-warning-speedometer.png

Create a New Warning
new-warning.png

Speedometer Cruise Control Tempomat – warning sound after exceeded speed limit DOWNLOAD only from PLAY GOOGLE.

Posted in Android Software Download | Tagged | Comments Off on Android Speedometer Tempomat Utility Tools
1,588 views

Android 4.4 Lenovo A6000 black screen

Try reboot device.
Start device with start button on side of phone.
Screen will go to light black color.
Long press Start button for menu:
Power off
Reboot
Airplane mode

Reboot item is in same level like Start button.
Click on the screen – (Hear a click)
Now find OK button , it is under Reboot item on right side of screen.
Press OK (Hear a click)
Wait a moment.
If device to do nothing , try short press Start button (sreen will black)
and again to press Start button. If screen go to light black color,
try again find Reboot item as written above.

Posted in Android Examples Code, Bugs, warnings, errors | Tagged , | Comments Off on Android 4.4 Lenovo A6000 black screen
1,915 views

Android runtime change switch Activity theme

static boolean mbThemeLight = false;
 
 @Override
    public void onCreate(Bundle savedInstanceState) {
         if(mbThemeLight)
        setTheme(android.R.style.Theme_Light);
        super.onCreate(savedInstanceState);
        // bla bla bla..........
    }
 
private void switchTheme(){
 mbThemeLight = true;
 this.recreate();
}
Posted in Android Examples Code, Android Studio | Tagged | Comments Off on Android runtime change switch Activity theme
2,005 views

Expected resource of type raw drawable

Try insert + before R.drawable.xxxx

// error
InputStream is = context.getResources().openRawResource(R.drawable.app_sample_code);
 
// ok
InputStream is = context.getResources().openRawResource(+R.drawable.app_sample_code);
Posted in Android Examples Code, Bitmap, drawing, Bugs, warnings, errors | Comments Off on Expected resource of type raw drawable
2,727 views

Call requires permission which may be rejected by user

Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`

 
try {
// your code for example: 
//  LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);         
//  Criteria criteria = new Criteria();
//        provider = locationManager.getBestProvider(criteria, false);
//  locationManager.requestLocationUpdates(provider, 400, 1, this);
        } catch (SecurityException e) {
            e.printStackTrace();
        }
Posted in Android Examples Code, Bugs, warnings, errors | Tagged | Comments Off on Call requires permission which may be rejected by user
2,594 views

Error type 3 Activity class does not exist

Try some solution – each individually or all

  1. Check AndroidManifest.xml activity declaration
    <activity
                android:name=".EnableProfileActivity"
                android:label="@string/app_name" />
  2. Delete BUILD folder in module tree and Clean / Rebuild project
  3. Restart Android Studio
Posted in Bugs, warnings, errors | Tagged , | Comments Off on Error type 3 Activity class does not exist
2,474 views

Android Studio Gradle Download Link

I You use offline work for better building speed of project or for other purpose
https://gradle.org/releases

Offline work:
File – Settings – Gradle
– select Use local gradle distribution
– select path Gradle home:
– check Offline work

Posted in Android Studio | Tagged | Comments Off on Android Studio Gradle Download Link
2,529 views

EditText.setOnKeyListener not working on maxLines EditText

Check this in XML file if use singleLine
singleLine change to maxLines (1 if singleLine)
declare inputType

        android:maxLines="1"
        android:inputType="text"
Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , | Comments Off on EditText.setOnKeyListener not working on maxLines EditText
2,543 views

ArrayList Sublist Join Compare Loop Synchronize HashMap Sort Tree

Link to tutorial

ArrayList Sublist of ArrayList Join two ArrayList Compare ArrayList Initialize ArrayList Loop ArrayList Sort ArrayList Array to ArrayList ArrayList to Array Synchronize ArrayList Serialize ArrayList LinkedList Loop LinkedList Vector ArrayList vs Vector ArrayList vs LinkedList HashMap Loop HashMap Synchronize HashMap Sort HashMap Serialize HashMap ArrayList vs HashMap TreeMap LinkedHashMap HashSet TreeSet LinkedHashSet ArrayList Methods

Posted in Android Examples Code | Tagged , , , , | Comments Off on ArrayList Sublist Join Compare Loop Synchronize HashMap Sort Tree
2,543 views