119 views

Eclipse Error: Error parsing android-22\android-wear\armeabi-v7a\devices.xml

Issue:

Error: Error parsing Program Files\Android\sdk\system-images\android-22\android-wear\x86\devices.xml
cvc-complex-type.2.4.d: Invalid content was found starting with element ‘d:skin’. No child element is expected at this point.

Error: Error parsing Program Files\Android\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml
cvc-complex-type.2.4.d: Invalid content was found starting with element ‘d:skin’. No child element is expected at this point.

Solution:

  • close Eclipse
  • open files in text editor
  • comment out all tags contains d:skin
  • save files
  • reopen Eclipse
// before
<d:skin>AndroidWearSquare</d:skin>
// after comment out line
<!-- d:skin>AndroidWearSquare</d:skin -->
Posted in Bugs, warnings, errors, Eclipse | Tagged , | Comments Off on Eclipse Error: Error parsing android-22\android-wear\armeabi-v7a\devices.xml
155 views

Links too close together Mobile friendly page

Try set bigger line-height of links and font size for example:

/*in css*/
.links{
line-height: 48px;
font-size: 20px;
background-color: rgb(255,204,0);
}
 
/* in html page set class of link*/
<a class="links" href="m.mydomen.com/mypage.html">Blah blah mypage</a>
 
// or in css for all links on page
a {
line-height: 48px;
font-size: 20px;
}
 
/*html page*/
<a href="m.mydomen.com/mypage.html">Blah blah mypage</a>
Posted in Android Examples Code, JavaScript | Tagged , | Comments Off on Links too close together Mobile friendly page
229 views

php how detect mobile browser device Android ipad ipod

$user_agent       = $_SERVER['HTTP_USER_AGENT']; // get the user agent value
// look up for string as ipad, ipod, Android, Mobile etc.  
		if(preg_match('/ipad/i',$user_agent)){
                // we find the word ipad in the user agent
                } elseif(preg_match('/android/i',$user_agent)) {
                  if (preg_match('/mobile/i',$user_agent)){
                  // we find Android and Mobile
                  }
                } elseif(preg_match('/ipod/i',$user_agent)) {
                // we find ipod
                } elseif(preg_match('/opera mini/i',$user_agent)) {
                // we find opera mini etc. etc. etc. 
                }
Posted in Smartphone | Tagged | Comments Off on php how detect mobile browser device Android ipad ipod
214 views

JavaScript how detect mobile device and get screen width

How detect mobile users on web page by javascript and get width users display.

      if (navigator.userAgent.match(/Mobi/)) {
            alert("Mobi");
            var w = screen.width;
            // idTableMain replace with id of main table on your webpage 
            document.getElementById('idTableMain').width = w;
        }
Posted in Android Examples Code, Smartphone | Tagged , | Comments Off on JavaScript how detect mobile device and get screen width
600 views

phpbb forum mobile friendly theme style

– download any mobile styles for example http://www.artodia.com/phpbb-styles/mobile/
– unzip style into your forum style folder for example all art_mobile folder copy into 0:/myweb/forum/styles/
– folow instalation istructions http://www.artodia.com/phpbb-styles/mobile/tutorials/mobile-detection/
– check url result on https://www.google.com/webmasters/tools/mobile-friendly

Posted in Android Examples Code, Smartphone | Tagged , | Comments Off on phpbb forum mobile friendly theme style
222 views

How to create mobile friendly page

If using WordPress:
– update WordPress
– download Plugin Any Mobile Theme Switcher and upzip into yourweb/wp-content/plugins/
– open WordPress Dachboard on yourweb
– set defalut theme for desktop (Appearance – Theme)
– set themes for mobile users Settings – Any Mobile Theme Switcher for example Twentyfourteen theme
– preview page
– test page on Mobile Friendly Test

Posted in Android Examples Code, Smartphone | Tagged , | Comments Off on How to create mobile friendly page
463 views

Android Studio add jar library to project

Example: You want add myLibrary.jar into project

  • Put the myLibrary.jar into the libs folder in project tree (in Windows you can use Total Commander Ctrl+C and select libs folder in projetct then Ctrl + V paste file)
  • Right click on myLibrary.jar and hit ‘Add as library’
  • You can ensure that compile files ‘libs/myLibrary.jar’ is in build.gradle file
  • Clean and build project
Posted in Android Studio | Tagged | Comments Off on Android Studio add jar library to project
426 views

Set Default Start Up Activity Class Java AndroidManifest xml

Insert into your default start up activity tag inten-filter tag with action MAIN and category LAUNCHER

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.blabol"
    android:versionCode="1"
    android:versionName="1.0" >
 
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />
 
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
 
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
 
</manifest>
Posted in Android Examples Code | Tagged | Comments Off on Set Default Start Up Activity Class Java AndroidManifest xml
501 views

Eclipse update failed folder in use

Failed to rename directory ….
If using for update Android SDK manager,
try close Eclipse if is open.
Or change security settings of the folder which have problem.
Or disable antivirus for a moment.

Posted in Bugs, warnings, errors | Tagged , | Comments Off on Eclipse update failed folder in use
810 views

View overrides onTouchEvent but not performClick

public class Panel extends SurfaceView implements SurfaceHolder.Callback {
//............... code
//............... some code
   /**
     * Process the MotionEvent.
     */
    @Override
    public boolean onTouchEvent(MotionEvent event) {
 
        synchronized (getHolder()) {
            if (event.getAction() == MotionEvent.ACTION_DOWN) {
            	performClick();
             } else if (event.getAction() == MotionEvent.ACTION_MOVE) {
            	if(_currentGraphic==null)return true;
 
            } else if (event.getAction() == MotionEvent.ACTION_UP) {
            }
            return true;
        }
    }
/////////////////////////////
 @Override
 public boolean performClick() {
  // Calls the super implementation, which generates an AccessibilityEvent
        // and calls the onClick() listener on the view, if any
        super.performClick();
 
        // Handle the action for the custom click here
 
        return true;
 }
 
}
Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , , | Comments Off on View overrides onTouchEvent but not performClick
810 views