yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] grimx:
How do you get the number back from an implicit call to view the contacts list?

.java file

package com.grimx.MakeCall;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MakeCall extends Activity implements View.OnClickListener{
private static final int CONTACT_ACTIVITY = 100;
EditText editText;
Button callBtn;
Button contactsBtn;
Button closeBtn;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

editText = (EditText)findViewById(R.id.editText);
callBtn = (Button)findViewById(R.id.callBtn);
callBtn.setOnClickListener(this);
contactsBtn = (Button)findViewById(R.id.contactsBtn);
contactsBtn.setOnClickListener(this);
closeBtn = (Button)findViewById(R.id.closeBtn);
closeBtn.setOnClickListener(this);
}

@Override
public void onClick(View v) {
if(v.getId() == R.id.callBtn) {
String phn_number = editText.getText().toString();
if(phn_number.equals("")) {
Toast.makeText(MakeCall.this, "Please Enter A Phone Number", Toast.LENGTH_LONG).show();

}
else
{
Intent call_intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phn_number));
startActivity(call_intent);
}

}
else if(v.getId() == R.id.contactsBtn) {
Uri uri = Uri.parse("content://contacts/people");
Intent contacts_intent = new Intent(Intent.ACTION_PICK, uri);
startActivityForResult(contacts_intent, CONTACT_ACTIVITY);
}
else if(v.getId() == R.id.closeBtn) {
Toast.makeText(MakeCall.this, "Exiting MakeCall", Toast.LENGTH_LONG).show();
finish();
}
}

public void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);

switch(requestCode){
case(CONTACT_ACTIVITY): {
if(resultCode == Activity.RESULT_OK) {
Uri my_uri = data.getData();
//Uri.decode(my_uri.toString());

//want to get the number an put it in the editText
editText.setText(Uri.decode(my_uri.toString()));
}
break;
}

}
}

}
[G1 Android Development] nyquildotorg:
how to use a number pulled from contacts

I just figured this out myself yesterday, and it's surprisingly easy:

package org.nyquil.slydialer;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Contacts.Phones;

public class slydialer extends Activity {

private static final int PICK_CONTACT = 0;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);

Intent intent = new Intent(Intent.ACTION_PICK, Phones.CONTENT_URI);

startActivityForResult(intent, PICK_CONTACT);
}
@Override
public void onActivityResult(int reqCode, int resultCode, Intent data) {
super.onActivityResult(reqCode, resultCode, data);

switch (reqCode) {
case (PICK_CONTACT) :
if (resultCode == Activity.RESULT_OK) {
Uri contactData = data.getData();
Cursor c = managedQuery(contactData, null, null, null, null);
if (c.moveToFirst()) {
String number = c.getString(c.getColumnIndexOrThrow(Phones.NUMBER));
// TODO Whatever you want to do with the selected contact name.
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel://2677593425,,,"+number));
startActivity(intent);
finish();
}
}
break;
}
}
}

It's that override to onActivityResult that's the trick. This example is only listing contacts with phone numbers, but if you replace 'Phones' with 'People' it should list them all.
[G1 Android Development] grimx:
ok i get a force close when i run my app now.

what i'm tring to do is click the contacts_btn and select a contact

and returns it number(putting it in the editText) and then click the

call_btn to make the call.

.java

package com.grimx.MakeCall;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Contacts.Phones;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MakeCall extends Activity implements View.OnClickListener{
private static final int CONTACT_ACTIVITY = 100;
EditText editText;
Button callBtn;
Button contactsBtn;
Button closeBtn;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

editText = (EditText)findViewById(R.id.editText);
callBtn = (Button)findViewById(R.id.callBtn);
callBtn.setOnClickListener(this);
contactsBtn = (Button)findViewById(R.id.contactsBtn);
contactsBtn.setOnClickListener(this);
closeBtn = (Button)findViewById(R.id.closeBtn);
closeBtn.setOnClickListener(this);
}

@Override
public void onClick(View v) {
if(v.getId() == R.id.callBtn) {
String phn_number = editText.getText().toString();
if(phn_number.equals("")) {
Toast.makeText(MakeCall.this, "Please Enter A Phone Number", Toast.LENGTH_LONG).show();

}
else
{
Intent call_intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phn_number));
startActivity(call_intent);
}

}
else if(v.getId() == R.id.contactsBtn) {
Uri uri = Uri.parse("content://contacts/people");
Intent contacts_intent = new Intent(Intent.ACTION_PICK, uri);
startActivityForResult(contacts_intent, CONTACT_ACTIVITY);
}
else if(v.getId() == R.id.closeBtn) {
Toast.makeText(MakeCall.this, "Exiting MakeCall", Toast.LENGTH_LONG).show();
finish();
}
}

