Android :: Throwing / Simulating Key Strokes Pragmatically
Sep 15, 2010
I want to simulate a KEY_UP press on my phone.. but pragmatically can someone tell me the code of a function that can do this? i found some functions searching on www.google.com but all of them are obsolete.
View 2 Replies
Jul 2, 2009
I have two questions:
1. How do you programmatically generate key strokes? I found some tutorials where it says to use IWindowManager, but that doesn't exist anymore in 1.5. (And WindowManager doesn't provide any function to generate key strokes)
2. How do you programmatically select one item from a ListView? Is it possible to do it with the index of the list item (it's position in the list)
View 4 Replies
View Related
Aug 10, 2009
I want to run an activity without adding it in Menifest.xml file. Is it possible? and how?
Actually I am developing a component (Library) that other users can plugged with their programs.
View 8 Replies
View Related
Jul 26, 2010
In Android 2.1 can we suppress the pairing dialog while exchange data between 2 android devices using bluetooth API. or is there any way that pragmatically we can do this without the user interaction.
View 3 Replies
View Related
Dec 27, 2009
Is it possible to scroll a Gallery widget pragmatically? I see Gallery inherits scrollTo() and scrollBy(), but that scrolls the entire widget itself, not its content.
Is there some obvious way to do this that I'm missing, my searches are coming up empty? I don't want to have to do a copy/paste/hack from git hub if possible.
View 2 Replies
View Related
May 7, 2009
I'm writing a software and using GPS simulator on SDK1.5 I use an AVD device by command : android create avd --target 2 --name AVD_15 My problem is when i change location up to the third times, my program can not receive this change. I do not understand but I can be sure that my program worked well on SDK 1.1 Do you know what happens in SDK1.5?
View 3 Replies
View Related
Jul 24, 2010
I am looking to simulate a slot machine, now so far I am just animating drawables and looping it to create the effect. I was wondering if I could achieve this through a listview instead. I tried looking at this approach but I cannot get it to loop back to the beginning after it reaches the end.
View 3 Replies
View Related
Apr 10, 2010
I am looking for a way to simulate or create a waiting voicemail message. I know there has a question about this that have been on the mailing-list/group here: http://bit.ly/b6ITDQ
In investigating trying to get a voicemail message simulated w/ the AVD Emulator, I tried just setting the incoming mail to "SEND_TO_VOICEMAIL" - but that does not create a message. There is not an indicator that the call was made until you check your call log (which is the expected behavior, so no complaints there).
I have looking through the Android documentation, tutorials/samples, and reference. I cannot find anything talking about creating or bootstrapping a voicemail message (and I haven't seen anything about handling other instances of a "Message Waiting Indicator").
I've looked around on a couple other message forums, like anddev.org, and haven't seen any examples dealing with voicemail. I have a Safari account and searched in the Android dev books and only find mention of the Intent URI for the Dailer (voicemail:).
If looks like when I'm trying to achieve would be done by creating a Notification and passing it to NotificationManager.notify() as done in this example article:[url]
Would PendingIntent be the Intent that I'm looking for? I'm new to the platform/api, so I'm likely just missing some knowledge on what I'm trying to do is called. I have done a fair bit of looking around, but I've reached a bit where I feel I'm going in circles.
If looks like once I could create/simulate voicemail, then I'd chance need to create a PhoneStateListener with a definition of onMessageWaitingIndicatorChanged() and call TelephonyManager.listen().
If I have missed a place to check or a resource - just point me briefly in that direction.
View 2 Replies
View Related
Oct 5, 2010
I am having issues with my application when a user gets a system update (for example from 2.1 to 2.2). i am wondering how I can reproduce this experience on a phone (Nexus One). does this involve rooting the phone and then applying a system update? I need the update to look as though it came from the system. In other words, I can't take a full ROM image, because then I think I would lose my application being installed between upgrades.
View 2 Replies
View Related
Aug 21, 2010
Is there a way to send an SMS from te DDMS in Eclipse to my Android phone. The emulator control is disabled when I'm running my physical phone. I can only sent a SMS to the emulator.
View 1 Replies
View Related
Feb 19, 2010
So I am trying to simulate that the phone is receiving a call. I have successfully extracted the phones ring tone and played it. Now I want to simulate the vibration. While I can make the phone vibrate, I want to emulate the exact pattern that the phone vibrates with as when it receives a call. Is there some setting or class that I can use to extract this pattern, and also detect if vibration is turned on?
View 3 Replies
View Related
Nov 2, 2010
I want to port my application on all android devices, and I want to have the right/left animation on the activities transition on all android platform versions. I know that this feature is implemented in the 2.0 version. How can I implement this feature for the lower versions?
View 1 Replies
View Related
Jan 12, 2010
Is there a way to simulate opening/closing the 'hardware' keyboard in the emulator?
I have to test some changes that I capture using getResources().getConfiguration().keyboardHidden and this would help a fair lot :)
View 2 Replies
View Related
Nov 20, 2010
Why the following xml file should throw NullPointer exception? If I remove all reference to the array hrs_to_wait_values it is ok.
CODE:..............
View 1 Replies
View Related
Jul 29, 2010
Im trying to get an object form my SQLite database in my Android application. I know that the contact is in the database because when I add it and try finding by ID, it returns the object. When I try finding by first and last name, though, it throws an exception and Im left with a null reference.
Here is the query:
CODE:..........
Ive also tried to find just by first name and just by last name. Same result as above.
The exception is an SQLite exception
no such column: aurelius: , while compiling: SELECT _id, last_name, first_name,
email_address, organization_name, label, label_position FROM contacts WHERE
first_name=marcus AND last_name=aurelius
And also happens when trying to select just first or last name
no such column: marcus: , while compiling: SELECT _id, last_name, first_name,
email_address, organization_name, label, label_position FROM contacts WHERE
first_name=marcus
View 1 Replies
View Related
May 28, 2010
I have a GestureOverlayView over the top of a TextView. The TextView has Linkify.addLinks(tv, Linkify.ALL) called on it.
If you click on an URL in the TextView the following exception is thrown Running 2.2 (apparently a pre-release version)
CODE:...............
View 5 Replies
View Related
Sep 10, 2010
I'm trying to implement a custom MapView. Inside my MapActivity (named mainmap) I have an inner class which extends MapView:
CODE:........
I have my main.xml formatted to find the inner class like so:
CODE:................
Also, in Androidmanifest.xml, I have the appropriate <uses-library android:name="com.google.android.maps"/> entry.
When I try to run my app, I get (amongst other things) in logcat:
CODE:..............
This is caused by this entry I find in logcat:
CODE:...............
If I understand correctly, my app is crashing because Android is saying it doesn't find the appropriate constructor for my custom MapView (the Lmapview class). As you can see above, however, it is defined and it matches the signature it is looking for.
View 1 Replies
View Related
Oct 9, 2010
This code works fine if I move the findViewById call in to the Activity. Any hints as to why it doesn't work from inside the LearningView class? I've tried moving the TextView inside the com.example.LearningView tag but no joy. I'd prefer to get the TextView from within the SurfaceView subclass as I feel it's more logical to treat the TV as a "child" of the SV.
This is a contrived example I wrote to figure out the problem in a larger application, but the gist of it is the same, and the stack trace is basically the same.
For what it is worth, the findViewById call is returning null, which obviously threw NullPointerExceptions in some attempts to fix this.
As you can probably gather from my attempts I'm flying blind on this one.
Learning.java:
CODE:..........
main.xml:
CODE:..............
Stack trace:
CODE:......................
View 1 Replies
View Related
Aug 6, 2010
I am accessing a URL that's redirecting me to a URL with spaces in it. (Using HttpClient 4.x) How do I prevent this from throwing an error (replacing the spaces with %20 not +)
CODE:..................
View 3 Replies
View Related
Sep 12, 2009
I turned on DEBUG_CHECK_GL_ERROR for my GLSurfaceView to try to figure out why I'm having a problem on pause/ resume/reload everything, and when I turned it on, I got an UnsupportedOperationException when calling GL11.glGenBuffers() (for creating Vertex Buffer Objects).
Why is it saying that operation is unsupported when:
1) The vertex_buffer_object extension is listed on the target device and my code checks for it before trying to use VBOs.
2) VBOs are working correctly (and really well might I add).
This is on a G1. Yes, I know the G1 is only OpenGL ES 1.0 compliant and I'm trying to use a 1.1 extension, but if the phone lists the extension, doesn't that mean I can use it? Also - the extension works! Does this mean that it works but use-at-your-own-risk, kinda like how SoundPool was in Android 1.0?
View 2 Replies
View Related
Apr 7, 2010
I'm currently working on an android app that pulls a list of forums from a JSON feed. I'm trying to parse the feed and immediately upon calling getJSONArray a JSON exception is being thrown with no stack trace. The JSON being returned is stored in an JSONObject jobj with the format as follows: However when running the following code, I get an immediate exception without a stack trace: Code...
View 1 Replies
View Related
Apr 6, 2010
I created a TextView and put an url to it, using setText(Html.fromHtml("");. Its opening the web page in the built-in browser and when I press back, its coming back to the application.
I don't want to come back to the application, so in activity's onResume(), I call finish(). Its exiting at the first time. But when I open the application again, its throwing some exception.
Any other way to close the application, other than this way.
View 2 Replies
View Related
Aug 27, 2010
I'm having trouble with a spiner throwing a nullPointerExpression I'm sure I'm missing something stupid? Code...
View 2 Replies
View Related
Jan 25, 2010
I have added this line in my androidManifest.xml <uses-permission android:name="android.permission.INJECT_EVENT"/>
I am trying to execute following code:
CODE:........
Both above lines are throwing exception W/System.err(762): java.lang.SecurityException: Injecting to another application requires INJECT_EVENT permission.
Do we need anything else too to get it working ?
View 4 Replies
View Related
Jun 29, 2010
I have noticed that there is a thread on tips for getting web pages from a PC to the phone for viewing ((How to) get a web page from computer to phone. - Android Forums). I don't have a problem with this and I use the qr code extension method with Firefox. What I would like to know is if anyone has come up with an equally simple & quick way to throw a web page found on the phone to their PC? I know of some ways to do it..I'm looking for the most time efficient/easy way to do it.
View 8 Replies
View Related
Jan 25, 2010
Anyone else experiencing this problem or know of a solution? I have a Digicert signed https certificate that is throwing an SSLException (Not trusted server certificate). This doesn't make any sense as Digicert is a recognized certificate authority. I can connect to my https url without a problem via IE, Firefox, and Safari so they appear to have no issue with the certificate. Here's the code I'm using. Very simple stuff......................
View 3 Replies
View Related
Jun 29, 2010
We have a simple client server architecture between our mobile device and our server both written in Java. An extremely simple ServerSocket and Socket implementation. However one problem is that when the client terminates abruptly (without closing the socket properly) the server does not know that it is disconnected. Furthermore, the server can continue to write to this socket without getting any exceptions. Why? According to documentation Java sockets should throw exceptions if you try to write to a socket that is not reachable on the other end!
View 5 Replies
View Related
Oct 19, 2010
today i meet the problem.i need technic can control the android machine from server.then i want send data from server to android with no request from android.
View 2 Replies
View Related
Apr 14, 2010
I'm trying to open a dialog window, but every time I try to open it it throws this exception:
CODE:.................
I'm creating it by calling showDialog with the display's id. The onCreateDialog handler logs fine and I can step through it without an issue, but I've attached it since it seems like I'm missing something:
CODE:............
Is there something missing from this? Some questions have talked about having this problem when creating a dialog from onCreate, which happen because the activity isn't created yet, but this is coming from a call from a menu object, and the appContext variable seems like it is correctly populated in the debugger.
View 3 Replies
View Related
Jun 3, 2010
I'm writing an application which connects to a back office site. The backoffice site contains a whole slew of JavaScript functions, at least 100 times the average site. Unfortunately it does not load them, and causes much of the functionality to not work properly. So I am running a test. I put a page out on my server which loads the FireBugLite javascript text. Its a lot of javascript and perfect to test and see if the Android WebView will load it. The WebView loads nothing, but the browser loads the Firebug Icon. What on earth would make the difference, why can it run in the browser and not in my WebView? Any suggestions.
More background information, in order to get the stinking backoffice application available on a Droid (or any other platform except windows) I needed to trick the bakcoffice application to believe what's accessing the website is Internet Explorer. I do this by modifying the WebView User Agent.Also for this application I've slimmed my landing page, so I could give you the source to offer me aid. package ksc.myKMB;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebSettings;
import android.webkit.WebViewClient;
import android.widget.Toast;
public class myKMB extends Activity {
I already have JavaScript on the web browser on, the problem is the web view is acting to different from the web browser.
View 1 Replies
View Related