Push registry with WTK22
Static push registry works well in WTK 22, but when I try to register Push registry dynamically, the emualtor seems to be OK (no exception is thrown, pushRegistry is registrated), but it does not work. Nothing is listening at the specified port. (I use datagram connection) Does anyone knows where is the porblem?
hi ,
would u mind sharing ur knowledge on getting
the IP address and msisdn of midp clients
via Radius server ?
Will all network operators allow it ?
Is there any standard java APIs for that ?
regards
Similar Messages
-
Can I do this with the Push Registry?
I need to write a midlet that will listen for an incoming message from the comm port on a Motorola i355 iden phone. I don`t care if the midlet is open or closed when the message comes in. Whichever would be fastest would be best. I'm using the phone to process a message and send another message back out through the comm port to a connected machine. I also don't have control over the message that is coming from the machine that the phone will be connected to. This will only be my 2nd J2ME application so I'm very new at this.
I have seen plenty of examples of using the push registry to do this for a socket and datagram (I don`t even know what a datagram is), but nothing for use with a comm connection. If anyone can steer me in the right direction, it would be greatly appreciated. Thanks.Hi
yes SIR u can
thx
souvik -
Signed midlet with push registry
hi,
one midlet application was trused (ex:- signed from verisign)
application code using alaram based push registry
so when alaram puch activate then will it ask any alert question ? for trusted midlet (alert is like myMidlet have need to open?)
i was cheaked for untrusted midlet so their asking the alert question
(i forget the alert matter exatly)
if it is trusted then what happen?
can any one help me who ever experiance with this
thanx in advplz help me
-
Push Registry : MIDlet activated by servlet ?
hello, i have been trying to figure this out for days now could someone please help. I am trying to get the MIDlet to by activated by a Servlet which resides on a apache webserver , is this possible?
how do you go about in getting the MIDlet to register a connection which waits for some activity sent via HTTP? do you register a socket to listen on a port on the device and get the servlet to send data to that port via HTTP?(if so how is this done?)
Basically all i am trying to do is get a servlet to send data to the midlet. The MIDlet is installed from the webserver with ease, i want the midlet to wait till the server decides to send some data. the servlet will activate the midlet (this is the problem) , so then the midlet will open the http connection to the servlet.
Please ask if the question needs clarifying, I would be very thankful for any advice provided.
cheers
Maxthanks for info
i have been trying for a while now and cant seem to get this working what i have got is a MIDlet that listens on port 90 of a socket connection. i am trying to create a Servlet that sends data onto port 90 so the midlet can be activated via the push registry. i am having the trouble with the servlet(which i cant get working, i assume that the code is wrong), i cant seem to get a socket connection working, i have tried to open a socket connection but have had no luck.
i have posted some code, the MIDlet is there and so is my attempt at a servlet.
what i want to do is get the servlet sending the midlet data on a specified port
and the midlet recieveing that data and displaying it on the mobile emulator
(so far all the MIDlet code does is listen for some activaty on port 90 and then send some data to the browser on the following url : http://localhost:90/)
if anyone can get this problem on this example code i am testing on, fixed it would be much appreciated!!
Thanks
Max
import java.io.*;
import javax.microedition.io.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.pki.*;
public class PatchyMIDlet
extends MIDlet
implements CommandListener, Runnable {
private Display mDisplay;
private Form mForm;
private ServerSocketConnection mServerSocketConnection;
private boolean mTrucking = true;
public void startApp() {
mDisplay = Display.getDisplay(this);
if (mForm == null) {
mForm = new Form("PatchyMIDlet");
mForm.addCommand(new Command("Exit", Command.EXIT, 0));
mForm.setCommandListener(this);
Thread t = new Thread(this);
t.start();
mDisplay.setCurrent(mForm);
public void pauseApp() {}
public void destroyApp(boolean unconditional) { shutdown(); }
private void log(String text) { log(null, text); }
private void log(String label, String text) {
StringItem si = new StringItem(label, text);
si.setLayout(Item.LAYOUT_NEWLINE_AFTER);
mForm.append(si);
private void shutdown() {
mTrucking = false;
try { mServerSocketConnection.close(); }
catch (IOException ioe) {}
public void commandAction(Command c, Displayable s) {
if (c.getCommandType() == Command.EXIT) {
shutdown();
notifyDestroyed();
public void run() {
try {
mServerSocketConnection =
(ServerSocketConnection)Connector.open("socket://:90");
log("Startup complete.");
SocketConnection sc = null;
while (mTrucking) {sc =
(SocketConnection)mServerSocketConnection.acceptAndOpen();
log("client: ", sc.getAddress());
// Strictly speaking, each client connection
// should be handled in its own thread. For
// simplicity, this implementation handles
// client connections inline.
Reader in = new InputStreamReader(sc.openInputStream());
String line;
while ((line = readLine(in)) != null) ;
// Ignoring the request, send a response.
PrintStream out = new PrintStream(sc.openOutputStream());
out.print("HTTP/1.1 200 OK\r\n\r\n");
out.print(getMessage());
out.close();
in.close();
sc.close();
catch (Exception e) {
log("exception: ", e.toString());
private String readLine(Reader in) throws IOException {
// This is not efficient.
StringBuffer line = new StringBuffer();
int i;
while ((i = in.read()) != -1) {
char c = (char)i;
if (c == '\n') break;
if (c == '\r') ;
else line.append(c);
if (line.length() == 0) return null;
return line.toString();
private java.util.Random mRandom = new java.util.Random();
private String getMessage() {
int i = Math.abs(mRandom.nextInt()) % 5;
String s = null;
switch (i) {
case 0: s = "Above all the others we'll fly"; break;
case 1: s = "There is no reason to hide"; break;
case 2: s = "I dreamed about Ray Charles last night"; break;
case 3: s = "Someone keeps moving my chair"; break;
case 4: s = "Joseph's face was black as night"; break;
default: break;
return s;
}the Servlet code, which i cant get working:
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
import java.net.*;
import java.lang.*;
public class Servlet extends HttpServlet {
private int mCount;
public void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
String message = "Hits: " + ++mCount;
String connectString = "socket://:90";
SocketConnection sc = null;
DataOutputStream dos = null;
// open a socket connection with the remote server
sc = (SocketConnection) Connector.open(connectString);
// an OutputStream is created on top of the
// OutputConnection object for write operations
dos = sc.openDataOutputStream();
// perform write operations
dos.writeChars("hello");
} -
Integrating Systinet Registry with the XI/PI
Does anyone have experience integrating Systinet Registry with the XI/PI Integration Repository? For example, is it possible to push XI design objects from the Integration Repository to Systinet and maintain synchronization?
Please,
check the following documentation
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ceb31d4f-0901-0010-60bc-8162e7c6179d
It is an article about the integration of mobile devices with XI from this site.
I hope it helps you.
regards,
Jaime -
hello, I'm a beginner in j2me and I'm developing an application that receive a message via socket, and I want my application to be always ready to receive the message even if it not running. I thought of static push registry put the thing I couldn't understand are:
- my application must send different messages for each clients, so is pushing to the registry will help me here ??
- when I use it how the connection be established (I mean do I have to write connecter.open()), because I use the dynamic one and by the example provided by sun I create the connection and then push it to registry ..???
- do I need some specific code to be written on the server side ?
- can u please give the steps of how to test static push registry ??
hope u will help me ^_^
thanksI understood what I want but I stuck in a problem with static push-registry, it work fine on the emulator but when I install it on a real device nothing happen.
the device I use is E71 .. I want to know if anyone try push with it and he success or E71 is not supporting static push-registry.
when I install the application it dose ask me if I agree to run it automatically ..... also, I try the dynamic one and it success...
thanks -
i have a problem in push registry on s40
it throw the exception
ClassNotFoundException : Midlet Not Found
i try the Same Code In S60 it run Well
The Code::::
private void Test() {
try {
System.out.println
("Befffforrrrrrrrrrrrr");
long x= DF.getDate().getTime();
prevalarm = PushRegistry.registerAlarm(this.getClass().getName(),x);
System.out.println
("Afterrrrrrrrrrrrrrrrrrrrrrrrr");
catch (ConnectionNotFoundException ex) {
System.out.println("Erorororo 1 :"+ex.getMessage().toString());
catch (ClassNotFoundException ex) {
System.out.println("Erorororo 2 :"+ex.getMessage().toString());
/**************************/The Jad file
MIDlet-Name: DemoForFun
MIDlet-Version: 1.8
MIDlet-Vendor: DemoForFun
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-Jar-URL: DemoForFun.jar
MIDlet-Jar-Size: 2096
MIDlet-Permissions: javax.microedition.io.PushRegistry
MIDlet-1: DemoForFun, , DemoForFunS40 Is MIDP 2.0
The Series 40 Platform 1st Edition supports Java� 2 Platform, Micro Edition (J2ME�) APIs, including Mobile Information Device Profile (MIDP) 1.0, Connected Limited Device Configuration (CLDC) 1.0, and Nokia's user interface APIs
The Series 40 Platform 2nd Edition added J2ME MIDP 2.0 with Java Specification Requests (JSRs), implementation of Wireless Messaging API (JSR 120), Mobile Media API (JSR 135), and Java APIs for Bluetooth (JSR 82).
Series 40 Platform 3rd Edition extends J2ME support, implements CLDC 1.1 and MIDP 2.0, and expands on the provision of messaging, mobile media, and Bluetooth technology APIs with support for FileConnection and personal information manager (PIM) (JSR 75), as well as Mobile 3D Graphics (JSR 184). -
Whats the logic in push registry???
hi,
was jus doin this push registry thing. in short Midlet registers itself to AMS then whenever some event occurs such as time or something happnes at specific port then midlet is started....
but in example application i saw and tried to make i have to keep my listner midlet running so that it can listen to push events. now wheres that AMS working.....????
i thought push registry was some sort of demon working beind the scene and gets activated only when some event occurs. infect i should not call it deamon according to book it is dead and only activates when called by AMS due to some registred event....
AAqibI don't understand the question. The Docs are pretty specific here...
"When the application is not running, the application management software(AMS) listens for inbound notification requests. When a notification arrives for a registered MIDlet, the AMS will start the MIDlet via the normal invocation of MIDlet.startApp method."
Like the docs say, your applet will be started when the desired even occurs. It does not need to be running to listen for events. This really is how it works. If you use the 'Alarm' functionality, your midlet will be started after a set amount of time. The Javadoc's on the PushRegistry even have example code.
Are you having trouble with something specific? -
0x80070005 when trying to push Registry Settings via GPP on 2008R2 Servers
Hello,
I'm trying to push registry settings via Group Policy Preferences to a group of Windows Server 2008 R2 to set dynamic RPC ports range, but I keep getting an error 0x80070005 Access is denied
The Registry Settings I need to push are these
Ports (REG_MULTI_SZ) 49150-49200
PortsInternetAvailable (REG_SZ) Y
UseInternetPorts (REG_SZ) Y
these settings are part of a GPO which gets applied to the computers without problem. Only the registry part fails:
The computer 'Ports' preference item in the 'SQLServerGPOV {A9BB3E68-6275-44BC-A982-E6F8B3B02C26}' Group Policy object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed.
The computer 'PortsInternetAvailable' preference item in the 'SQLServerGPOV {A9BB3E68-6275-44BC-A982-E6F8B3B02C26}' Group Policy object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed.
The computer 'UseInternetPorts' preference item in the 'SQLServerGPOV {A9BB3E68-6275-44BC-A982-E6F8B3B02C26}' Group Policy object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed.
Security filtering is set to Authenticated Users and Domain Computers like other GPOs
I have tried Diagnostic group policy logging, but I do not see the reason of this error. Log is on pastebin HERE
Any help appreciated. Thanks> Ports (REG_MULTI_SZ) 49150-49200
> PortsInternetAvailable (REG_SZ) Y
> UseInternetPorts (REG_SZ) Y
What's the parent key of these values? And what ACLs are set on this
parent key?
Even SYSTEM does NOT have write access to all parts of the registry...
Martin
Mal ein
GUTES Buch über GPOs lesen?
NO THEY ARE NOT EVIL, if you know what you are doing:
Good or bad GPOs?
And if IT bothers me - coke bottle design refreshment :)) -
Hi,
I have to make a cell application that stay down until a connection incoming. I have to use push registry. I have to make also a program for pc that work as a "push server": when it has something to send to the cell it sends.
I find some examples on the net but a lot are for midlet that activate by a sms incoming.
Someone can explain me what i have to do.
A simple skeleton or outline for this midlet?
If I want to start a MIDlet that isn't load I can?Yes you can.
But instead to use the SMS (you have to send it from your server so a little expensive) try to look for socket connections instead. So your application could just register and stay down (the server still needs the target ip if u are going to use sockets)
The push registry will start your app when data will came (start a thread don't use the listner to do your business!)
If u get troubles doing this way put your app in background (with symbian you have many options to start an application automatically) and just play a sound when data are being received. -
Push Registry - "ping ponging" midlets
i am currently trying to build test apps that utilizes push registry using sockets
basically, i have 2 midlets, let's name them midlet1 and midlet2
1. i launch midlet1
2. then i exit midlet1
3. exiting midlet1 triggers the push for launching midlet2
4. midlet2 launches by itself
5. i then exit midlet2
6. similarly, exiting midlet2 triggers the push for launching midlet1
7. midlet1 launches by itself
8. i tried repeating everything from step 1, but it doesnt work..
anyone familiar with this situation?
i tried closing the socket connection during destroyApp() and of course the threads are stopped as well, but obviously they didn't worked for me..
Edited by: novarian_brian.balote on Sep 26, 2008 1:22 AM
Edited by: novarian_brian.balote on Sep 26, 2008 1:23 AM
Edited by: novarian_brian.balote on Sep 26, 2008 1:24 AMsure, so yes its only on midp2, the JAD stuff you're talking about is only for the pushregistry in midp2.
how it works? you tell the AMS (application management system) on the phone that when it installs MyMIDlet it should attach it to some port (say... 5444 for example).
cool so now its installed.
now when your phone gets an SMS nothing happens... UNLESS that SMS is directed at port 5444. At that point, the AMS will invoke MyMIDlet.
but ya, you need MIDP2.0 -
Push registry problem in Sony..
hi All,,,,,,
In our application, push registry is not working on Sony W600i and S710A. Both these handsets are MIDP2.0 and so push registry is supposed to work in it. and in NOkia it is working fine..
Instead of carrying out a particular task on incoming message at a port no, the control goes to the inbox directly. If any one knows this, please let me know, very urgent. mail me @ [email protected]Hi,
The code that you have written registers the connection. But when it is registering. Ideally it should register at the time of destroying application. For instance your code should work like the one mentioned below.
public void destroyApp(boolean un)
scheduleMIDlet();
public void scheduleMIDlet()
//your code for registering the connection.
}The application should start automatically after the time period specified. To test in emulator test with Run Via OTA and you will see application getting auto start.
Hope this will help you.
Thanks & Regards
Sunil -
The [push registry page|http://developers.sun.com/mobility/midp/articles/pushreg/] mentions:
User interface and headless applications - Even though it's possible to create a push-activated MIDlet that exposes no user interface, doing so may confuse the user - at a minimum, provide a simple screen that tells the user what your application is attempting to do.
I would like to create a headless application... well I have a front end, but I would like push-woken portion to have no UI. If I supply no Displayable, the Java splash is shown until notifyDestroyed().
I'm sure this is possible on platforms that allow multiprocessing such as WinMo, Ericsson, and Android, but I'm hoping there's some native Java way to prevent any UI from being displayed (splash screen included).Hi, I think that it's fully possible only in MIDP-3.0.
Anyway, try to play with the MIDlet.notifyPaused method(). However I've never tried it yet. You must check the behaviour on particular handset because it may not be the same on all handsets.
Rada -
Lacation finding of children through push registry
hi i need your help in progress of my project. my project theme is to find location of children thoruh push reigstry. benefit of this application is that parents want to know the position of there children. i have completed my research on push registry and location Api. but the problem is know that i am confuse to use services like should i use IP address or message service. can any one tell me what exaclty i do which is more easier and fast to do. my supervisor is not helping me at all. so plz if you give me the lines then i think i ll do it. i am new with netbeans and cdlc so definalty i have some problem to understand these things. so plz help me in this favor. i ll be thanksful to you.
please help me in this favor. i am still waiting for your replies....................
-
Hey guys. I have this problem where when I try to open say a document from finder, I have to push "open with."
Simply double-clicking does not work. I would greatly appreciate it if anybody could help.
Another unrelated problem is that when I push to open itunes, it says that it is on a locked disk.
ThanksSelect a particular download file. Press COMMAND-I to open the Get Info window. In the Open With section choose the desired default application from the dropdown menu then click on the Change All button.
For .dmg files use DiskImageMounter (System/Library/CoreServices/ folder.)
For .zip files use Archiver - same folder as above - or download TheArchiver - MacUpdate or CNET Downloads.
Maybe you are looking for
-
i have a mac osx version 10.6.8 no windows installed and i am trying to install a program but keep getting can not run in dos mode ( the disk says on back works on intel mac with parallels or vm fusion) is this program not compatible with my mac?
-
Dear all, I'm having some serious issues with Office 2013's Trusted Center settings. In Outlook 2013 XLS Attachments cannot be directly opened in Excel 2013 with double-clicking due to Trusted Center restrictions for Excel 2013 regarding Outlook's Se
-
Should Not handle large base64Binary data with BPEL?
Hi, we need to implement a file saving function. I have no problem to implement the web service with Java class by using MTOM streaming but I question on the best design with BPEL for this or if BPEL should not be used for this at all. Please help. F
-
Tv not supported when connecting HDMI to ipad 30 pin connector running ios 8
tv not supported when connecting HDMI to ipad-2 30 pin connector running ios 8. Was working fine with ios 7.
-
Hi We are running NW65 SP8, eDir version 8.7.3.10 and are waiting to go to eDir 8.8 SP5. We upgraded our GroupWise recently to version 8 and have had a few problems where Novell released a patch and most of these problems have now gone. Yet we are st