public void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);

switch(requestCode){
case(CONTACT_ACTIVITY): {
if(resultCode == Activity.RESULT_OK) {
Uri contact_data = data.getData();
Cursor c = managedQuery(contact_data, null, null, null, null);
if(c.moveToFirst()){
String number = c.getString(c.getColumnIndexOrThrow(Phones.NUMBER));
editText.setText("tel:" + number);
}

}
break;
}

}
}

}
[G1 Android Development] grimx:
the force close happens on the return from selecting a contact.
[G1 Android Development] Ace42:
You could atleast say your rom and phone model.
[G1 Android Development] grimx:
HTC G1 Black, CyanogenMod-4.2.1.1
[G1 Android Development] Ace42:
Did you upgrade from a older version or do a full wipe?

Did you use HTC ADP rom or the Base rom from enom?
[G1 Android Development] grimx:
HTC G1 Black, CyanogenMod-4.2.11.1
[G1 Android Development] grimx:
sorry about that mix up
[G1 Android Development] grimx:
Heres my AndroidManifest.xml, if it helps

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.grimx.MakeCall"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MakeCall"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />

</manifest>
[G1 Android Development] grimx:
Ok problem solved.

I forgot to add the permission :

<uses-permission android:name="android.permission.READ_CONTACTS" />

to my AndroidManifest.xml file.
[Touch Pro2, Tilt 2 Windows Mobile General] BBE:
Is there any way I can set my TP2 to continuously play its alert/vib/screen light up every 5 minutes or so until I clear the notification off of there?

The way it is now I don't actually know that I have a new message or missed a call beyond the one time it alerts me unless I manually turn the screen on and check it myself. All my older phones were able to keep alerting you every few minutes or so until you finally hear/see it and clear the alert.
[Touch Pro2, Tilt 2 Windows Mobile General] Mesquire:
I have never seen this on stock windows mobile. It has always been alert once, vibrate once on my wm phones.

However, you could set it to flash the indicator indefinitely for missed calls and messages.
[Touch Pro2, Tilt 2 Windows Mobile General] zelendel:
I have used Best reminder to get this function. It is not free or I would post it but it is well worth the little they charge for it.
[Touch Pro2, Tilt 2 Windows Mobile General] BBE:
Awesome suggestion! Thanks alot mate :)
[Touch Pro2, Tilt 2 Windows Mobile General] WarlockW:
or you can install this ..

and setup your notifcations to alert you.
[Touch Pro2, Tilt 2 Windows Mobile General] expediter:
These days I use PhoneAlarm however on a previous phone i used MSentinel which is free.

http://www.freewareppc.com/utilities/msentinel.shtml
[Touch Pro2, Tilt 2 Windows Mobile General] davidgee:
try this

I use gProfile which alows you to set the tone, the interval and how many times it sounds up to indefinite. Freeware. Would post the link but I'm in the middle of Kolkata.
[Upgrading, Modifying and Unlocking] rafrima:
Hello, i have a problem with my moto q gsm, i can't unlock, please help me.

Att. Rafrima
[Upgrading, Modifying and Unlocking] orb3000:
Welcome to forums

As we dedicate mainly to HTC devices you won´t get too much attention.

For a faster reply better try here:

http://modmymoto.com/forums/

Good luck,
[G1 Q&A, Help & Troubleshooting] chinkpak:
Hey, so I tried rooting my phone and I followed the steps very specifically from these topics

First I did this and it worked properly

http://xdaforums.com/showthread.php?t=558301

I was at 1.33.2005 at this point and 1.5

Then I followed the instructions in the topic "ROgers, heres your real root", specifically from the very last post on page 60

http://xdaforums.com/showthread.php?t=544654&page=60

It booted to Cynogen v1.4 + JF

However instead of installing "signed-dream_devphone_userdebug-ota-14721.zip" first, I installed the Cynogen rom first)(4.2.11.1), then when I rebooted, it got stuck on the Rogers, so I booted up in Recovery mode again, this time with the "signed-dream_devphone_userdebug-ota-14721.zip" on the sd, and I installed that, then I installed the 4.2.11.1 again

I restarted, and it got stuck on the Rogers screen

So I booted up in recovery mode again and I did an entire clearing and erasing of all data (I think equivalent to a format)

I booted up my HTC Rogers Dream again, and now Im on 1.6....And my model is Android Dev Phone 1...and my kernel was 3.something before and its now 2.6.29

Ugh I just wanted to root the thing and have Cynogen running

