How to compare the performance of Android Apps written in Java and Xamarin C#? Anyway to check quantitative data (code & results) [closed]

Yeah, Xamarin’s Mono virtual machine is more impressive than Google’s Dalvik used in Android. I have tested it with HTC Flyer and Acer Iconia Tab tablets to benchmark the C# port of Android through Mono against Java Dalvik, with the C# implementation of Android well and truly trouncing the Java-based Dalvik.

How to start an application using Android ADB tools

adb shell am start -n com.package.name/com.package.name.ActivityName Or you can use this directly: adb shell am start -n com.package.name/com.package.name.ActivityName You can also specify actions to be filter by your intent-filters: am start -a com.example.ACTION_NAME -n com.package.name/com.package.name.ActivityName

No matching client found for package name (Google Analytics) – multiple productFlavors & buildTypes

Check your package name on your google-services.json it should be same with your local package name of your app Example “client_info”: { “mobilesdk_app_id”: “1:6596814400689:android:65d6f25f5006145”, “android_client_info”: { “package_name”: “com.my.app.package.name” } In this case my local package name is com.my.app.package.name so also i have changed my package name in google-services.json with my local package name

Is it possible to have multiple styles inside a TextView?

In case, anyone is wondering how to do this, here’s one way: (Thanks to Mark again!) mBox = new TextView(context); mBox.setText(Html.fromHtml(“<b>” + title + “</b>” + “<br />” + “<small>” + description + “</small>” + “<br />” + “<small>” + DateAdded + “</small>”)); For an unofficial list of tags supported by this method, refer to … Read more

Android: combining text & image on a Button or ImageButton

For users who just want to put Background, Icon-Image and Text in one Button from different files: Set on a Button background, drawableTop/Bottom/Rigth/Left and padding attributes. <Button android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:background=”@drawable/home_btn_test” android:drawableTop=”@drawable/home_icon_test” android:textColor=”#FFFFFF” android:id=”@+id/ButtonTest” android:paddingTop=”32sp” android:drawablePadding=”-15sp” android:text=”this is text”></Button> For more sophisticated arrangement you also can use RelativeLayout (or any other layout) and make it clickable. … Read more

How to change progress bar’s progress color in Android

For a horizontal ProgressBar, you can use a ColorFilter, too, like this: progressBar.getProgressDrawable().setColorFilter( Color.RED, android.graphics.PorterDuff.Mode.SRC_IN); Note: This modifies the appearance of all progress bars in your app. To only modify one specific progress bar, do this: Drawable progressDrawable = progressBar.getProgressDrawable().mutate(); progressDrawable.setColorFilter(Color.RED, android.graphics.PorterDuff.Mode.SRC_IN); progressBar.setProgressDrawable(progressDrawable); If progressBar is indeterminate then use getIndeterminateDrawable() instead of getProgressDrawable(). Since Lollipop … Read more

This Activity already has an action bar supplied by the window decor

I think you’re developing for Android Lollipop, but anyway include this line: <item name=”windowActionBar”>false</item> to your theme declaration inside of your app/src/main/res/values/styles.xml. Also, if you’re using AppCompatActivity support library of version 22.1 or greater, add this line: <item name=”windowNoTitle”>true</item> Your theme declaration may look like this after all these additions: <!– Base application theme. –> … Read more

How to make an Android device vibrate? with different frequency?

Try: import android.os.Vibrator; … Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); // Vibrate for 500 milliseconds if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE)); } else { //deprecated in API 26 v.vibrate(500); } Note: Don’t forget to include permission in AndroidManifest.xml file: <uses-permission android:name=”android.permission.VIBRATE”/>

Installing ADB on macOS [duplicate]

Note for zsh users: replace all references to ~/.bash_profile with ~/.zshrc. Option 1 – Using Homebrew This is the easiest way and will provide automatic updates. Install the homebrew package manager /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)” Install adb brew install android-platform-tools Start using adb adb devices Option 2 – Manually (just the platform tools) This … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)