Solved

java pocketpc sync

Posted on 2003-12-01
43
314 Views
Last Modified: 2010-03-31
HI to all experts out there.
i am doing a small java application that randomly changes the songs on a storage card on the pocket pc.
my problem is
1. how can copy files to the pocket pc, i mean its not a valid drive so how can i reach it?
2. is there anywhy to make my application run with MS active sync?
thanks Alot shiznet
0
Comment
Question by:shiznet
  • 24
  • 19
43 Comments
 
LVL 92

Expert Comment

by:objects
ID: 9854003
what vm are u running?
0
 
LVL 92

Expert Comment

by:objects
ID: 9854012
> 2. is there anywhy to make my application run with MS active sync?

the vm is just another application soi it can be run like any others.
0
 
LVL 92

Expert Comment

by:objects
ID: 9854027
>  i mean its not a valid drive

are you sure?  I would have thought it was mapped to a drive.
0
 

Author Comment

by:shiznet
ID: 9854089
the JVM is the standard jdk 1.4.1
the question is how can i reach the storege card on the ppc and if i can make it run with the activesync or sync it with the other programs.
its doesnt matter if i have JVM on my ppc (althogh i hvae jeode) i just want to reach the files on it.
thanks Shiznet.
0
 
LVL 92

Expert Comment

by:objects
ID: 9854114
Same you access any file.
0
 

Author Comment

by:shiznet
ID: 9854141
yea but what is the path?
i mean its not like it c:\storage card
right? so do u know what is it?
0
 
LVL 92

Expert Comment

by:objects
ID: 9854143
whats its path in explorer?
0
 
LVL 92

Expert Comment

by:objects
ID: 9854149
I think the folder that it is mapped to is specified in the registry.
0
 

Author Comment

by:shiznet
ID: 9854158
i double click on "my mobile device"
the on the "my pocket pc" icon
then on the sotrage card and the thing that i have on explorer path it
\Storage Card
0
 
LVL 92

Expert Comment

by:objects
ID: 9854172
SO have youu tried:

File dir = new File("/Storage Card");

Or another test would be:

File root = new File("/");
File[] sub = root.listFiles();
for (int i=0; i<sub.length; i++)
{
   System.out.println(sub[i]);
}
0
 
LVL 92

Expert Comment

by:objects
ID: 9854176
Have a look in your registry at:
HKEY_LOCAL_MACHINE\Drivers\PCMCIA\ATADisk
0
 

Author Comment

by:shiznet
ID: 9854178
no but it doesnt make sence
0
 

Author Comment

by:shiznet
ID: 9854199
i dont have Drivers in HKEY_LOCAL_MACHINE
i am useing winxp
0
 
LVL 92

Expert Comment

by:objects
ID: 9854237
what did the test code I posted above display?
0
 

Author Comment

by:shiznet
ID: 9856309
error
0
 
LVL 92

Expert Comment

by:objects
ID: 9856321
what error and where
0
 

Author Comment

by:shiznet
ID: 9856569
its not giveing me any errors its just giveing me any errors its just giveing me a list of files in c:\ and not my ppc.
0
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 9856628
Try the following to locate where it is:

File storage = find(new File("/"), "Storage");



public static File find(File root, String name)
{
   File result = null;
   File[] sub = root.listFiles();
   for (int i=0; result==null && i<sub.length; i++)
   {
      System.out.println(sub[i]);
      if (sub[i].isDirectory())
      {
         if (sub[i].getName().startsWith(name)) return sub[i];
         result = find(sub[i], name);
      }
   }
   return result;
}
0
 

Author Comment

by:shiznet
ID: 9856791
i dont have the listFiles method in java.io.*
why?
0
 
LVL 92

Expert Comment

by:objects
ID: 9856819
>  its just giveing me a list of files in c:\

but u said the earlier code gave u a list of files?
Sorry I'm confused.
0
 

Author Comment

by:shiznet
ID: 9858339
i tried to write a simple file chooser and i cant see in it the mobile device that i can see in the my computer section.
so how can i get directly to the storage card any idea?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 92

Expert Comment

by:objects
ID: 9861605
> so how can i get directly to the storage card any idea?

you need to determine where it is mounted.
which is what the code I posted above will attempt to locate. Unless you can find it out from explorer.


0
 

Author Comment

by:shiznet
ID: 9861763
i ran you code and it came out with only the file list on c:\document and seting
and no storage card location is there any java labarray to use?
0
 
LVL 92

Expert Comment

by:objects
ID: 9862552
> then on the sotrage card and the thing that i have on explorer path it \Storage Card

What are the properties of this folder?
In particular the location. (check its not a shortcut)
0
 

Author Comment

by:shiznet
ID: 9862721
there are not properties there is only open/explore/create short cut
how about some thing that writes to the usb will it help me?
do you have any?
thanks shiznet
0
 
LVL 92

Expert Comment

by:objects
ID: 9862792
Its not a usb device (is it?).
0
 
LVL 92

Expert Comment

by:objects
ID: 9862805
Only other suggestion would be to search the registry for the entry specifying its mount point.

If you are unable to determine the path that it is mounted on then I don't see how I can help you.
0
 

Author Comment

by:shiznet
ID: 9862807
it is a usb device (its connected to the usb)
0
 
LVL 92

Expert Comment

by:objects
ID: 9862824
sorry I misunderstood, so what card reader are you using?
0
 

Author Comment

by:shiznet
ID: 9862838
secure digital all i want is to copy/delete files to/from it the SD is in my IPAQ 3950 that connected to the usb
0
 
LVL 92

Expert Comment

by:objects
ID: 9862851
> all i want is to copy/delete files to/from it

And to do that you need to know its location in the file system :)
0
 

Author Comment

by:shiznet
ID: 9862920
so isnt any java library to handle this things? or i should write down it my self?
0
 
LVL 92

Expert Comment

by:objects
ID: 9862935
yes java.io but if you do not know *where* the files are then how can you copy them.
0
 

Author Comment

by:shiznet
ID: 9862953
i ment something special to pocket pc or mobile devices?
or something that would tell me how to get to this files
0
 
LVL 92

Expert Comment

by:objects
ID: 9862982
no its just another file afaik, same as you don't need to do anything special to access a file on a floppy or a CD.
0
 

Author Comment

by:shiznet
ID: 9862998
yea but the files on the ppc are not in a drive you cant go to d:\
its some kind of a virtual directory
0
 
LVL 92

Expert Comment

by:objects
ID: 9863027
if you can see it in explorer then it has a path.
0
 

Author Comment

by:shiznet
ID: 9863058
we are going in around and around here.
the path in the explorer is \Storage Card ofcrouse when i write it down anywhere out side the ppc its telling me directory doesnt excit
so do you have a sulotion we are just going to go in circles here? :)
Thanks shiznet
0
 
LVL 92

Expert Comment

by:objects
ID: 9863079
but your running the app on the ppc aren't you? Of course it won't exist outside that box.

0
 

Author Comment

by:shiznet
ID: 9863095
NO i am trying to run a app on my pc to acsses files on the ppc
0
 
LVL 92

Expert Comment

by:objects
ID: 9863130
sorry I have totally misunderstood you.
0
 

Author Comment

by:shiznet
ID: 9865803
soo anyone can help me?
0
 
LVL 92

Expert Comment

by:objects
ID: 9869606
same principles apply though, you need the path of what you are copying from and the path of what you are copying to.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now