Does anyone know the appropriate steps to fix my problem?
[G1 Q&A, Help & Troubleshooting] sockpuppet4:
Cyanogenmod 4.2.11.1 IS firmware 1.6. And that is the correct kernel version too.
[G1 Q&A, Help & Troubleshooting] chinkpak:
So...in essence I DID....root it? hahaha
[G1 Q&A, Help & Troubleshooting] sockpuppet4:
Your "about phone" screen should look somewhat similar to this:
[G1 Q&A, Help & Troubleshooting] chinkpak:
Mine does not have a MOD VERSION category

everything else is identical except

Build Number which says

dream_devphone-userdebug 1.6 DRC83

14721 test-keys
[G1 Q&A, Help & Troubleshooting] chinkpak:
And my model number says Android Dev Phone 1
[G1 Q&A, Help & Troubleshooting] Ace42:
That means you rebooted after flashing the HTC ADP 1.6 rom...Which is not the correct thing to do:p

The Base rom can be found in enom's thread, then flash the cyan rom but first we need to get you suited up with Amon_Ra.
[G1 Q&A, Help & Troubleshooting] chinkpak:
Oh boy...say what hahaha
[G1 Q&A, Help & Troubleshooting] chinkpak:
So how do I get back to square 1 here?
[G1 Q&A, Help & Troubleshooting] Ace42:
Press

Cam+power

Then put what it says.

I think that rom takes your root away but i havent tried flashing it alone.

If your recovery image is still there you can:

0.get Amon_RA http://xdaforums.com/showthread.php?t=566669

1.Wipe

2.Flash this base rom

http://xdaforums.com/showthread.php?t=538456

3.Flash cyan after that w/o rebooting

4.reboot
[G1 Q&A, Help & Troubleshooting] B-man007:
here

http://xdaforums.com/showthread.php?p=4677631#post4677631

aces method wont work because the recovery is replaced on boot..at least im pretty sure it is
[G1 Q&A, Help & Troubleshooting] chinkpak:
Hmm that didn't work?

It says device is not found when I typed in adb remount

I should mention I cleared everything off my SD card, its totally blank, sort of lost as to where I am :S
[G1 Q&A, Help & Troubleshooting] chinkpak:
I have nothing installed on my mem card right now and I have no backup recovery progs installed, Im just starting fresh, heres my stats

Model number

ANDROID Dev Phone 1

Firmware

1.6

Baseband Version

62.50s.20.17H_2.22.19.26I

Kernel Version

2.6.29-00479-g3c7df37

android-build@apa26 #19

Build Number

dream_devphone-userdebug 1.6 DRC83

14721 test-keys

Also when I boot(holding Camera)

It says

DREAM PVT 32B ENG S-OFF

HBOOT- 1.33.2005 (DREA21000)

CPLD-4

RADIO - 2.22.19.26I

APR 20 2009, 15:30:43

Hope thats helpful haha

Oh I'm also on a ROGERS DREAM, I dont think the TMobile tuts are helpin
[G1 Q&A, Help & Troubleshooting] sockpuppet4:
reboot into recovery (home+ power) and reflash cm 4.2.11.1 and see what happens.
[G1 Q&A, Help & Troubleshooting] chinkpak:
I get the triangle with the exclaimation mark when I do that :S
[G1 Q&A, Help & Troubleshooting] grandomegabosses:
have you tried pressing alt+L?
[G1 Q&A, Help & Troubleshooting] gtrplr71:
reroot use this method

http://androidcommunity.com/forums/f12/rooting-your-g1-made-easy-11825/

I have done this what you are experiencing on pupose one time.
[G1 Q&A, Help & Troubleshooting] chinkpak:
I didnt know about Alt+L

But anyways, I pressed Alt+L and tried to apply sdcard:update.zip(4.2.11.1), but it aborted installation for what reason I don't know

As for that link, my RC is 83? Which one would I use RC30 file or 8? I'm from Canada btw, using a Rogers phone, will using the american RC30 work?
[G1 Q&A, Help & Troubleshooting] chinkpak:
Oh man, what happened I follwed the first step from this topic

http://androidcommunity.com/forums/f12/rooting-your-g1-made-easy-11825/

I used the RC30 file, and now my phone says T-Mobile and I can't get past google activation and it says im on roaming wtf...
[G1 Q&A, Help & Troubleshooting] chinkpak:
Oh man, Im panicking here can someone help me

I've even lost the little skateboarding fellows at the bottom

I can't get past the google activation screen(no data/3g)

Im on T-Mobile...I should be on Rogers

