tags:

views:

83

answers:

3

Hi

I am a c# programmer that loves android phones knowing that I am never going to learn Java. What I want to to is an ordinary website that starts the relevant applications from my android phone (Legend) with parameters like:

This works: Mail - this opens the email klient with correct [email protected] href="tel:+4512345678" opens the phone with the correct digits on the screen href="geo:something" opens google map and show you your location

This does not work: href="sms:+4512345678, body=Hello You" href="geo:+address" - I want to enten an adress I can navigate to...

Is the last ones possible do do or something like it? Can you send me link or description Help would be very appreciated Thanks in advance /Bo

A: 

For Email sending Using Intent, Please refer this code:

Intent sendIntent;

sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT,
"Test");
sendIntent.putExtra(Intent.EXTRA_TEXT,
"Hy Testing");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"
+ file.getAbsolutePath()));
sendIntent.setType("image/jpeg");
startActivity(Intent.createChooser(sendIntent, "Send Mail"));

For SMS

//Import this Header Files
import android.telephony.TelephonyManager;
import android.telephony.gsm.SmsManager;
// call this send sms function when clicking a Button..
    private void sendSMS(String phoneNumber, String message)
    {        
        Log.v("phoneNumber",phoneNumber);
        Log.v("MEssage",message);
        PendingIntent pi = PendingIntent.getActivity(this, 0,
            new Intent(this, SendSMS.class), 0);                
        SmsManager sms = SmsManager.getDefault();
        sms.sendTextMessage(phoneNumber, null, message, pi, null);        
    }
Tilsan The Fighter
sorry - but i want to do it from a html page.
Bo M
the text where i wrote this seemed to have been deleted when uploading the question - sorry
Bo M
+1  A: 

Never say never. Java is pretty close to c#.

About your problem - check the WTAI specs.

call number

<a href="wtai://wp/mc;PHONE_NUMBER">

send sms:

<a href="sms:PHONE_NUMBER?body=MESSAGE_BODY"> 

open maps with given geopoint:

<a href="geopoint:latitude,longitude">

open gtalk:

<a href="gtalk:ACTION?jid=USERNAME&from_jid=YOURNAME">
Peter Knego
A: 

Ok Cool: Refer the following html code for sending email

<a href="mailto:[email protected]?subject=welcome!">Click Here to Mail Me</a> 
<a href="sms:PHONE_NUMBER?body=MESSAGE_BODY"> 
 <a href="geopoint:latitude,longitude">
Tilsan The Fighter
thanks - the email with subject and body is working. The sms does not is returns "proces com.android.mms stopped unexpectly" (HTC Legend version 2.1). Is there a way to send an address to the geopoint and not a longitude/altitude?
Bo M
Yes, see the edited answer now
Tilsan The Fighter
<a href="geopoint:1,1">PointOut</a> does not trig the application
Bo M
Pls refer this link: this may help uhttp://code.google.com/p/mashup-xbbster-feedburner/source/browse/trunk/resources/yexamples.html?r=29
Tilsan The Fighter
when placed in <html> tags it shows me an unreadable message - and ok and cancel - then it shows an empty page
Bo M
Hi all - mailto, tlf: and geo: with longitude/latitude works fine now. Does anybody have a suggestion for how to feed geo: or any google navigation with an fysical address to navigate by? Thanks,-
Bo M