I want to create an Android service, which notifies the main activity whenever disconnects and when internet reconnects again. I have following function for checking internet connectivity:.
private boolean haveInternet(){
NetworkInfo info=(NetworkInfo)((ConnectivityManager)this.getSystemService(Context.CONNECTIVITY_SERVICE)).get...
I am developing a game that uses box2d engine in android. I create the physics world by definitions coming out a xml defined for 320X480 resolution.
Now in box2d I have considered that 1 unit is 30 Pixels. The question is , is there any other option other than defining a separate xml for each resolution to scale this properly for all s...
I currently have an Activity that when it gets displayed a Notification will also get displayed in the Notification bar.
This is so that when the User presses home and the Activity gets pushed to the background they can get back to the Activity via the Notification.
The problem arises when a User presses the back button, my Activity ge...
how to connect to a tomcat server through the browser in an android virtual device??
Usually,After we start tomcat server, when we say "http://localhost:8080" tomcat server can be seen in browsers like Firefox etc.. But i am not getting it in an AVD Browser. .Is there a way to connect to tomcat on local machine??????
...
Calling BroadCastReceiver class from Service.
My Question is : How to call/instantiate "BlockMyCall" (a class which extends BroadcastReciever) from a Service ( referred to as "SimpleClass1 in my question")
I have 3 classes in App.
1) "BlockMyCall" extends BroadcastReceiver {this class has code to block the outbound calls, using Inte...
I'm trying to use the TextView constructor with style like this:
TextView myText = new TextView(MyActivity.this, null, R.style.my_style );
however, when i do this, the text view does not appear to take the style (I verified the style by setting it on a static object).
I've also tried using myText.setTextAppearance(MyActivity.this, R....
hello guyz
I have this markup:
<LinearLayout
android:id="@+id/authorDetails"
style="@style/authorDetails">
<ImageView
android:id="@+id/authorPic"
style="@style/authorPic" />
<TextView
android:id="@+id/authorName"
style="@style/authorName"
android:text="author name" />
</LinearLayout>
and this style:
<...
Hello all,
I've been working with SQLite on android and I would like to add an arraylist to a column in a table, and then fetch the data back as an arraylist. The arraylist is a list of Longs. I've noticed that SQL has an option for storing BLOBS, however it looks like I need to convert the arraylist to a byte[] first before being able ...
Hi, I'm trying to use NyARToolkit for android to get the rotation of a marker.
I am trying to automatically straighten a document that has been photographed using the camera.
Does anyone know how I would go about this, using NyARtoolkit or another if necessary?
...
I want to display a bitmap read from the SD card at actual pixel size in Android.
I can't assume anything about the bitmap, other than Android supports its image format. The bitmap might be huge.
Seems simple enough, but when you factor Android memory limitations it gets much more complicated.
Any ideas?
Edit: Attempting to load a la...
Hi, I would like to know if there is a way of preventing a duplicate launch of browser/activity, while the user is already focused on it.
mybe there is a way to detect before if the user's current screen is already focused on the same activity/browser i intent to launch?
thanks,
ray.
...
I have a site where, via Android, a user needs to:
fill in a document (simple html I think).
the next step would be to sign on the Android.
the data should be saved into a database inside the site.
Points I should mention:
the UI should be as simple as it gets
I am the one who should build the web database
So therefore my idea wa...
Right now all I am trying to do is detect when the screen is pressed and then display a log message to confirm it happened. My code so far is modified off of the CameraPreview sample code (it will eventually take a picture) so the bulk of the code is in a class that extends SurfaceView. API for the example code from the SDK is 7.
...
What is the easiest way for a user to send me the output from 'adb bugreport'? Asking them to install the sdk and hook up USB debugging is too hard. Is there an app that will just dump that out and email it, or some other trick?
Thanks
...
When using the "selector" to specify different images for buttons for different states, such as pressed, focused etc, do I have to write an xml file for each button? I have about 15-20 buttons in my app, so was wondering if there is a way to write just one xml and refer to parts of it?
Thanks
Chris
...
Hi,
I am trying to implement my own Cursor with different data type, and I am sub-classing it with
AbstractCursor. But my question is when I call myCursor.getInt(A_COLUMN_INDEX), why the getInt(int) of myCursor does not get called?
Thank you.
...
what is maximum size of thick/thin client application(to d/w through OTA) in both Android & Samsung Bada platform ?
...
I'm having great difficulty getting basic textures to work in an OpenGL ES app on my Droid (2.1-update1). I trying to render a simple textured quad - four vertices, two faces, with normals and texture coords. When rendered, the texture is garbled and full of static, similar to TV noise.
Here's a pic showing the original texture...
Hey y'all
So I have a TextSwitcher that I want to update every second with the number of seconds it has been since the activity opened. Here is my code
public class SecondActivity extends Activity implements ViewFactory
{
private TextSwitcher counter;
private Timer secondCounter;
int elapsedTime = 0;
@Override
p...
In the Lunar Lander example (Provided by Google's Android site), there is a main loop in a method called "run()". Here it is below:
@Override
public void run() {
while (mRun) {
Canvas c = null;
try {
c = mSurfaceHolder.lockCanvas(null);
s...