Go Back   OpenNet.Uz Forum > Dasturlash > Java > J2ME

Reply
 
Thread Tools
Old 05-11-2008, 23:10   #1
shranet
Administrator
 
shranet's Avatar
 
Join Date: Oct 2007
Location: Toshkent, Chilonzor
Posts: 1,004
Thanks: 133
Thanked: 151/119
Send a message via ICQ to shranet Send a message via Yahoo to shranet Send a message via Skype™ to shranet
Default Sms send

Salom.
Telefoningizdan sms yozsangiz siz sms yozgan odamda nomeringiz chiqadi. Eshitgandim shu nomerning o'rnida boshqa textni chiqarsa ham bo'ladkan. J2ME da shu kodni yozishga yordam beringlar. Sms ni jo'natdim lekin shu nomerni almashtira olmadin.

Kodni shu yerdan oldim
__________________
while(true) echo "Life's Good";

Last edited by shranet; 05-11-2008 at 23:11. Reason: Xato ketibdi
shranet is offline   Reply With Quote
Old 05-11-2008, 23:34   #2
dedexes
root
 
dedexes's Avatar
 
Join Date: Apr 2007
Location: Uzbekistan
Posts: 1,124
Thanks: 103
Thanked: 130/103
Default

bu narsani faqat sms centerlar qila oladi. J2Me da qilib bulmasa kerak (yanayam bilmadim). Chunki sms junatilganda xamma xabarlar sms center'dan (yani beeline, mts, ucell) utadi. Usha utayotgan vaqtda (serverdan utayotgan vaqtda) nomerni boshqa bir tekstga uzgartiradi.
__________________
not bad not good
dedexes is offline   Reply With Quote
Old 08-11-2008, 06:27   #3
nurali
Member
 
Join Date: Apr 2007
Posts: 171
Thanks: 0
Thanked: 6/3
Send a message via ICQ to nurali Send a message via Yahoo to nurali
Default

Quote:
Originally Posted by SHRANet View Post
Salom.
Telefoningizdan sms yozsangiz siz sms yozgan odamda nomeringiz chiqadi. Eshitgandim shu nomerning o'rnida boshqa textni chiqarsa ham bo'ladkan. J2ME da shu kodni yozishga yordam beringlar. Sms ni jo'natdim lekin shu nomerni almashtira olmadin.

Kodni shu yerdan oldim
buning uchun MTS'ning sms-extra xizmatidan foydalanasiz. sizni nomeringizni o'rniga siz istagan so'z ko'rsatiladi. masalan man sizga o'z telefonimdan forum.opennet.uz nomi ostida sms jo'natishim mumkin. bu albatta misol. ammo siz istagan narsa shu.
nurali is offline   Reply With Quote
Old 08-11-2008, 06:57   #4
geniuz
Administrator
 
geniuz's Avatar
 
Join Date: May 2008
Location: Uzbekistan
Posts: 1,386
Thanks: 299
Thanked: 164/142
Send a message via ICQ to geniuz
Default

Quote:
Originally Posted by nurali View Post
buning uchun MTS'ning sms-extra xizmatidan foydalanasiz.
Agar MTS abonenti bo'lmasachi?
geniuz is offline   Reply With Quote
Old 01-06-2009, 14:19   #5
Qudratullox
Junior Member
 
Join Date: Oct 2008
Location: Uzbekistan
Posts: 26
Thanks: 0
Thanked: 1/1
Default

Hammaga salom!...
Man dastur tuzgandim negadur ishlamayapti dastur ko`di quydagicha:

public void SMS_Sender(){
StringBuffer sb = new StringBuffer();
sb.append("sms://"+textFieldNumber.getString());
sb.append(":50001");
MessageConnection sms = null;
try {
sms = (MessageConnection)Connector.open(sb.toString());
TextMessage smst = (TextMessage) sms.newMessage(MessageConnection.TEXT_MESSAGE);
smst.setAddress(sb.toString());
smst.setPayloadText(textFieldSMS.getString());
sms.send(smst);
} catch (Exception e) {
}
}

Sababini bilolmayapman.
__________________
Har chan o`qiding bilimdonsan,
Lekin amal qilmading nodonsan.
Eshakka ortilgan kitob,
Na olim, na donodur beshak.
Qudratullox is offline   Reply With Quote
Old 01-06-2009, 16:07   #6
dedexes
root
 
