Getting a list of Contacts on SenseUI 2.1? - android

This is simple enough on every other version of Android, including SenseUI 1.5.
//For Contacts
Intent pickIntent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
this.startActivityForResult(pickIntent, RESULT);
//For Phones
Intent pickIntent = new Intent(Intent.ACTION_PICK, Phones.CONTENT_URI);
this.startActivityForResult(pickIntent, RESULT);
On SenseUI 2.1 (HTC Incredible) this shows a list of numbers (the URI number). So you get a list of 1-200 if you have 200 contacts. Selecting one of the contacts you can then gather all of the information needed.
Is there any good work around known?

Unfortunately, I do not have any solution for this issue, which also occurs on the HTC Desire, but would recommend to file a bug with HTC instead of figuring out workarounds, as this IMHO clearly is a bug in HTC's implementation.

Related

new Intent(Intent.ACTION_EDIT, ContactsContract.Profile.CONTENT_URI); is not working in Some of the devices like Oppo, Galaxy J7-6.0.0

Hello Below the code to go in contact edit page is working fine in all the devices but it is not working in some of devices.
Please help me.
Intent intent1 = new Intent(Intent.ACTION_EDIT, ContactsContract.Profile.CONTENT_URI);
startactivity(intent1)
Below is the report of google prelaunch application test.
This things is not working in below devices as per the Alpha Prelaunch test

How to limit duration of MediaStore in Android 7

What's new with duration limit of MediaStore in Android 7? There is nothing about it in documentation, but since sdk version 24 a device records a video without any limit.
final Activity activity = (Activity) context;
String controlId = videoInput.getControlId();
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
if (videoInput.getMaxDuration() > 0) {
intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, videoInput.getMaxDuration());
}
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, videoInput.getRecordQuality().ordinal());
int requestCode = ActivityResultBus.getInstance().generateRequestCode(new SBundle(controlId));
activity.startActivityForResult(intent, requestCode);
I tested it on a real Motorola Nexus 6 with Android 7.0 and on virtual devices with 7.0 and 7.1.1. On previous versions all works as I want.
Mb something wrong with my extras bundle?
"There is no requirement for any camera app to honor EXTRA_DURATION_LIMIT. This is a request, not a command"
Any other way to limit the length of video ?
Not when you delegate the work to a third-party app. You are welcome to use the camera APIs and record the video directly yourself. Or, if your concern is not with the video on the device but some subset that you need to upload, look into how you can chop off the first 10 seconds of the video, and upload that piece.
This answer is directly compiled from this question : MediaStore.EXTRA_DURATION_LIMIT Not working Nexus Devices?

Read contact using Intent.PICK activity doesnt work for dual sim in android

Intent intent = new Intent(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent, PICK_CONTACT);
This is my code it gives all contact for single sim but when i run same on dual sim it doesnt show the contact
Android does not have support for dual-SIM devices at the SDK level. Various manufacturers have modified Android to support multiple SIM cards. You will need to contact your device manufacturer and inquire about how to obtain contact data from the second SIM.

android Call Forwarding programmatically

I want to forward any calls received to another predefined phone number. I have searched forums and found some contradictory answers. so i m confused.
First I looked at this post https://stackoverflow.com/a/5735711 which suggests that it is not possible through android.
But another post has some solution. https://stackoverflow.com/a/8132536/1089856
I tried this code from second post, but i m getting the following error message: "Call Forwarding connection problem or Invalid MMI Code."
String callForwardString = "**21*5556#";
Intent intentCallForward = new Intent(Intent.ACTION_CALL);
Uri uri2 = Uri.fromParts("tel", callForwardString, "#");
intentCallForward.setData(uri2);
startActivity(intentCallForward);
Where 5556 is the number of emulator (for testing) where i want to forward call.
i think you need to try it on the device better than the emulator.
You are using DTMF codes, so i think you need network (on the actual device) rather than on the emulator.
Dial the same code "**21*5556#" on your emulator and check. It does not work either! Replace the 5556 with the phone number you want to forward the call to and then try it on phone.
Meaning, the DTMF codes would work only on mobiles not on emulators or tablets without SIM support.
EDIT:
you can find different call forwarding codes here.
Remove the "#" from Uri uri2 = Uri.fromParts("tel", callForwardString, "#");
if that do not work then try just *21*number#

Intent to send an SMS to multiple contactcs

Trying to initiate an intent to send an SMS to multiple recipients with the following code:
Intent smsIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
"sms", destination, null));
However in the destination string say I have "555-555-5555,555-555-5556". The comma delimiter is working fine on a Samsung vibrant. However, this will not work on a nexus 1. On the nexus one i need to use a semicolon as the delimiter and then it works. On the nexus one, if I use commas as the delimiter, it only picks up the last phone number. If I use the semicolon, the nexus one picks up all the phone numbers however, it then breaks the vibrant. With the semicolon, the vibrant does not pick up any of the phone numbers. Any insights?
You should file feature request in android
for the public telephony api to standardize this kind of stuff.
Until now (Gingerbread 2.3.3) there is no "default character" or api do discover what is the correct for each rom.
Anyway, I suggest that you ask people do test in different roms and create switch cases in your app. It will not work in all of them, but could work in most of.
Semicolon works for other than samsung and Comma works for Samsung devices. Just put a check for:
String manufactures = android.os.Build.MANUFACTURER;
to achieve the same functionality for both samsung vs others.

Categories

Resources