Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Unlocking bootloader or flashing custom ROM doesnt void your warranty!

| 0 comments |
Since HTC started htcdev.com with the possibility to unlock bootloader on HTC devices, I noticed that false information and beliefs are spreading around the world and more and more people think (and tell!) other users, that their warranty will be voided after unlocking particular device. This is not true!

In the past I wrote a short article on xda-developers about warranties and why, against common believes, flashing custom ROMs does not void your warranty. You can find this thread here.

Heres some information worth pointing out:
  1. Warranty is a contract. In every country there are laws and regulations about warranties, however these vary from place to place and may be slightly different in your country, keep that in mind.
  2. If its a contract, then both sides have some obligations and rights. Both - rights and obligations - needs to be written in the warranty, otherwise they doesnt exist. Warranty statements must be consistent with generally applicable law.
  3. As a contract, warranty can be created as the parties want, as long as its consistent with generally applicable law.
  4. To know exactly whats written in your warranty dont try to Google it - take it out of the box and READ IT. Dont trust what others say - their warranty might be different to your own.
Now, the question is - why unlocking the bootloader doesnt void the warranty? The answer is very simple. Because HTCs warranty contract doesnt state it. The only information about warranty on htcdev.com you can find is this:



So, once again:

"It is our responsibility to caution you that not all claims resulting or caused by or from the unlocking of the bootloader may be covered under warranty."

Is there any information, that unlocking bootloader voids warranty? Nope. So basically, what does it mean? Only this - if you brick your device as a result of e.g. flashing custom ROM (unlocked bootloader allows you doing that), you may have no warranty claim for that particular incident.

Two more important things to conclude:
  1. If "not all claims may be covered under warranty", then (logic conversion) some claims may still be covered under warranty.
  2. Even if you cant claim something under warranty because it was caused by or from the unlocking of the bootloader, that doesnt mean you have lost your warranty. You still have your warranty and you still can claim under warranty, but this warranty wont cover those particular claims caused by or from the unlocking of the bootloader.
So basically, HTC warns you, that some of the actions you might take after unlocking the bootloader may lead to a situation, when particular issue cant be covered under warranty.

Also, this information on htcdev.com doesnt expand or restrict your warranty terms. It doesnt change it at all. If warranty is given in the paper form, then as a contract the only way to change it, is a paper form too (if not stated otherwise in the warranty itself). HTC just kindly reminds you some sort of information you can conclude from the warranty itself.

Once again, if you are interested why flashing custom ROMs doesnt void warranty as well, please read this thread.

PS. Im also wondering why Samsung users are so crazy about so called flash counter and "Triangle Away" application. They dont need it to have a valid warranty, even with a yellow triangle.



Disclaimer:

This text is just for education purpose. Its not a law itself so you cant base your claims versus a company on this. I may be wrong in many parts - feel free to write a comment under this post and I will make any necessary corrections. I dont know the laws in every country so there may be some slight differences.



Have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) below this post!
Read More..

Custom Spinner with text color

| 0 comments |
Modify from old post "Custom ArrayAdapter for Spinner, with custom icons", change to make the custom Spinner with selected text color.


Add a custom spinner in layout, layout/activity_main.xml.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout

android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
tools_context="com.blogspot.android_er.androidcustomspinner.MainActivity">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />
<Spinner
android_id="@+id/spinner"
android_layout_width="match_parent"
android_layout_height="wrap_content" />
</LinearLayout>


layout/row.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_orientation="horizontal">

<ImageView
android_id="@+id/icon"
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_src="@mipmap/ic_launcher" />

<TextView
android_id="@+id/weekofday"
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_textSize="20dp"
android_textStyle="bold"
android_textColor="#0000F0"/>
</LinearLayout>

MainActivity.java
package com.blogspot.android_er.androidcustomspinner;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

String[] DayOfWeek = {"Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Spinner mySpinner = (Spinner)findViewById(R.id.spinner);
mySpinner.setAdapter(new MyCustomAdapter(MainActivity.this, R.layout.row, DayOfWeek));
}

public class MyCustomAdapter extends ArrayAdapter<String> {

public MyCustomAdapter(Context context, int textViewResourceId,
String[] objects) {
super(context, textViewResourceId, objects);
}

@Override
public View getDropDownView(int position, View convertView,
ViewGroup parent) {
return getCustomView(position, convertView, parent);
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
return getCustomView(position, convertView, parent);
}

public View getCustomView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater=getLayoutInflater();
View row=inflater.inflate(R.layout.row, parent, false);
TextView label=(TextView)row.findViewById(R.id.weekofday);
label.setText(DayOfWeek[position]);

if(position == 0){
label.setTextColor(0xFFF00000);
}

return row;
}
}
}


Read More..

