Idea of making typing efficient and easy on phones with screen keyboard
by Sean Hodges » Tue, 28 Apr 2009 00:46:03 GMT
Sponsored Links
> The question is: Does Android platform needs something like this???
I have no idea, you have not clearly explained what exactly this
improved on-screen typing software will do...
Is it a new virtual keyboard? How does a user interact with it? What
functional advantages does it have over the standard (virtual) QWERTY
keyboard?
Perhaps you need to prototype something and get some decisive feedback
before you try to sell an implementation on the market, it sounds
useful but so far you have only defined the broad objectives of your
app.
The existing virtual keyboard code should be available in the Android
source code, that might be a good starting point.
--~--~---------~--~----~------------~-------~--~----~
Other Threads
1. App FC's every 2nd time it is launched
Seems to be that the issue is located some where in the following code,
located at the end of the email. Not sure why it would work every other
time the app gets launched and then not every subsequent time.
The line I have bolded is where the error seems to be happening and the
log file shows the following. Would appreciate any pointers.
03-17 20:06:37.415: WARN/System.err(301): java.lang.NullPointerException
03-17 20:06:37.445: WARN/System.err(301): at
org.json.JSONTokener.nextCleanInternal(JSONTokener.java:112)
03-17 20:06:37.485: WARN/System.err(301): at
org.json.JSONTokener.nextValue(JSONTokener.java:90)
03-17 20:06:37.515: WARN/System.err(301): at
org.json.JSONObject.<init>(JSONObject.java:154)
03-17 20:06:37.515: WARN/System.err(301): at
org.json.JSONObject.<init>(JSONObject.java:171)
03-17 20:06:37.535: WARN/System.err(301): at
com.dtwconsulting.golfcaddietrial.GolfCaddie$initialiseServer.doInBackground(GolfCaddie.java:114)
03-17 20:06:37.556: WARN/System.err(301): at
com.dtwconsulting.golfcaddietrial.GolfCaddie$initialiseServer.doInBackground(GolfCaddie.java:1)
03-17 20:06:37.565: WARN/System.err(301): at
android.os.AsyncTask$2.call(AsyncTask.java:185)
03-17 20:06:37.585: WARN/System.err(301): at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
03-17 20:06:37.585: WARN/System.err(301): at
java.util.concurrent.FutureTask.run(FutureTask.java:137)
03-17 20:06:37.615: WARN/System.err(301): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
03-17 20:06:37.645: WARN/System.err(301): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
03-17 20:06:37.645: WARN/System.err(301): at
java.lang.Thread.run(Thread.java:1096)
private class initialiseServer extends AsyncTask<Void, Integer, Boolean> {
protected void onPreExecute(){
initDialog = ProgressDialog.show(GolfCaddie.this, "",
"Initializing. Please wait...", true);
}
protected Boolean doInBackground(Void...voids) {
Boolean expired = false;
String installType = "";
String retInit = "";
String initExpDate = "";
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd");
// Let's get the device ID
TelephonyManager mTelephonyMgr =
(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String imei = mTelephonyMgr.getDeviceId();
// Now, let's check the application to see if we have the
trial or full version.
if
(getApplication().getPackageName().equals("com.dtwconsulting.golfcaddietrial")){
installType = "trial";
} else {
installType = "full";
}
try {
// Construct data
String data = "code=" + imei + "&installtype=" +
installType + "&apikey=" + GlobalVars.GCAPI_KEY + "&platform=" +
GlobalVars.PLATFORM;
// Send data
URL url = new URL(GlobalVars.HOST_WAP +
"initialize.php?" + data);
URLConnection conn = url.openConnection();
// Get the response
BufferedReader rd = new BufferedReader(new
InputStreamReader(conn.getInputStream()));
retInit = rd.readLine();
*JSONObject initLine = new JSONObject(retInit);*
Number initErr = initLine.getInt("errcode");
initExpDate = initLine.getString("expiredate");
rd.close();
} catch (Exception e) {
e.printStackTrace();
}
Date expDate = null;
Date today = new Date();
try {
expDate = df.parse(initExpDate);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (expDate.before(today)){
if (installType.equals("trial")) {
// Trial has expired
expired = true;
}
}
else{
expireDate = df.format(expDate);
}
return expired;
}
protected void onPostExecute(Boolean result) {
initDialog.dismiss();
if (result){
AlertDialog.Builder builder = new
AlertDialog.Builder(GolfCaddie.this);
builder.setMessage("Your Golf Caddie trial has
expired." )
.setCancelable(false)
.setPositiveButton("Ok", new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface
dialog, int id) {
GolfCaddie.this.finish();
}
});
AlertDialog alert = builder.create();
builder.show();
}
else{
checkInstall();
}
}
}
--
------------------------------------------------------------------------
David Williams
Check out our WebOS mobile phone app for the Palm Pre and Pixi:
<http://www.dtw-consulting.com/GolfCaddie> Golf Caddie
<http://www.dtw-consulting.com/GolfCaddie> | Golf Caddie Forum
<http://www.dtw-consulting.com/GolfCaddie/forum> | Golf Caddie FAQ
<http://www.dtw-consulting.com/GolfCaddie/faq.html> by DTW-Consulting, Inc.
--
<<inline: GClogo.png>>
2. unable to access camera button
Hello,
I have created several emulators of various Android versions with camera
hardware defined.
The following lines are in the AndroidManifest.xml file:
<uses-permission android:name="android.permission.CAMERA"></uses-permission>
<uses-feature android:name="android.hardware.camera"
android:required="true" />
<uses-feature android:name="android.hardware.camera.autofocus"
android:required="false" />
The project launches so I assume that it passed the feature checks and believes
that there is a camera. However I am unable to press the camera button in the
emulator.
The objective is to register a broadcast receiver with an
Intent.ACTION_CAMERA_BUTTON filter. This would then launch an activity that
actually displays the camera preview and takes the picture.
Why is the button disabled?
Thanks
--
3. What is a keyguard?
4. unable to resize a button at onCreate() method of new activity
5. Never falling asleep
6. Detect whether KeyGuard lock is currently enabled or disabled
7. Accessing Objects created in Service from Activity