Ahh mann
[G1 Q&A, Help & Troubleshooting] chinkpak:
Anyone!@? Please...utterly lost here
[G1 Q&A, Help & Troubleshooting] chinkpak:
Okay, I believe I have rooted my phone again

I got the skating androids

I beleive all I need now is the Rogers DREAIMG.NBH...am I correct?
[G1 Q&A, Help & Troubleshooting] chinkpak:
So progress update

I'm still stick on T-Mobile, I am unable to make it past the activation screen....APN method doesn't work.....and the Wifi method doesn't work either

However, I did manage to install RA-DREAM v1.5.2 for my recovery mode

Now Im at a standstill

How do I get it back to Rogers(radio and everything)
[G1 Q&A, Help & Troubleshooting] chinkpak:
Ok so I flashed "update-cm-4.2.11.1-signed.zip" with RA-DREAM and now it hangs at the T-Mobile, oh man, plz I am desperate people....
[G1 Q&A, Help & Troubleshooting] Eclypz:
did you remember to flash the 1.6 base (don't reboot yet!!!) and then CM mod, then reboot?

Sounds like you may have made the same mistake again.

If you did things correctly, just wait for a bit (10-15min?). The first boot always takes a long time. So just wait until it's back up. Or do a search on XDA
[Hero CDMA General] Sanc7ified:
Im using Fresh 1.0 as of right now, I like it alot. Just wondering if theres anything out that would make my phone even smoother. :)
[Hero CDMA General] bobdude5:
fastest would be IMO the AOSP 1.6, then the AOSP Eclair, then the 2.1 Sense Eclair, then modacco or fresh (cant really tell speed differnece between the two)

keep in my that these are the fastest imo not the most stable
[Hero CDMA General] JasonMudd:
For speed with full functionality, i would say the Fresh 1.0 with sense disabled. Faster but still very useful is the AOSP 1.6 with GoogleBits installed. The camera and sensors work, and overall it is a pretty complete build. There is no BT or speaker phone (among other things).
[Hero CDMA General] ajones7279:
The fastest, MOST COMPLETE rom would have to be Fresh 1.0 imo. It flies.
[Hero CDMA General] IcOpRo:
I try Fresh, 2.1 and Modaco UN 1.3.. and from my experience I liked 2.1 the best is the fastest. but since its still missing accelerometer, I'm currently running UN Modaco 1.3 in my opinion is way faster. I installed it with full Wipe on the phone and its just flying.

I don't go for the NON SENSE Rom because that beats the purpose of having a HTC Hero, I mean if you don't want SENSE then in my opinion why not get a Samsung Moment?

And that's what i think about it.. :)
[Hero CDMA General] wtphoto:
I just flashed to fresh 1.1 from un 1.3 and am loving it. no FC as of yet and just seems really smooth.
[Hero CDMA General] JoeyRev:
Nice n Quik

so far i am using the Fresh 1.1 and its woerkin beautifully..no FC's or anything...good rom. Just waiting on Fresh's 2.1 Eclair:)
[Hero CDMA General] obelisk79:
It might be trivial for me to point this out, but Fresh is the name of the rom not the team/person creating it. I believe it is maintained by flipzmode/freshlyill and they do outstanding work.
[Hero CDMA General] gu1dry:
I've been beta testing AOSP 1.6 & love the snappiness. Toss the Googlebits on top of that & you have a ball rolling. Sure it has it's minor quirks, but it IS a Dev-ROM....
[Hero CDMA General] turbosai88:
im running the "cSrOm 2.1.7" it uses 2.1 firmware, with a custom darchstar kernel oc to 768mhz, it has a linpack score of 3.266, so far very stable and very smooth and fast for me, if anyone has faster roms please be more specific, i like specs, numbers, opinions, thank you
[Hero CDMA General] whoiswes:
Holy thread-resurrected-from-the-dead, batman!

CM6 with Deca's CFS kernel + LauncherPro for me.
[Hero CDMA General] theimpaler747:
CM6 and my theme :D
[Hero CDMA General] rootsquared:
How do I tell what rom I am using? I just rooted my phone using the instructions found on these forums. Does that mean I have the stock rom?

I have tried cm6 but have had issues with the radio.
[Hero CDMA General] cordell12:
A rom is cm6, or Fresh 2.4, if you went back to stock sprint software than you have stock rom.
[Hero CDMA General] rootsquared:
I knew what ROMS are, I just don't know what ROM i am using. It looks pretty much exactly like the stock HTC rom.
[General Questions and Answers] alcorn6281:
I wondered if anyone knew if, as the htc touch diamond is a windows based phone, it could be adapted to utilise part of the 4Gb internal memory for a virtual ram drive to supliment the lack of onboard ram. My thinking process is that windows itself can be modified through settings to increase the virtual memory taking a portion of the hard disk. Can the same be done in windows mobile 6.5 :confused:
[General Questions and Answers] band27:
Windows Mobile 5 or later, had the ability for user to select Ram vs. Rom memory depending on the users needs but no, not possible with the Windows Mobile of today.
[HD2 General] philtrick123:
Hi all,