New features in Admin SDK Custom user attributes and opening up access to all domain users

| 0 comments |
By Muzammil Esmail, Product Manager, Google for Work

The Admin SDK provides a comprehensive directory experience for Google for Work customers to help them meet specific business needs around data storage for customers. Here are some important updates to this SDK.

Custom attributes in the user’s profile
Now available is a new feature in the Directory API which allows you to add custom attributes for your users. For instance, you could store the projects your users work on, their desk number, job level, hiring date — whatever makes sense for your business.

Once the custom attributes for your domain have been defined, they behave just like regular fields in the user profile. You can get and set them for your users and also perform searches on custom fields (e.g. “all employees that work on the shinyNewApp in Hyderabad”).

Custom attributes can be of different data types; they can be single- or multi-valued. You can configure whether they are “public” i.e. visible to everyone on the domain, or “private” i.e. visible only to admins and the users themselves.

Read access to all domain users
Historically, only admins have been able to access the data in the Admin SDK. Beginning today, any user (not just admins) will now be able to call the Directory API to read the profile of any user on the domain (of course, we will respect ACLing settings and profile sharing settings).

We hope that you will be able to use this new feature to build business applications (e.g. corporate yellow pages, expense approval, vacation management, workflow applications, etc.) that can be used by all your users.

Please feel free to go through our documentation to go learn more about the Admin SDK, and specifically the Directory API. Happy hacking!
Read More..

Custom AlertDialog with EditText and ImageView build with AlertDialog Builder

| 0 comments |

Example to builld AlertDialog with EditText and ImageView, build with AlertDialog.Builder.


Create layout/dialog_layout.xml, to define the layout of the dialog.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout

android_orientation="vertical"
android_layout_width="match_parent"
android_layout_height="match_parent">

<ImageView
android_id="@+id/image"
android_layout_width="wrap_content"
android_layout_height="wrap_content" />
<TextView
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_text="This is custom layout in custom dialog"/>
<EditText
android_id="@+id/dialogEditText"
android_layout_width="match_parent"
android_layout_height="wrap_content" />

</LinearLayout>

MainActivity.java
package com.blogspot.android_er.androidcustomalertdialog;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

Button btnOpenDialog;
TextView textInfo;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

btnOpenDialog = (Button)findViewById(R.id.opendialog);
textInfo = (TextView)findViewById(R.id.info);

btnOpenDialog.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openDialog();
}
});
}

private void openDialog(){
LayoutInflater inflater = LayoutInflater.from(MainActivity.this);
View subView = inflater.inflate(R.layout.dialog_layout, null);
final EditText subEditText = (EditText)subView.findViewById(R.id.dialogEditText);
final ImageView subImageView = (ImageView)subView.findViewById(R.id.image);
Drawable drawable = getResources().getDrawable(R.mipmap.ic_launcher);
subImageView.setImageDrawable(drawable);

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("AlertDialog");
builder.setMessage("AlertDialog Message");
builder.setView(subView);
AlertDialog alertDialog = builder.create();

builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
textInfo.setText(subEditText.getText().toString());
}
});

builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(MainActivity.this, "Cancel", Toast.LENGTH_LONG).show();
}
});

builder.show();
}
}


layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout


android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
tools_context=".MainActivity">

<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />

<Button
android_id="@+id/opendialog"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_text="Open Dialog"/>

<TextView
android_id="@+id/info"
android_layout_width="match_parent"
android_layout_height="wrap_content"
android_textSize="20dp"
android_textStyle="bold"/>
</LinearLayout>

Read More..

Create share and manage custom maps from Drive

| 0 comments |


Whether you’re planning your next event, mapping out the best route to visit clients, or sharing the location of your food truck with fans, Google My Maps makes it easy to put your world on a custom map. Starting today, you can access My Maps right from Google Drive on your Google Apps account, so it’s even easier to create, find and share your custom maps. Here are some examples:
Jessica owns a food truck and every Thursday she decides her location based on fan votes. She creates a Google Form and posts it online, gathers votes and can lay them all out on one map to find the most popular location.
Shannon is gearing up for her company’s annual conference. This year, with the help of Google Apps Script, she created a Drive folder for each attendee with their tickets, event information and a custom map with event details and their hotel.
Martin is the delivery coordinator for a multi-chain electronics store. He creates My Maps laying out the most efficient routes for all the deliveries. He drops each map into his team’s shared Drive folder, so each driver can access everything they need, from maps to delivery lists, all in one place. Once Martin assigns routes, drivers can use any device to simply search the folder for the right map.
My Maps is also helpful in the classroom to teach kids about explorers like Lewis and Clark, and to plan out your weekend hike. Whatever your needs, Google My Maps—now accessible in Google Drive—makes getting things done that much easier.
Read More..