ANDROID_ID seems a good choice for a unique device identifier. There are downsides: First, it is not 100% reliable on releases of Android prior to 2.2 (“Froyo”). Also, there has been at least one widely-observed bug in a popular handset from a major manufacturer, where every instance has the same ANDROID_ID.
public static Bitmap getBitmapFromView(View view, int totalHeight, int totalWidth) {
Bitmap returnedBitmap = Bitmap.createBitmap(totalWidth,totalHeight , Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(returnedBitmap);
Drawable bgDrawable = view.getBackground();
if (bgDrawable != null)
bgDrawable.draw(canvas);
else
canvas.drawColor(Color.WHITE);
view.measure( View.MeasureSpec.makeMeasureSpec(totalWidth,View.MeasureSpec.EXACTLY),
View.MeasureSpec.makeMeasureSpec(totalHeight,View.MeasureSpec.EXACTLY));
view.layout(0,0,totalWidth,totalHeight);
view.draw(canvas);
return returnedBitmap;
} measurepublic static Bitmap getBitmapFromView(View view, int totalHeight, int totalWidth) {
Bitmap returnedBitmap = Bitmap.createBitmap(totalWidth,totalHeight , Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(returnedBitmap);
Drawable bgDrawable = view.getBackground();
if (bgDrawable != null)
bgDrawable.draw(canvas);
else
canvas.drawColor(Color.WHITE);
view.measure( View.MeasureSpec.makeMeasureSpec(totalWidth,View.MeasureSpec.EXACTLY),
View.MeasureSpec.makeMeasureSpec(totalHeight,View.MeasureSpec.EXACTLY));
view.layout(0,0,totalWidth,totalHeight);
view.draw(canvas);
return returnedBitmap;
} Notification.BigTextStyleNotification notif = new Notification.Builder(mContext)
.setContentTitle("New mail from " + sender.toString())
.setContentText(subject)
.setSmallIcon(R.drawable.new_mail)
.setLargeIcon(aBitmap)
.setStyle(new Notification.BigTextStyle()
.bigText(aVeryLongString))
.build();// return the orders with the sum of their amounts per account
GenericRawResults<Foo> rawResults =
orderDao.queryRaw(
"select account_id,sum(amount) from orders group by account_id",
new RawRowMapper<Foo>() {
public Foo mapRow(String[] columnNames,
String[] resultColumns) {
return new Foo(Long.parseLong(resultColumns[0]),
Integer.parseInt(resultColumns[1]));
}
});
<FrameLayout
android:id="@+id/linear_layout_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<FrameLayout
android:id="@+id/leftFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<FrameLayout
android:id="@+id/rightFragmentContainer"
android:layout_width="match_parent"
android:layout_gravity="top|left"
android:layout_height="match_parent"
android:layout_marginLeft="250dp"
/>
</FrameLayout><FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/leftFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<LinearLayout
android:id="@+id/linear_layout_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<View
android:id="@+id/stubView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".4"
/>
<FrameLayout
android:id="@+id/rightFragmentContainer"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight=".6"
/>
</LinearLayout>
</FrameLayout> android:process=":remote" то все упрощения (передача через static переменную, EventBus и т.д.) просто перестанут работать (из-за разных Application instance).java.lang.RuntimeException: Canvas: trying to use a recycled bitmapМне необходимо в бесплатном приложении реализовать внутреннюю покупку, после которой пользователь получает полный функционал приложения(который будет так же доступен если пользователь поменяет девайс).
consume() вызывать не нужно. Если вызвать consume(), то товар пропадет из списка купленных (в том числе и на других устройствах). Сonsume нужно только для многоразовых покупок (например покупка внутренней валюты в играх). В вашей ситуации покупка производится один раз. 
android:drawableRight="?android:attr/listChoiceIndicatorSingle"
<android.support.v7.widget.AppCompatRadioButton
android:layout_width="match_parent"
android:button="@null"
android:drawableRight="?android:attr/listChoiceIndicatorSingle"
android:layout_height="wrap_content"
android:id="@+id/radioButton1"
android:gravity="right"
android:text="sdf"/> String sHtmlTemplate = "<html><head></head><body><img src=\"file:///android_asset/img/mybadge.png\"></body></html>";
webView.loadDataWithBaseURL(null, sHtmlTemplate, "text/html", "utf-8",null); Почему именно так? Есть какие-то условия?
Выходит что разработчик указывает, что Content Provider должен возвращать MIME-тип "vnd.android.cursor.item/что-то там"?Да именно так.