Android :: Why Generated Phone Class Called R?

Sep 1, 2010

I'm just curious, who in the world names a class R ? Is there any history behind this convention?

Android :: Why generated Phone class called R?


Android :: How To Get R Class Generated Again?

Aug 11, 2010

The automatic generation of the R class does not work anymore. I have tried Project -> Clean.A warning on all xml files has also showed up: No grammar constraints (DTD or XML schema) detected for the document." Maybe that is why the code generation have stopped. Any idea how to get the R class generated again?

View 3 Replies View Related

Android :: How To Get Different Package Name For Generated R.Java Class?

Jan 24, 2009

Apt while generating the resources, is it possible to provide a different package name for the generated R.java class. Currently it seems to use the same package name as the one in manfifest defination of AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.tejasoft.dialer.mobile.android"> Also, is there a way to give custom class name instead of default R name say Resources.

View 4 Replies View Related

Android :: Application Class Being Called Twice

Oct 16, 2010

In my Android application, I overload the Application class, and I updated the tag in my manifest. This application also creates an Android Service. I have put some logs in the onCreate of my Application class, and I see it being called twice. The first time is when my application gets launched (this is expected) and then, it's usually right after the Service is being created. the log also shows that a second instance of the Application is being created. (I print the "this" value and they are different). I thought the Application would be created as a singleton. Is that happening because I create a Service?

View 3 Replies View Related

Android :: AudioRecord Class - Callback Is Never Called

Feb 15, 2010

My Android Java Application needs to record audio data into the RAM and process it. This is why I use the class "AudioRecord" and not the "MediaRecorder" (records only to file).

Till now, I used a busy loop polling with "read()" for the audio data. this has been working so far, but it peggs the CPU too much. Between two polls, I put the thread to sleep to avoid 100% CPU usage. However, this is not really a clean solution, since the time of the sleep is not guaranteed and you must subtract a security time in order not to loose audio snippets. This is not CPU optimal. I need as many free CPU cycles as possible for a parallel running thread.

Now I implemented the recording using the "OnRecordPositionUpdateListener". This looks very promising and the right way to do it according the SDK Docs. Everything seems to work (opening the audio device, read()ing the data etc.) but the Listner is never called.

I am working with a real Device, not under the Emulator. The Recording using a Busy Loop basically works (however not satifiying). Only the Callback Listener is never called.

Here is a snippet from my Sourcecode:
CODE:.........................

View 2 Replies View Related

Android :: Android: AudioRecord Class - Callback Is Never Called

Feb 15, 2010

My Android Java Application needs to record audio data into the RAM and process it. This is why I use the class "AudioRecord" and not the "MediaRecorder" (records only to file).

Till now, I used a busy loop polling with "read()" for the audio data. this has been working so far, but it peggs the CPU too much. Between two polls, I put the thread to sleep to avoid 100% CPU usage.

However, this is not really a clean solution, since the time of the sleep is not guaranteed and you must subtract a security time in order not to loose audio snippets. This is not CPU optimal. I need as many free CPU cycles as possible for a parallel running thread.

Now I implemented the recording using the "OnRecordPositionUpdateListener". This looks very promising and the right way to do it according the SDK Docs. Everything seems to work (opening the audio device, read()ing the data etc.) but the Listner is never called.

I am working with a real Device, not under the Emulator. The Recording using a Busy Loop basically works (however not satifiying). Only the Callback Listener is never called.

Here is a snippet from my Sourcecode:

CODE:...............................

View 3 Replies View Related

Android : Service Killed Unexpectedly - Phone Doesn't Lock The Notifications Are Generated

Nov 10, 2010

I have an Android service that's responsible for firing notifications at certain points in time. I use an android.OS.CountdownTimer for this. An activity creates and starts the service. If the phone is locked, notifications that are within let's say 1min are shown. Notifications that are much later are never shown. The service is unbound from the activity when the activity is onpause.

As long as the phone doesn't lock the notifications are generated, even if the activity is stopped and unbound from the service.

It seems to me that the service is stopped/killed. When I make the application debuggable and debug it on target, it works fine, also when the activity is stopped and the service is unbound.