dedexes's Avatar
 
Join Date: Apr 2007
Location: Uzbekistan
Posts: 1,124
Thanks: 103
Thanked: 130/103
Default

Code:
public void SMS_Sender(){
    StringBuffer sb = new StringBuffer();
    sb.append("sms://"+textFieldNumber.getString());

    MessageConnection sms_conn = null;
    try {        
        sms_conn = (MessageConnection)Connector.open("sms://:50001");
        TextMessage smst = (TextMessage) sms.newMessage(MessageConnection.TEXT_MESSAGE);
        smst.setAddress(sb.toString());
        smst.setPayloadText(textFieldSMS.getString());
        sms_conn.send(smst);
        sms_conn.close();
    }
    catch (Exception e) {
        System.out.println("Error:"+e);
    }
}
shu kodni bir ishlatib kuring. Ishlamasa yana qidirib kuramiz.
__________________
not bad not good

Last edited by dedexes; 01-06-2009 at 16:15.
dedexes is offline   Reply With Quote
Old 09-06-2009, 15:55   #7
Qudratullox
Junior Member
 
Join Date: Oct 2008
Location: Uzbekistan
Posts: 26
Thanks: 0
Thanked: 1/1
Default

Raxmat sizga ishladi sms send.
__________________
Har chan o`qiding bilimdonsan,
Lekin amal qilmading nodonsan.
Eshakka ortilgan kitob,
Na olim, na donodur beshak.
Qudratullox is offline   Reply With Quote
Old 10-06-2009, 16:05   #8
Mirsa
Moderator
 
Mirsa's Avatar
 
Join Date: Apr 2007
Location: Kokand, Uzbekistan
Posts: 481
Thanks: 75
Thanked: 87/66
Send a message via ICQ to Mirsa Send a message via Yahoo to Mirsa Send a message via Skype™ to Mirsa
Default

Uzur.. Man tushunishimcha sms junatish uchun SMS-center bilan smpp - protokol orqali ulanish kere.. Bu yerda unaqa narsa ko'rinmayaptiyu? Qanaqa qilib sms junatyapsizlar?
__________________
Bizga olam tinch bo'lib, do'stlar salomat bo'lsa bas...
Mirsa is offline   Reply With Quote
Old 12-06-2009, 17:34   #9
dedexes
root
 
dedexes's Avatar
 
Join Date: Apr 2007
Location: Uzbekistan
Posts: 1,124
Thanks: 103
Thanked: 130/103
Default

Quote:
Originally Posted by Mirsa View Post
Qanaqa qilib sms junatyapsizlar?
Bu yuqori darajali tillarda bu haqida uylash ortiqchali qiladi. Xamma narsani tilni uzi qilib tashavotdi hozi. C da yozilganda boshqa gap edi.
Quote:
Originally Posted by dedexes View Post
sms.newMessage(MessageConnection.TEXT_MESSAGE);
newMessage degan methodlar bor, ushala hamma ishni qilib tashidi.
__________________
not bad not good
dedexes is offline   Reply With Quote
Old 08-10-2009, 16:34   #10
anddas
Junior Member
 
Join Date: Sep 2008
Posts: 26
Thanks: 0
Thanked: 0/0
Default j2me da web sms jo'natish

Qanday qilib beelinening serverlari orqali j2me orqali bog'lanib web sms jo'natsa bo'ladi?
anddas is offline   Reply With Quote
Reply

Tags
send, sms

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +5. The time now is 05:18.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
OpenNet.Uz