|
Hi, thanks for your help. But I don't know where to start. So this is what I have found so far. Thanks in advance for the help.
package com.novoda.runbuddy.activity;<br />
<br />
public class StopWatch {<br />
<br />
private long startTime = 0;<br />
private long stopTime = 0;<br />
private long elapsed = 0;<br />
private boolean running = false;<br />
<br />
<br />
public void start() {<br />
this.startTime = System.nanoTime();<br />
this.running = true;<br />
}<br />
<br />
<br />
public void stop() {<br />
this.stopTime = System.nanoTime();<br />
this.running = false;<br />
}<br />
<br />
public void reset() {<br />
this.startTime = 0;<br />
this.stopTime = 0;<br />
this.running = false;<br />
}<br />
<br />
public long getElapsedTimeMicro() {<br />
if (running) {<br />
elapsed = ((System.nanoTime() - startTime) / 1000);<br />
}<br />
else {<br />
elapsed = ((stopTime - startTime) / 1000);<br />
}<br />
return elapsed;<br />
}<br />
<br />
public long getElapsedTimeMilli() {<br />
if (running) {<br />
elapsed = ((System.nanoTime() - startTime) / 1000000);<br />
}<br />
else {<br />
elapsed = ((stopTime - startTime) / 1000000);<br />
}<br />
return elapsed;<br />
}<br />
}
|
|
|
|
|
Hi,
I'm kinda new to programming and with not much knowledge on Java. But this is urgent!! I need help in research. I'm need to create a mobile application using Android and Eclipse.
Objectives:
To develop a mobile application that would be able to push help messages in the event whereby the mobile user requires assistance.
Scope of project:
Develop a mobile application that;
A module to detect movements
A decision making module with the intelligence to trigger an alert based on a set of rules
A module to push an alert message to a 3rd party e.g. via the SMS
Any ideas on how I should go about doing this? Thanks.
Best Regards,
|
|
|
|
|
-- Download SDK[SDK ^] for Android.
-- Download the development tools - can get from the previous link
-- Read the development articles.
-- Start your Hello World application.
-- Think & plan for your project
"He that is good with a hammer tends to think everything is a nail." - Abraham Maslow
|
|
|
|
|
I want to create Menu,Menu item , POP up menu and table like gui using MIDP 2.0 . How it is possible
Trioum
|
|
|
|
|
hi there,
Im really confused! i need to connect sql server from my pocket pc ...
i made a wireless network and connect them to each other.
now with this code i try to connect ...
SqlConnection con = new SqlConnection(@"Data Source=mohsen-pc\sqlexpress;Initial Catalog=ManagerCo;Persist Security Info=True;User ID=sa;Password=123456");
SqlCommand cmd = con.CreateCommand();
try
{
con.Open();
}
catch (Exception f)
{
MessageBox.Show(f.Message);
}
sqlexception is result!
note that firewall is switched off, sql express accepts remote and configured correctly
plz help!!!!!!!!!1
|
|
|
|
|
Would you post the exception details? That will help to determine the issue.
|
|
|
|
|
please clear your question to justify it
what is error in this code and what about exception. Mention it
then we can solved it.
|
|
|
|
|
I make program for recording phone conversation to a file.I need help. I can not find a way to start recording after receiving a call? Is there a function in the Windows Mobile API for this/
|
|
|
|
|
How to handle key events in Pocket Internet Explorer using javascript?
|
|
|
|
|
What are my options for creating websites for mobile?
What is WAP? Or use ASP.net to sniff which browser the request came from?
|
|
|
|
|
Hello
Use standard ASP.NET website project for creating mobile website. Important thing here is to detect request, if it is from mobile device than redirect user to mobile compatible pages instead of standard website.
For accurate and easy mobile device detection use http://51degrees.codeplex.com[^] It is an ASP.NET open source module which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device. It makes use of WURFL mobile device database.
Sample web.config configuration for redirecting users to different mobile pages based on MobileDeviceManufacturer property. You can create your own custom rules for redirection based on other mobile properties.
<redirect firstRequestOnly="false"
mobileHomePageUrl="~/Mobile/Default.aspx"
timeout="20"
devicesFile="~/App_Data/Devices.dat"
mobilePagesRegex="/(Apple|RIM|Nokia|Mobile)/">
<locations>
<location url="~/Apple/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Apple"/>
</location>
<location url="~/RIM/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="RIM"/>
</location>
<location url="~/Nokia/Default.aspx">
<add property="MobileDeviceManufacturer" matchExpression="Nokia"/>
</location>
</locations>
</redirect>
|
|
|
|
|
I am new for iphone technology as i was vc++ developer. I am working on record audio and got one source code "SpeakHere" that fulfill my requirement but it is to lengthy. lots of files are used there ... if someone guide me on how to record audio in minimum number of lines.
Any doc or source code ??
Thanks in advance
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
|
Is this a programming question?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
This is a discussion board for Mobile Programming questions. Unless you want to develope mobile applications for iPhone and wondering if you should go ahead and develope one for this chinese phone; you are in the wrong place.
|
|
|
|
|
I've wanted to get into development for smart phones, but the phones/plans are all so insanely expensive (at least in the US), I can't even come close to affording one right now. Not to mention multi-platform development.
I was wondering, is a phone absolutely necessary? How accurate are the emulators compared to the real thing? Is it possible to make apps without ever testing them on an actual device? I'm mainly interested in the Android and WP7 emulators.
Any info/advice would be greatly appreciated.
Thanks...
We live in a world operated by science and technology. We have also arranged things so that almost no one understands science and technology. This is a prescription for disaster. We might get away with it for a while, but sooner or later this combustible mixture of ignorance and power is going to blow up in our faces.
--Carl Sagan
|
|
|
|
|
I haven't done any Android dev (yet) or WP7 (probably never), but I have used at least 5 of the J2ME emulators from various manufacturers. My experience with them is that they each have a different set of bugs from the real phones. In that world, you can go a fair way on one or more emulators, but your final tweaking will almost certainly need a real phone.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
I have an android phone, (droid2 running on froyo) and i also use the emulator. in my experience, the emulator is harder to work with simply because it takes up 90% of your system resources no matter how amazing your computer is. but as far as i have seen, as long as you don't want to use the sensors(orientation/compass, or accelerometer)much, it works about the same...
|
|
|
|
|
The WP7 emulator is actually quite good. Service calls, Push Notifications, local storage, 3D graphics, etc all work well.
There are some obvious things you can't do, like get GPS data, but in general there isn't much you can't do in the emulator.
Performance testing should certainly be done on actual hardware of course.
|
|
|
|
|
Alexander DiMauro wrote: I was wondering, is a phone absolutely necessary?
Yes, before releasing any application, you'll need actual hardware.
Alexander DiMauro wrote: How accurate are the emulators compared to the real thing?
Not bad, but there are quirks in every Windows emulator I have used. You can code around them, only to find the problem doesn't exist on the actual device.
Alexander DiMauro wrote: Is it possible to make apps without ever testing them on an actual device?
Well, yes, but I wouldn't. Depends on what type of apps and actually what you mean by apps. Full blown, large GUI apps, nope. Minimal GUI, large computational, you could give it a shot.
Any hardware-specific functionality will require two versions of the code - one to run in the emulator and one to run on the actual device (
if #DEBUG
I spoke to the local AT&T rep for some used, "demo" devices. He said they couldn't supply them, but all of their trade-ins went to a specific company (regional, I believe), and he suggested contacting them for used units at a good price. I haven't done it yet, however. Also, if the app does not use the cell-phone capabilities, it is verrrry expensive to get a device without committing to a monthly data plan.
One other "gotcha" with development on the real device. When running in debug mode on the device, the PC (debugger) must be connected to the device. This usually means the device is docked in a cradle (although you may get away with a wireless connection). Take the device out of the cradle, and you lost the connection to the debugger. If the device requires using any buttons or ports that are not accessible when in the dock, you'll find yourself looking in the Digi-Keytm catalog for parts to build a cable to attach the device to the dock. Plaster of Paris works wonders to pour around the cable connector for a phone-shaped mold.
Example - in developing a voice recognition application using a headset, the headset plug was next to the docking port. Couldn't have the headset plugged in while in the dock, so a DIY cable was necessary.
Best of luck.
Gary
|
|
|
|
|
I'm not even sure which response to reply to. All good answers, thanks.
I guess the general consensus is that I can use the emulators to learn, but to actually package something and sell it, I need a phone. So...my mobile ambitions will be on hold for a while, I guess.
The whole system seems pretty messed up for developers, at least in the US. I heard that in other countries there are no long term contracts? Is this true? The only way to afford a phone here is to get stuck in a 2-year contract.
Oh well. Thanks again for all the responses. I guess I'll just play with the emulators for a while.
We live in a world operated by science and technology. We have also arranged things so that almost no one understands science and technology. This is a prescription for disaster. We might get away with it for a while, but sooner or later this combustible mixture of ignorance and power is going to blow up in our faces.
--Carl Sagan
|
|
|
|
|
Well, I know that Virgin Mobile has fairly cheap ($25 USD) data plans; if all you want is to do Android devleopment, that's the direction I would go. A decent phone is about $250 USD, but you're not locked into that long term contract. IIRC, for $25/month you get unlimited data and 300 minutes of voice. $60 buys you unlimited everything.
|
|
|
|
|
That looks pretty good. I might wait a little bit until they upgrade to Android 2.2. Thanks for the tip. That sounds MUCH better than getting stuck in another 2-year plan.
Oh, and this is my first thread ever that made it to the CodeProject Daily News email! Woo hoo! Beers for everyone!
We live in a world operated by science and technology. We have also arranged things so that almost no one understands science and technology. This is a prescription for disaster. We might get away with it for a while, but sooner or later this combustible mixture of ignorance and power is going to blow up in our faces.
--Carl Sagan
|
|
|
|
|
Coincidentally i created my first Android app yesterday.
It was, of course, a 'Hello World'-app.
I tested it on an emulator running froyo, and it did what one would expect from a hello world app.
Of course i wanted to show this amazing feat of technology to my collegues next morning, so i packaged it and installed it on my own Samsung galaxy S, running Froyo.
As I already feared the app had gotten an extra feature on my phone. Causing a 'Force Close' right away when you run it.
So no, in my little bit of experience, it seems the emulator isn't good enough as only testing device.
(And yes, I'm enormously proud of being the first person ever to make a Hello World-app fail! =D
|
|
|
|
|
sjewrd wrote: And yes, I'm enormously proud of being the first person ever to make a Hello World-app fail! =D
Sorry, but you're at the end of a very long line!
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|