The app is developed for v1.5 and runs at Galaxy S with 2.2.

Service is started as shown below

CODE:.................

View 1 Replies View Related

Android :: Getting Your Phone Called A Droid

Jun 2, 2010

I read around and I saw that people do not like it when "uneducated" people call their android powered device a droid.

View 14 Replies View Related

Android :: Android 1.5 - Asynctask DoInBackground Not Called / Method Called

Oct 26, 2010

I am running into an issue with the way my asynctasks are executed. Here's the problem code:

firstTask = new background().new FirstTask(context);
if(firstTask.execute().get().toString().equals("1"))
secondTask = new background().new SecondTask(context);

What I'm doing here is creating a new asynctask object, assigning it to firstTask and then executing it. I then want to fire off a separate asynctask when the first one is done and making sure it returns a success value (1 in this case). This works perfectly on Android 2.0 and up. However, I am testing with Android 1.5 and problems start popping up. The code above will run the first asynctask but doInBackground() is never called despite onPreExecute() being called. If I am to execute the first task without the get() method, doInBackground() is called and everything works as expected. Except now I do not have a way to determine if the first task completed successfully so that I can tell the second task to execute. Is it safe to assume that this is a bug with asynctask on Android 1.5? Especially since the API says that the get method has been implemented since API 3. Is there any way to fix this? Or another way to determine that the first task has finished?

View 2 Replies View Related

Android :: Which Method Is Called When Press Back Key On Phone?

Nov 24, 2010

i have an app that haves a lot of activitys, all created with ONACTIVITYRESULT.which method is called when i press back key? i need to know it because i have to override/implement code on it

View 2 Replies View Related

Android :: Creating A New Class Using Eclipse New Java Class Dialog Box

Jul 7, 2010

I'm creating a new class, using eclipse "New Java Class" dialog box. I can write the superclass I want (I can't find using "browse" button), but I can't write or select an interface to implement. I click "add" but ther is nothing to select. What I'm doing wrong?

View 4 Replies View Related

Android :: Communicating Between Receiver Class And An Activity Class

Jul 14, 2010

I'm just getting into Android development, and I have a question about communicating between a receiver class and an activity class. I'm very new to JAVA and Android so I hope I don't sound too stupid. I'm developing an application where I intercept an SMS message and then based on various elements of that SMS I might delete it once it's been saved to the inbox. I have a receiver class that intercepts the txt message, and I am also able to delete messages from my inbox with code in the activity class using a button at the moment. The problem I have is communicating between the receiver class and the activity class where the code to delete a message resides. I tried putting that code directly into the receiver class but as I'm sure most of you already know the BroadcastReceiver class doesn't seem to support what I need to delete messages. I've been searching for an answer to this for a while, but haven't been able to find anything. Honestly I'm not sure I know enough about JAVA and Android to even recognize a solution if I saw it.

View 2 Replies View Related

Android :: Accessing Class Level Stuff From Inner Class

Jun 27, 2010

What I want to do, is be able to access the object neoApi inside the Neoseeker class, from its inner class RunningTimer. Now, in my code, you can see what I would think to work, but when I run my application, nothing pops up. Nothing inside my TextView, no Toast, nothing at all. How can I remedy this?

package com.neoseeker.android.app;
import java.util.Timer;
import java.util.TimerTask;
import org.json.JSONObject;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;.......................

View 1 Replies View Related

Android :: Access Application Class From Class Other Then Activity

Sep 8, 2010

I'm new to Java and android development. In my application I need data which is accessible for a few activities. I've read that a good solution is to use Application class for this. So I use it like this:

public class MyApplication extends Application {
private String str;
public String getStr(){
return str;
}
public void setStr(String s){
str = s;
}
}

and I can access this variable from activity like this:........................................

View 2 Replies View Related

Android :: Call Activity Class From Other Java Class?

Oct 8, 2010

I have just started android. I just want to know that how can i call activity class from other java class. i just want to pass class object to activity class.

