android-sdk-2.1

Android Intent Action “ACTION_INSERT_OR_EDIT” - should it be used for adding contacts?

大城市里の小女人 提交于 2019-12-20 10:26:12
问题 At the moment I am searching for an easy and supported way of adding contacts in Android up from SDK level 7. (when some kind of data like the phone number is available) I looked at the default contact application and found "Intent.ACTION_INSERT_OR_EDIT" which is used for adding a new contact (or adding a number to a contact from the contact provider) from the dialer screen with the mime type "vnd.android.cursor.item/person". Now it would be nice to know how to find some documentation about

how to limit seekbar

别等时光非礼了梦想. 提交于 2019-12-18 11:41:10
问题 I'd like to set max and minimum limits of SeekBar to 50 and 20 respectively. SeekBar has a direct option top provide max value, but how to set its minimum value to 20 rather than 0? 回答1: In SeekBar you can set only max value. <SeekBar android:id="@+id/SeekBar01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="50"/> And, You cannot directly set the minimum value to the seekbar. SeekBar mSeekbar = (SeekBar) findViewById(R.id.SeekBar01); mSeekbar

How do I add contact to a group on Android?

亡梦爱人 提交于 2019-12-18 05:24:10
问题 I read about ContactsContract.CommonDataKinds.GroupMembership, but I can't figure out what URI use to insert to. I have prepared this method: public static Uri addToGroup(ContentResolver resolver, long personId, long groupId) { ContentValues values = new ContentValues(); values.put(ContactsContract.CommonDataKinds.GroupMembership.CONTACT_ID, personId); values.put(ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID, groupId); return resolver.insert(uri, values);//URI is not known }

How to get my contact card/id on Android?

筅森魡賤 提交于 2019-12-12 22:09:17
问题 How do I get my contact card/id of a Android phone? eg: the owner of the phone 回答1: This is not supported by the Android platform. On some phones (HTC, Sony Ericsson) there is a provider (e.g HTC uses content://contacts/myContactCard) that will retreive this, but this is not supported on all devices. 回答2: It is not supported but there is a ticket on android. http://code.google.com/p/android/issues/detail?id=3898 Please star it in order to this ticket get a higher priority. 来源: https:/

Eclipse - “compute launch button tooltip” error

江枫思渺然 提交于 2019-12-12 11:28:08
问题 I'm trying to run Android SDK with Eclipse for the first time. I have never used Eclipse before and I'm running into the following error message over and over again, with no specific trigger: "compute launch button tooltip has encountered a problem". See screenshot attached. I tried to Google it but I can't find a solution. It's driving me crazy, please help. I'm using Ubuntu 12.04 LTS . I tried re-installing Eclipse, same thing. 回答1: See this SO answer to a similar question with the same

Continuously tracing the available bluetooth connections in the mobile's vicinity using android

℡╲_俬逩灬. 提交于 2019-12-11 08:17:03
问题 I need to continuously monitor the bluetooth devices which are present every 5 seconds. I have written the following piece of code which is not working for me. private static final int DISCOVERY_REQUEST = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bluetooth_connection); final TextView tv = (TextView) findViewById(R.id.textView1); tv.setText(""); final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter

onPreviewFrame doesn't change the data

只谈情不闲聊 提交于 2019-12-11 07:44:03
问题 It is my first time programming on Android, and more I am not that familiar with the java programmation. I tried to find some answer on my problem over the internet but didn't find any solution. I hope one of you will be able to help me. What I want to do is applying some image processing in real time to the video camera and display it. That is why I am using the function onPreviewFrame the make some image processing before display the result. Please tell me if it isn't the best way. my

Newly added contacts not visible in Android Emulator contacts

微笑、不失礼 提交于 2019-12-11 05:12:19
问题 I am adding new contacts as follows:- ContentValues values = new ContentValues(); String accountType = "test@gmail.com"; values.put(RawContacts.ACCOUNT_TYPE, accountType ); String accountName = "com.google"; values.put(RawContacts.ACCOUNT_NAME, accountName ); Uri rawContactUri = getContentResolver().insert(RawContacts.CONTENT_URI, values); long rawContactId = ContentUris.parseId(rawContactUri); //Add contact number values.clear(); values.put(Data.RAW_CONTACT_ID, rawContactId); values.put(Data

Any way to get the sender phone number from a received sms on android?

拟墨画扇 提交于 2019-12-11 04:59:22
问题 I wrote send and receive sms program sucsessfully but I want to that checked receiver phone number in onReceive method. how can i get the sender phone number from a received sms in android? I wrote this code but it dosent worked!!! please check it and help me. public class SmsReceiver extends BroadcastReceiver { public String str = ""; @Override public void onReceive(Context context, Intent intent) { // ---get the SMS message passed in--- Bundle bundle = intent.getExtras(); SmsMessage[] msgs

Where is Android SDK option to install on Android Studio?

匆匆过客 提交于 2019-12-11 03:06:57
问题 I've just formatted and installed a fresh windows 10. Next, I downloaded Android Studio and didn't see the Android SDK option to install. Android_Studio_Install_Option I installed it nevertheless. Naturally, after I opened Android Studio, it opened a window saying that it needs Android SDK to work properly. I went to Android Studio homepage again, and downloaded SDK Command Line Extracted it to c:\program files\android . I opened Android Studio again and tried to pinpoint the tools folder