I've installed TouchLockPro as suggested at http://xdaforums.com/showthread.php?p=5254295#post5254295

Initial testing seems to prove that it has fixed the problem, well it's a workaround.

It senses (via the G sensor) if the phone is held upright during a call and turns the screen off- no need to rely on the poor proximity sensor.

Please test and let me know how you get on.

There doesn't seem to be any config- just install and it works.
[HD2 General] ruscik:
If your proximity sensor does not work then return the device. I have no problems with it at all. Only think I would say is for it to also switch things on/off when phone not in use.
[HD2 General] jakem:
I used to have problems with the proximity sensor but it's been working perfectly since I upgraded to 1.48.
[HD2 General] philtrick123:
FYI- The proximity sensor does work on my phone. It just proves to be intermittent at sensing- this has been documented by other users.

The main problem is that it doesn't work very well next to hair. So I don't have any problems with the proximity sensor, but my wife (with long hair) does.
[HD2 General] here4info:
proximity sensor works fine for me as long as I don't use the keypad during a call; once i enter anything during a call (like calling card number, extensions etc) the proximity sensor stops working.

I think this bug doesn't show up when using the wired headset, have to confirm this though.
[Windows Mobile Software Development] OndraSter:
Hi,

not all of us are "get drunk as much as possible" so I made a small nice app - Tray GUID generator.

You just click into your tray and voila, in your clipboard is freshly generated GUID:D.

I know, the icon sucks, but there is no better for "guid" in google images search:D.

To close the app, just right click -> Exit.

You need .NET Framework 2.0 or newer (WVista and W7 bundled in installation).

So here you go :D.

PS: Remember in W7 to mark it as "never hide" :D.
[Windows Mobile Software Development] Senax:
Just what I needed! Thank you very much OndraSter!
[Touch Pro2, Tilt 2 Windows Mobile General] Linear2202:
Hi, I've got a Tilt 2 with the latest E2 rom. I'm looking for a program that will let me program some of the buttons for long press and an task manager to launch with a press. Many custom roms have some program that will let you select active programs or kill them plus program say the send key to activate the app..I'm having trouble finding those to install.

Any help with this?

Thanks.
[Touch Pro, Fuze Themes and Apps] Broman400:
So, I downloaded swype onto my WM 28011 Manila 2.5 ROM, and the problem is that when I click to open Swype, it overlaps a piece of the taskbar on the bottom of my screen. Is there any fix for this?
[Touch Pro, Fuze Themes and Apps] Broman400:
Bump, anyone gotta fix for this?
[Touch Pro, Fuze Themes and Apps] kamikaze458:
1.Same issue over here... ATT FUZE.

2.Using RomRom (Windows Mobile 6.5 build 28014.5.5.0).

3.BUT... i think this post will be shutdown (perhaps) because of this:

[APP] Swype | Project canceled. Please don't support this

:D

http://xdaforums.com/showthread.php?t=598633​
[Windows Mobile Software Development] JKingDev:
I want to rewrite the keypad service for the Xperia X1 to modify the behavior of the X1. See my thread here:

http://xdaforums.com/showthread.php?t=596663

I was wondering if anyone knew what exactly the keypad service must do to receive key interrupts from the keyboard. According to msdn the keyboard interrupt handler uses the keybd_event function to send key events to the system. Is the keypad service the interrupt handler?

http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx

Does anyone know how I can grab those interrupts?

While I'm writing this for the X1, if successful my code can be used and modified by others for use with other devices to restore true button customizability. I want to do this at a higher level than hotkeys and key hooks to maintain application compatibility.
[Android Themes] Michaelr219:
If anyone could post the update .zips with the correct .jar files and framework pngs for each build... you would be a lifesaver!!!

Also, to all the themers out there... if anyone has a modded version of the new 1.66 Market Apk that can be installed to the /system/app file, please post as well... Last question, I promise... Where can I find the internal sound files so that I can mod them? I will do a search for this last one, but I figured Id ask since it was on my mind and I have your attention ;) haha

If there is anything I can do in exchange, be sure to let me know... Im always up to help

My updated theme will be up tonight!!! It's amaaaaazing (well, to me haha)

:D
[Android Themes] Mikey:
Search a tad ;)

http://xdaforums.com/showthread.php?t=609045