public class GsonParser extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MagazineThread thread=new MagazineThread();
thread.start();
}
public GsonParser(JsonMagazineParser Obj)
{

}
}

and i am just doing like from other class. GsonParser obj=new GsonParser(this);passing obj to activity class.how can i achieve that.

View 1 Replies View Related

Android :: R.java Is Not Being Generated

Jul 23, 2009

I've been working on a project for several weeks now, and just tonight I started having a problem. The R.java file is no longer being generated. I've attempted to clean the project (the first time I do this it removes the R.java file but doesn't regenerate it) and have tried uninstalling and reinstalling the SDK. I've also tried resetting adb to no avail.

This problem does not occur in my other Android projects. They clean just fine and regenerate the R.java file like nothing is wrong. This particular project is the only one suffering from this problem.

View 6 Replies View Related

Android :: How To Run Class In Background Among Package Of Class?

Apr 23, 2010

In my app in one package there are some classes. from those classes i want to run one class that is the Gps functionality class. i want to run that class in background. how i do it, i don't know. i am not able to make it solve from any document. if anybody knows the way to solve it please me by run a "hello world" app in the background. i am not able to solve this problem by going through document.

View 2 Replies View Related

Android :: In Java, What Does A Reference To Class.class Do?

Jul 20, 2010

I'm building a small Android application, but this is more of a Java question than an android question. Looking through the tutorials there are lines that look like: startService(new Intent(this, MyService.class));

What exactly does the "MyService.class" field represent? Is that just a reference to the class for a template?

View 4 Replies View Related

Android :: Dialog Class With It's View Class?

May 19, 2009

I made a Dialog Class with it's view classI want to pop up the dialog when I got some packets from network. so I made a Thread which parses packets and then I made if clause in Run() method There is no problem with parsing packet but when I enter "if clause" and call showDialog() I got Error message

Is there anyone who knows how to pop up a dialog from different thread?

View 2 Replies View Related

HTC Desire :: Phone Not Showing Recently Called Numbers?

Jul 13, 2010

why my phone is not showing recently called numbers? Also the call history is totally blank. The contacts show but take an age to load?

View 1 Replies View Related

HTC Droid Eris :: Phone Won't Recognize Some Contacts When Called

Jul 20, 2010

All of a sudden my phone doesn't recognize some of my contacts when I receive a call. Is it possible that I changed a setting of some sort?

View 5 Replies View Related

HTC EVO 4G :: Well Radio Shack Called Replacement Phone Arrived

Jul 9, 2010

Replacement for the OTA upgrade bricking. Will see what I get I sure hope its a good one.

View 5 Replies View Related

Android :: .aidl And R.java STILL Not Being Generated

Aug 12, 2010

I downgraded to Eclipse 3.5, and the following still doesn't happen when I build a project in Eclipse:

1. .aidl files don't get processed (at all).

2. R.java isn't generated.

Used to work. What the heck?

View 3 Replies View Related

Motorola Droid :: Frequently Called Displays Phone Numbers

Apr 19, 2010

In your contacts, under favorites is the Frequently Called list. Mine is displaying numbers I have never called. Anyone else?

View 21 Replies View Related

Android :: Generated Build File Fails?

Apr 15, 2010

Building our Android app from Ant fails with this error:

[apply]
[apply] UNEXPECTED TOP-LEVEL ERROR:
[apply] java.lang.OutOfMemoryError: Java heap space
[apply] at java.util.HashMap.<init>(HashMap.java:209)
[apply] at java.util.HashSet.<init>(HashSet.java:86)
[apply] at com.android.dx.ssa.Dominators.compress(Dominators.java:96)
[apply] at com.android.dx.ssa.Dominators.eval(Dominators.java:132)
[apply] at com.android.dx.ssa.Dominators.run(Dominators.java:213)
[apply] at com.android.dx.ssa.DomFront.run(DomFront.java:84)
[apply] at com.android.dx.ssa.SsaConverter.placePhiFunctions(SsaConverter.java:265)
[apply] at com.android.dx.ssa.SsaConverter.convertToSsaMethod(SsaConverter.java:51)
[apply] at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:100)
[apply] at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:74)
[apply] at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:269)
[apply] at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131)
[apply] at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
[apply] at com.android.dx.command.dexer.Main.processClass(Main.java:297)
[apply] at com.android.dx.command.dexer.Main.processFileBytes(Main.java:276)
[apply] at com.android.dx.command.dexer.Main.access$100(Main.java:56)
[apply] at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
[apply] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
[apply] at com.android.dx.command.dexer.Main.processOne(Main.java:245)
[apply] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
[apply] at com.android.dx.command.dexer.Main.run(Main.java:139)
[apply] at com.android.dx.command.dexer.Main.main(Main.java:120)
[apply] at com.android.dx.command.Main.main(Main.java:87)

