i want to send a SMS using GPRS in MIDlet...
anyone can help me??
Thanks in advance...
Sending SMS is a HUGE beast to conquer. Now I don't know the first thing about j2me, but I do know a bit about SMS since I was at one point working on a similar project (abandoned for the reason below).
The short end of it is that you MUST use a GSM carrier to send SMS if you don't know what carrier to send to. This is because carriers know how to send the message to the appropriate cell phone.
You could send via email 5554441234#carrierdomain.com but the problem comes with the fact that you have to know which carrier the phone number points to.
Once upon a time you could tell the carrier by the second set of three digits xxxYYYxxxx (the y's), but you can no longer do this because of phone number portability.
In short, check out Kannel, but you'll still need to send via GSM (you can get PCI cards that hold SIM cards), or you can pay a subscription.
Related
Is there way on Android to obtain cost of SMS after sending it programmaticaly?
It would be really nice to know.
Thing is that for example my carrier always sends notification back with remaining credit, but I cannot rely on that every carrier does the same, and parsing it wouldn't be good idea anyway, as there are many different languages in world and text might be formatted differently depending on carrier.
Unfortunately there's no way to determine that as it's all handled on the network side.
There is impossible to determine pricing on subscriber site using standard android SDK API, price known only on operator's side inside its billing system. But, maybe your mobile operator provides an API for receiving bills and only then you it will be possible to define price you charged.
Also, if it is possible to check your balance using USSD or SMS, you may try requesting balance before sending SMS and after.
I've done a lot of reading about LE Bluetooth and GATT but I'm still struggling to fully understand what GATT is. To make it simple I'd like to express how I'd like my app to work, and simply be told if it's possible or not? The basic premise is it will be used as a location tracker and beacons (maybe iBeacons specifically) will be placed around the building and whenever you enter the range of the beacon a message will be sent to the server from the phone. The idea is that it doesn't need to scan, the phone just simply listens and whenever a beacon advertises, the phones in range will hear this and raise an event.
Scenario:
Client downloads the app and enters the building for the first time.
The building has a beacon in every room, advertising every 5 seconds for example.
When the client walks into a room and is in range of a beacon, the phone will get an unfriendlier version of the message "Beacon 2 has an RSSI of -87".
When they leave the room they will no longer hear the message and so will do nothing until it hears another message from a beacon.
NOTE: This scenario doesn't involve any scanning, looping or pairing. The phone will just know it has to listen for LE Bluetooth messages.
So, is this possible? From what I've seen it seems like you need to scan and connect with each beacon using GATT before you can receive data from them.
Any infomation of this matter is greatly appreciated, thankyou!
Yes, this is possible.
Some high level scenario for a merchant store with beacon.
1) app client needs to have uuid or major id of beacons to be stored locally.
2) merchant store with same uuid or major id will broadcast messages.
3) phone OS keeps listening those messages when entered into geofence, OS will pass on these messages to the apps who are registered for beacons listening.
4) your app will match the uuid embed in the message and identify if its meant for it.
5) if message uuid does not match with uuid on client then app will not consume this message.
6) if message uuid matches then client will consume the message and display it on device, even your app is not running at that point of time.
I recently bought an Arduino with an LCD screen. I want to push information from my computer to the Arduino. I came across a great article, How to make a physical Gmail notifier. From what I understand, I have to send the information using Serial and read it in the C/C++ code on the Arduino. That is fine, but I want to send different information to the device.
Say I want to have one part of the LCD-screen showing the temperature outside and another part of the screen display when the next bus is coming. Is there any way to "mark" the information I send with Serial, or does everything end up in the same "channel"?
If that is the case, is there a logical, simple way to separate this information so it does not mistake bus-information for temperature and vice versa?
You need a protocol for sending information across the serial line, so that the data can be collected the other end in a way that makes sense. A simple protocol may be:
T:16.0 09.34 // Temperature, 16.0°C measured at 09.34
B:11b 11.46 // Bus, route 11b, arrives at 11.46 at your bus-stop.
M:mats#example.com 11kb 10.23 // Mail from mats#example.com, it's 11KB and arrived at 10.23
Each line contains one type of information.
Assuming the line of communication is reliable (and as long as your wire isn't several dozen feet, it should be), you don't need more than that. If the communicatio is unreliable, you need some sort of "start" and "end" markers (or a start and a length), a checksum and some way of dealing with "it went wrong". You will also need to read with a timeout, so that when you don't get enough data, the system starts over again with the next bit of information.
Is there any way to "mark" the information I send with Serial
Definitely. YOU decide how the information is sent if you have control over the information passing over the serial port on your computer.
or does everything end up in the same "channel"?
Well, the serial port is a kind of a channel I guess, since all information you wish to send to the Arduino goes over the port.
is there a logical, simple way to separate this information so it does not mistake bus-information for temperature and vice versa.
Yes. Say you want to send temperature data. Create a byte array for example in this manner: {T23.4} = Temperature data
The bracket '{' signals to the receiving code in the arduino that information is coming down the line with some data. The letter T indicates temperature. Everything after the letter 'T' up to the '}' is data. (23.4)
Bus information could be {Bxxx} where xxx is the data.
I am creating a java application to receive messages on pc using jsms API. Whenever a user sends a particular message to a no, it receives it and adds to the database, the phone number and the area/ region where it belongs.
The region can either be the area where the phone number is registered, or it can also be the current location of the device. Either of these information will help me.
I would be really glad if any one could any one guide me on how to proceed with finding out the region using java code.
Note: I'm not looking for the country. I'm looking for the state/ region. Preferable Indian states.
You could try out libphonenumber. It basically defines the region based on the number.
There is a JavaScript try page here you could perform some tests.
My goal: Make my phone control an Arduino which controls servos which will do cool animations.
How do I get to my goal: I use Java to communicate to the Arduino Nano through the yellow pins (visible on the right picture) through serial (RxD/TxD) (RS-232 protocol) which will tell the Arduino how to control the servos or motors.
Problems:
I don't know which one of the pins that does what, like which one that is GND, which one that is TxD or RxD
I don't know how to tell the phone to do things with its yellow pins (which the Arduino will read and understand to control its servos/motors)
[_] I don't know how to listen to the phone's accelerometer through Java - The thing that lets it tell what is down
[_] I don't know how to listen to the phone's light-sensor
[_] I don't know how to listen to the phone's microphone
[_] I don't know how to listen to the phone's camera
[_] = Things I'm just very curious about that I will use for future projects.
Extra information: I got NetBeans IDE 7.1.1, and I got an Arduino Nano, I got the phone shown above which is called "J10i2 Elm Sony Ericsson".
So I guess what I'm really looking for is someone who knows how to control a phone 100% through Java. Or being pointed in the right direction is also nice!
If you think that I can do this in a better/simpler/smarter way then feel free to leave a comment stating why and how it is better ;)
I would suggest one easy solution, use a REST web service (SOA arquitechture) to solve this problem i did it in my personal case and now im able to control and monitor my house :)
You could simply create a database table representation of your arduino's pins...then just create a service that receives some parameters (i.e> pin no, status -> 1/0, arduino id, etc) and saves them in the database, with your mobile app you could just use the same web service for changing the values.
Finally write down an Arduino app that keeps reading statuses from that service and database (of course using another endpoint/ method in which case you just need to pass your arduino id and it will return a response of all of the different pin status so you can read/process them from your arduino (for example since JSON library is heavy and slow on arduino im passing my return values back from the server to the arduino using simple CSV values i.e> "[pin:status,.....]" i have some code for making HTTP/GET/POST on Arduino you just need the ethernet shield , i could bring you the code if you are interested