|
Hello
I have an application which is currently running on Windows mobile (up to version 6.5) written in cf.net.
The project uses a SQLite Database - but could be made to 100% live data rather than locally stored.
I need to expand the application by making it available to other mobile devices (iPhone, Android, Mobile 7)
I know there are solutions for each of these, but I would like to rewrite it as few times a possible to try and help code maintainability / time and money.
I've tried HTML5 - which works well, but not on mobile 7!
Considered silver light - but again that limits it to mobile 7.
Have looked at the mono project - but not made the jump yet (requires a mac - last time I really read it)
So what have you used / are using.
I know there is no golden project, but just curious to see if I have missed anything.
The last resort is for me to create a standard .net website which mobile users use. At least I know that is 99% going to work every where.
Thanks
John
|
|
|
|
|
|
Hi
I have not tried any cross platforms as yet.
I think the only way forward is separate projects each in there own language...........
John
|
|
|
|
|
hai all,
what is that in windows mobile, that are not in windows CE.
Pls tell me the diff directly...
and also what is a diff between smartphone and Pocket Pc...
Best Regard's
Mathy's
|
|
|
|
|
|
Hai Alian,
thanx for ur response...
i go through already blog, still i haven't understood...
pls try to understand my question...
and let me know.
Best Regard's
Mathy's
|
|
|
|
|
Hi Mathy,
Windows CE is a large set of software components interfacing to a large set of hardwware components. The Platform Builder[^] application produces OSes including selected software components interfacing selected hardware components.
Windows Mobile is a hardware and software specification based on specified Windows CE components.
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
|
i need to implement a simple program to insall a new device (price checker)
but the device is build in a 1D scanner and I am not work before this time in smart device using VB.net
any one help me ,please
and cannt learn how to raed a broduct using this scanner and how to save to my database to retreeive a name and Price
Best regards
thank you
wael **midanitoo**
|
|
|
|
|
That's rather a lot of questions, perhaps it would be better if you explained which part of this program you are able to write for yourself. And please don't be surprised or offended if nobody offers to write it all for you.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Can You please specify your question correctly?
I could not able to understand what is your need?
With Regards,
Kasson
|
|
|
|
|
Hi, how is the sensor suppose to detect that there's no movement coming from the phone? Because the phone is still, the numbers keep running. Thanks for the help in advance.
package com.example.testsensors;
import java.util.List;
import android.app.Activity;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
public class TestSensors extends Activity implements SensorEventListener {
private boolean theRegisteredSensor;
private SensorManager theSensorManager;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
theRegisteredSensor = false;
theSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
}
protected void onStart() {
super.onResume();
List<Sensor> sensors = theSensorManager
.getSensorList(Sensor.TYPE_ACCELEROMETER);
if (sensors.size() > 0) {
Sensor sensor = sensors.get(0);
theRegisteredSensor = theSensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_FASTEST);
}
}
@Override
protected void onPause() {
if (theRegisteredSensor) {
theSensorManager.unregisterListener(this);
theRegisteredSensor = false;
}
super.onPause();
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
@Override
public void onSensorChanged(SensorEvent event) {
StringBuffer StringBuff = new StringBuffer();
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER){
StringBuff.append("Accelerometer\n");
StringBuff.append("X-axis:").append(event.values[0]).append("\n");
StringBuff.append("Y-axis:").append(event.values[1]).append("\n");
TextView tv = (TextView) findViewById(R.id.accero_counters);
tv.setText(StringBuff.toString());
Toast.makeText(getBaseContext()
, "Movement is detected.",Toast.LENGTH_SHORT).show();
}
}
}
|
|
|
|
|
I don't know a huge amount about the android SDK, but you need to keep in mind that you're dealing with real data which includes things like quantisation errors and jitter. It may be more appropriate to consider movement below a threshold still, as you probably won't get a value that never changes or stays on zero.
Also, the accelerometer will be detecting gravity, so in one direction you will always get a constant-ish value, the direction depending on which way up the phone is.
|
|
|
|
|
Hello All,
I am new to the Android technology, i need some help in implementing google maps. My problem is:
I want to use google map search in android.
For example if i type restaurants in the below url in the ie eplorer, the map will open with markers.
http://maps.google.com/maps?hl=en&q=restaurants&um=1&ie=UTF-8&sa=N&tab=wl
How can i do this in android using google api's.
Thanks in advance,
Poornima
|
|
|
|
|
By the looks of it you have to sign up:
http://code.google.com/android/maps-api-signup.html[^]
OR:
You could have a look at this: http://code.google.com/apis/maps/documentation/staticmaps/[^]
And you could easily use this code once you look at the examples (you could simply download the map image, and then diplay the image). I've done a bit of work with this for desktop machines, it's fairly straight forward to do. (And at least this way you won't have to sign up to anything).
See if you can crack this: fb29a481781fe9b3fb8de57cda45fbef
The unofficial awesome history of Code Project's Bob!
"People demand freedom of speech to make up for the freedom of thought which they avoid."
|
|
|
|
|
Dear ,
Im looking to get unique number of my PDA (Windows mobile 6.1)
anyway to get the Id or serail in vb.net?
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
|
thanks
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
Hello Chris Maunder,
Thanks for the mobile zone and Thanks for the Newsletters from CP. I am really happy for this Zone. I am looking for some good development videos and tutorials for Windows Phone 7. Anyway I got all in One.
My Mind is the Devil's Workshop.
|
|
|
|
|
|
|
Hi
I have a general type of question. I have an IP camera which supports 3GP container(3GPP file format) video streaming. I need to show the feed from that camera in a windows mobile app(using .NET CF). Does anybody have any experiencies with this type of programming? Any help (links, documents, sample code, advices ...) will be appreciated.
Uroš Bregar
|
|
|
|
|
Hi,
I need some help. My programme doesn't show the value of the sensor movement. There's no error in the code. So I'm not sure what to do. Thanks in advance.
[code]package com.example.testsensors;
import com.example.testsensors.ChronometerDemo1;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorManager;
import android.hardware.SensorListener;
import android.util.Log;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
public class TestSensors extends ChronometerDemo1 {
private static final String TAG = "Sensors";
private SensorManager mSensorManager;
private GraphView mGraphView;
private class GraphView extends View implements SensorListener
{
private Bitmap mBitmap;
private Paint mPaint = new Paint();
private Canvas mCanvas = new Canvas();
private Path mPath = new Path();
private RectF mRect = new RectF();
private float mLastValues[] = new float[3*2];
private float mOrientationValues[] = new float[3];
private int mColors[] = new int[3*2];
private float mLastX;
private float mScale[] = new float[2];
private float mYOffset;
private float mMaxX;
private float mSpeed = 1.0f;
private float mWidth;
private float mHeight;
public GraphView(Context context) {
super(context);
mColors[0] = Color.argb(192, 255, 64, 64);
mColors[1] = Color.argb(192, 64, 128, 64);
mColors[2] = Color.argb(192, 64, 64, 255);
mColors[3] = Color.argb(192, 64, 255, 255);
mColors[4] = Color.argb(192, 128, 64, 128);
mColors[5] = Color.argb(192, 255, 255, 64);
mPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
mRect.set(-0.5f, -0.5f, 0.5f, 0.5f);
mPath.arcTo(mRect, 0, 180);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
mBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.RGB_565);
mCanvas.setBitmap(mBitmap);
mCanvas.drawColor(0xFFFFFFFF);
mYOffset = h * 0.5f;
mScale[0] = - (h * 0.5f * (1.0f / (SensorManager.STANDARD_GRAVITY * 2)));
mScale[1] = - (h * 0.5f * (1.0f / (SensorManager.MAGNETIC_FIELD_EARTH_MAX)));
mWidth = w;
mHeight = h;
if (mWidth < mHeight) {
mMaxX = w;
} else {
mMaxX = w-50;
}
mLastX = mMaxX;
super.onSizeChanged(w, h, oldw, oldh);
}
@Override
protected void onDraw(Canvas canvas) {
synchronized (this) {
if (mBitmap != null) {
final Paint paint = mPaint;
final Path path = mPath;
final int outer = 0xFFffff00;
final int inner = 0xFFcd5c5c;
if (mLastX >= mMaxX) {
mLastX = 0;
final Canvas cavas = mCanvas;
final float yoffset = mYOffset;
final float maxx = mMaxX;
final float oneG = SensorManager.STANDARD_GRAVITY * mScale[0];
paint.setColor(0xFFAAAAAA);
cavas.drawColor(0xFFFFFFFF);
cavas.drawLine(0, yoffset, maxx, yoffset, paint);
cavas.drawLine(0, yoffset+oneG, maxx, yoffset+oneG, paint);
cavas.drawLine(0, yoffset-oneG, maxx, yoffset-oneG, paint);
}
canvas.drawBitmap(mBitmap, 0, 0, null);
float[] values = mOrientationValues;
if (mWidth < mHeight) {
float w0 = mWidth * 0.333333f;
float w = w0 - 32;
float x = w0*0.5f;
for (int i=0 ; i<3 ; i++) {
canvas.save(Canvas.MATRIX_SAVE_FLAG);
canvas.translate(x, w*0.5f + 4.0f);
canvas.save(Canvas.MATRIX_SAVE_FLAG);
paint.setColor(outer);
canvas.scale(w, w);
canvas.drawOval(mRect, paint);
canvas.restore();
canvas.scale(w-5, w-5);
paint.setColor(inner);
canvas.rotate(-values[i]);
canvas.drawPath(path, paint);
canvas.restore();
x += w0;
}
} else {
float h0 = mHeight * 0.333333f;
float h = h0 - 32;
float y = h0*0.5f;
for (int i=0 ; i<3 ; i++) {
canvas.save(Canvas.MATRIX_SAVE_FLAG);
canvas.translate(mWidth - (h*0.5f + 4.0f), y);
canvas.save(Canvas.MATRIX_SAVE_FLAG);
paint.setColor(outer);
canvas.scale(h, h);
canvas.drawOval(mRect, paint);
canvas.restore();
canvas.scale(h-5, h-5);
paint.setColor(inner);
canvas.rotate(-values[i]);
canvas.drawPath(path, paint);
canvas.restore();
y += h0;
}
}
}
}
}
public void onSensorChanged(int sensor, float[] values) {
synchronized (this) {
if (mBitmap != null) {
final Canvas canvas = mCanvas;
final Paint paint = mPaint;
if (sensor == SensorManager.SENSOR_ORIENTATION) {
for (int i=0 ; i<3 ; i++) {
mOrientationValues[i] = values[i];
}
} else {
float deltaX = mSpeed;
float newX = mLastX + deltaX;
int j = (sensor == SensorManager.SENSOR_MAGNETIC_FIELD) ? 1 : 0;
for (int i=0 ; i<3 ; i++) {
int k = i+j*3;
final float v = mYOffset + values[i] * mScale[j];
paint.setColor(mColors[k]);
canvas.drawLine(mLastX, mLastValues[k], newX, v, paint);
mLastValues[k] = v;
}
if (sensor == SensorManager.SENSOR_MAGNETIC_FIELD)
mLastX += mSpeed;
}
invalidate();
}
}
}
public void onSensorChanged(SensorEvent event, int sensor, int accuracy) {
StringBuffer buff = new StringBuffer();
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER){
buff.append("ACCELEROMETER\n");
buff.append("X-axis: ").append(event.values[0]).append("\n");
buff.append("Y-axis: ").append(event.values[1]).append("\n");
buff.append("Z-axis: ").append(event.values[2]).append("\n");
TextView tv = (TextView) findViewById(R.id.accero_counters);
tv.setText(buff.toString());
Toast.makeText
(getBaseContext()
, "Accelerometer\n" + "X-axis: " + event.values[0] + "\n" + "Y-axis: " + event.values[1], Toast.LENGTH_SHORT
).show();
}
}
@Override
public void onAccuracyChanged(int sensor, int accuracy) {
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
mGraphView = new GraphView(this);
setContentView(mGraphView);
}
@Override
protected void onResume() {
super.onResume();
mSensorManager.registerListener(mGraphView,
SensorManager.SENSOR_ACCELEROMETER |
SensorManager.SENSOR_MAGNETIC_FIELD |
SensorManager.SENSOR_ORIENTATION,
SensorManager.SENSOR_DELAY_FASTEST);
}
@Override
protected void onStop() {
mSensorManager.unregisterListener(mGraphView);
super.onStop();
}
}[/code]
|
|
|
|
|
Hi all, I'm trying to call my 'ChronometerDemo1' class from 'TestSensors' but its just not working. Need some help. Sorry if its abit long. Thanks in advance.
TestSensors.java
<br />
package com.example.testsensors;<br />
<br />
import android.app.Activity;<br />
import android.content.Context;<br />
import android.os.Bundle;<br />
import android.os.SystemClock;<br />
import android.util.Log;<br />
import android.view.Menu;<br />
import android.widget.Chronometer;<br />
import android.widget.Toast;<br />
<br />
public class ChronometerDemo1 extends Activity {<br />
private static final String TAG = "CustomChronometerActivity";<br />
private static final String MS_ELAPSED = "com.etc.etc.MsElapsed";<br />
<br />
private static MyChronometer chrono;<br />
<br />
<br />
@Override<br />
public void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
<br />
chrono = new MyChronometer(this);<br />
chrono.start();<br />
setContentView(chrono);<br />
}<br />
<br />
@Override<br />
protected void onPause() {<br />
Log.i(TAG, "onPause()");<br />
super.onPause();<br />
chrono.stop();<br />
}<br />
<br />
@Override<br />
protected void onResume() {<br />
Log.i(TAG, "onResume()");<br />
super.onResume();<br />
chrono.start();<br />
}<br />
<br />
@Override<br />
protected void onSaveInstanceState(Bundle outState) {<br />
super.onSaveInstanceState(outState);<br />
Log.i(TAG, "onSaveInstanceState()");<br />
chrono.stop();<br />
outState.putInt(MS_ELAPSED, chrono.getMsElapsed());<br />
}<br />
<br />
@Override<br />
protected void onRestoreInstanceState(Bundle savedInstanceState) {<br />
super.onRestoreInstanceState(savedInstanceState);<br />
Log.i(TAG, "onRestoreInstanceState()");<br />
int ms = savedInstanceState.getInt(MS_ELAPSED);<br />
chrono.setMsElapsed(ms);<br />
chrono.start();<br />
}<br />
<br />
class MyChronometer extends Chronometer {<br />
<br />
public int msElapsed;<br />
public boolean isRunning = false;<br />
<br />
public MyChronometer(Context context) {<br />
super(context);<br />
}<br />
<br />
public int getMsElapsed() {<br />
return msElapsed;<br />
}<br />
<br />
public void setMsElapsed(int ms) {<br />
setBase(getBase() - ms);<br />
msElapsed = ms;<br />
}<br />
<br />
@Override<br />
public void start() {<br />
super.start();<br />
setBase(SystemClock.elapsedRealtime() - msElapsed);<br />
isRunning = true;<br />
}<br />
<br />
@Override<br />
public void stop() {<br />
super.stop();<br />
if(isRunning) {<br />
msElapsed = (int)(SystemClock.elapsedRealtime() - this.getBase());<br />
}<br />
isRunning = false;<br />
}<br />
}<br />
<br />
public static void onCreate() {<br />
chrono.start(); <br />
}<br />
}
|
|
|
|
|
ChronometerDemo1.java
package com.example.testsensors;<br />
<br />
import android.app.Activity;<br />
import android.content.Context;<br />
import android.os.Bundle;<br />
import android.os.SystemClock;<br />
import android.util.Log;<br />
import android.view.Menu;<br />
import android.widget.Chronometer;<br />
import android.widget.Toast;<br />
<br />
public class ChronometerDemo1 extends Activity {<br />
private static final String TAG = "CustomChronometerActivity";<br />
private static final String MS_ELAPSED = "com.etc.etc.MsElapsed";<br />
<br />
private static MyChronometer chrono;<br />
<br />
<br />
@Override<br />
public void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
<br />
chrono = new MyChronometer(this);<br />
chrono.start();<br />
setContentView(chrono);<br />
}<br />
<br />
@Override<br />
protected void onPause() {<br />
Log.i(TAG, "onPause()");<br />
super.onPause();<br />
chrono.stop();<br />
}<br />
<br />
@Override<br />
protected void onResume() {<br />
Log.i(TAG, "onResume()");<br />
super.onResume();<br />
chrono.start();<br />
}<br />
<br />
@Override<br />
protected void onSaveInstanceState(Bundle outState) {<br />
super.onSaveInstanceState(outState);<br />
Log.i(TAG, "onSaveInstanceState()");<br />
chrono.stop();<br />
outState.putInt(MS_ELAPSED, chrono.getMsElapsed());<br />
}<br />
<br />
@Override<br />
protected void onRestoreInstanceState(Bundle savedInstanceState) {<br />
super.onRestoreInstanceState(savedInstanceState);<br />
Log.i(TAG, "onRestoreInstanceState()");<br />
int ms = savedInstanceState.getInt(MS_ELAPSED);<br />
chrono.setMsElapsed(ms);<br />
chrono.start();<br />
}<br />
<br />
class MyChronometer extends Chronometer {<br />
<br />
public int msElapsed;<br />
public boolean isRunning = false;<br />
<br />
public MyChronometer(Context context) {<br />
super(context);<br />
}<br />
<br />
public int getMsElapsed() {<br />
return msElapsed;<br />
}<br />
<br />
public void setMsElapsed(int ms) {<br />
setBase(getBase() - ms);<br />
msElapsed = ms;<br />
}<br />
<br />
@Override<br />
public void start() {<br />
super.start();<br />
setBase(SystemClock.elapsedRealtime() - msElapsed);<br />
isRunning = true;<br />
}<br />
<br />
@Override<br />
public void stop() {<br />
super.stop();<br />
if(isRunning) {<br />
msElapsed = (int)(SystemClock.elapsedRealtime() - this.getBase());<br />
}<br />
isRunning = false;<br />
}<br />
}<br />
<br />
public static void onCreate() {<br />
chrono.start(); <br />
}<br />
}
|
|
|
|
|