BUILD FAILED

Ive tried giving Ant more memory by setting ANT_OPTS="-Xms256m -Xmx512m". (This build machine has 1Gb RAM). Do I just need more memory or is there anything else I can try?

View 4 Replies View Related

Android :: No Generated R Java File In Project

Nov 3, 2010

I am doing the Notepad tutorial, exercise 2. I started by creating a new Android project and chose Create from source to import the downloaded source files for the excercise. But now I get many errors in Eclipse, and the problem is that there is no generated R.java class. How can I solve this? The folder gen / is empty. I have errors on Notepadv2.java and in res/layout/note_edit.xml and both seems to be related to the fact that the generated R.java is missing. Here is my import statements in Notepadv2.java:

import android.R;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;

They are created by the Eclipse command Ctrl+Shift+O.

View 9 Replies View Related

Android :: Building / Using Runtime Generated Layout XML

Dec 21, 2009

I am currently working on a project which requires me to use an XML document to render a form on an Android device. The form must be fetched and displayed at run-time. I am wondering if there is a way to tag the form XML, transform it using XSLT into an Android layout XML, and then have the device render it.

View 3 Replies View Related

Android :: No Back Keycode Event Generated While IME Shown?

Feb 8, 2010

If the BACK button is pressed when the soft keyboard is being displayed, no Back keycode event is generated (when it's not shown, and Back is pressed, then my View's onKeyDown()/onKeyUp() methods get called back).

Is this expected behaviour? I'm trying to catch when the IME is hidden upon BACK being pressed. I'm currently working around this in the endBatchEdit() method (I'm implementing BaseInputConnection).

View 9 Replies View Related

Android :: Attach Temporary - Generated Image To Email?

Aug 25, 2010

I have a programmatically generated image that I want to send as an attachment via the ACTION_SEND and EXTRA_STREAM method. But how do i do this? My first attempt (writing to my context.getCacheDir() based file path) appeared to work in the Gmail preview (no image preview, but attached file name and icon was visible), but the attachment never arrived on the recipient side. I guess this has something to do with permissions on the generated file, but how to avoid this? Do I need to set more permissive settings on these generated files (so that the Gmail activity can access)? Is that even possible for the app's cache folder?

Is there another file location that would be more suitable to write my files to? I considered the downloads folder, but think it would be an awkward location for something that only needs to exist until it has been emailed. I have even tried encoding my image purely in a data:image/png;base64,ABCD... style URI. This, too, showed up in Gmail preview (attachment icon, but no file name), but did not result in a recipient-side attachment. Has anyone been able to attach a one-shot generated image to an email intent by any means? What options may I have overlooked?

View 1 Replies View Related

Android :: GenerateId - Method For Dynamically Generated Views

Aug 30, 2010

Is there (or should there be), a generateId() method for dynamically generated Views? Take the RadioGroup example in APIDemos|App|Views. Radio buttons are added dynamically. For each button, you have to call setId(). To be notified when a radio button is selected, you register a onCheckedChange listener on RadioGroup and the callback method is oncheckedChange(RadioGroup, int checkedId). Since we are notified only the id of the checked view, shouldn't there be a way to uniquely generate the id? Say, a View.generateId() method... In the example, the ids are statically defined in ids.xml. However this limits the number of radio buttons. I have a real world example too: a Radiogroup with each choice representing a Wifi hotspot. So one cannot know in advance the number of hotspots.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved