Tagged Questions
0
votes
1answer
5 views
How to structure SQLite access in Android App? ORM(Lite) or not?
Together with a colleague I am building an Android app which will include a DB with about 15 tables. Following the Android dev docs from Google we've now written a couple type-classes, a DB-helper, a ...
0
votes
0answers
8 views
Java process exec won't work on adb push
When using
Process p=Runtime.getRuntime().exec(PATH+"adb push /home/user/test.txt /storage/sdcard0/Documents");
p.waitFor();
nothing is pushed on phone, no errors were raised. Command ...
0
votes
1answer
22 views
Data in a HashMap after closing an android application
I use a HashMap in order to store some keys and it's values like the following.
Map<String, String> map = new HashMap<String, String>();
map.put(key, value);
How can it be possible to ...
0
votes
1answer
12 views
how to getPackageManager in fragment Android
I have this app that i am clearing cache with but i can't figure out how to get getPackageManager to work in the fragment
here is my code.
Any help woulbe very appreciated. I am very new to android ...
0
votes
0answers
12 views
Using XPath causing problems
So I'm learning how to use XPath and HtmlCleaner to parse HTML but I have a problem. This is the code:
public class ScheudeleWithDesign extends Activity {
static final String urlToParse = ...
0
votes
0answers
26 views
Is it possible to compile a class in memory for Android applications?
I know there are tools that allow you to compile a Java class at runtime on the fly (in memory) from a String representation. Afterwards, such class can be instantiated in the application. For ...
-1
votes
1answer
43 views
Android App crashes after Scrolling down ListView
I have a listView, everything's working fine whan I don't have too much items on it.. When the list of items is long when I scroll down it crashes at a certain point...
This is my adapter code :
...
2
votes
1answer
18 views
Android Multiple Swipe Views
Recently I've been trying to create an advanced look and feel for my apps by implementing multiple swipe views to it.
Let me explain what I mean by "multiple swipe view":
And please excuse my poor ...
0
votes
2answers
14 views
NumberPicker doesn't work with keyboard
In activity_main.xml :
<NumberPicker
android:id="@+id/numberPicker1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
...
0
votes
1answer
23 views
Error opening activity after menu option click
These are the errors I get.
09-23 04:24:04.712: E/AndroidRuntime(332): FATAL EXCEPTION: main
09-23 04:24:04.712: E/AndroidRuntime(332): java.lang.RuntimeException: Unable to resume activity ...
0
votes
0answers
11 views
Animation after different delay
here is my simple code snippet
I want to change image after different delay, because I am playing mp3 simultaneously.
so i want my images shows according to songs words.
Handler handler = new ...
-1
votes
1answer
27 views
How to display strange characters in Android
Could someone shed me light on why strange characters does not appear in Android listView?
I have a text file with this
And I got this
Here is my code
ArrayList<String> list = new ...
0
votes
1answer
13 views
android list view adapter call getview method manually (to refresh list rows)
Is it posibble to call the getview method in the list view adapter to refresh the rows?
Or is there another method to refresh the item rows manually?
Thanks in advance
-Lukas
0
votes
1answer
8 views
Partial Lock for BroadcastReceiver?
I have an Activity , that initiates an IntentService to get some work done . When the work is done , the IntentService broadcast's and announces success.
The broadcast receiver is inside the same ...
0
votes
0answers
15 views
Running Lucene 4.4 on Android
I want to use Lucene as a search engine in my app. However, I keep getting this exception:
ERROR/AndroidRuntime(733): FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at ...
0
votes
0answers
6 views
Google contact api for android
I need to implement google contact api for my android app. But I did not found any reference for android so far. I have found one for java: https://developers.google.com/google-apps/contacts/v3/
but ...
-1
votes
0answers
7 views
Sending Get Request from Android app to Rails server not working
I am trying to send an asynchronous get request from an android application to my local rails server on a certain event.
Here I'm instantiating a background process to send the request:
private ...
0
votes
1answer
21 views
How do I print the content of httprequest request?
I've got a bug involving httprequest, which happens sometimes, so I'd like to log HttpGet and HttpPost request's content when that happens.
So, let's say, I create HttpGet like this:
HttpGet g = new ...
0
votes
3answers
48 views
What's wrong with my OnClickListener?
I have this jokes app on Google Play (Punny Jokes) and to get a joke, the user must tap anywhere on the screen, then on the joke screen, they get to read the joke. But when they want another joke, ...
0
votes
0answers
20 views
How to start an activity or dialog, out of my application which don't stop current activity
I searched too much about opening a dialog from a service or broadcast receiver, and there is no answer, but i see opening a dialog via broadcast receiver in this app:
this app is an audio manager ...
0
votes
1answer
19 views
Using a non_Android project's source code as a library
I've carefully followed the very clear advice given on this subject by Gunar at: Add a non-Android library project to an Android app in Eclipse but I still get class-not-defined errors.
I'm using an ...
0
votes
0answers
23 views
Russian Language in Android Emulator
I would like to test my application using Android Emulator. To do this, I need to send SMS in Russian. The problem is that I cannot make emulators input Russian characters.
For example, I set all the ...
0
votes
1answer
11 views
Ksoap2 in android cannot serialize
I use ksoap2 in android
to send list of numbers as string
But it have error:
java.lang.runtimeexception cannot serialize
I search a solution to this error but result not change
Can Help me please
...
0
votes
0answers
13 views
Android OpenGL ES - Draw pixels to screen
I've still not been able to find an answer to this, and it is really bugging me. I'm trying to draw pixels to a screen. Not triangles, not rectangles, pixels. I have a GLSurfaceView inside an ...
0
votes
2answers
22 views
Android: XML Textview text Property
I had seen an Android Tutorial that allows a simple android:text just like the example bellow:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
...
0
votes
0answers
6 views
Android: problems with Encoding of txt files in Assets folder
I'm implementing an small app which reads a text file from the Assets folder and sends SMS messages to another emulator.
To send SMS I use method sendSMS from this question.
The code itself is the ...
0
votes
1answer
18 views
Know when time has passed beyond a certain point, using Joda
I'm developing an Android app which fetches time from a server, what I want to know is when that time has passed.
I'm currently trying this with the Joda java library to no success.
I've tried this:
...
2
votes
1answer
31 views
Update records in database from an object list repeatedly
I have a list with this objects:
public class Foo {
public String title;
public String subject;
}
For example: List<Foo> mFoo = new ArrayList<Foo>();
And I have a table in my ...
0
votes
1answer
17 views
Trying to parse html with HtmlCleaner and XPath
I'm trying to get table data from a certain website (this is the website) and I'm trying it out by trying to get a certain node. Here's my attempt:
public class ScheudeleWithDesign extends Activity {
...
-3
votes
3answers
37 views
The method findViewById(int) is undefined for the type Service
I am trying to get the view of the current screen by implementing this code
View view=(View)findViewById(android.R.id.content);
But findViewById is undefined for Service. So what should i do to get ...
0
votes
0answers
17 views
Managing and saving an arraylist using Shared Preferences issue
Im trying to make a favorites list. I have this class called Animal and another called Favorites. The favorites arraylist is created in the class Favorites. I can access the favorites arraylist from ...
0
votes
1answer
17 views
Unable to start activity ComponentInfo: android.database.sqlite.SQLiteException: no such table , while compiling
Help me plzz..In first app version I wrote wrong DB_PATH in DBHelper and after install apk got exception that database not found.Then (next app version) I wrote right DB_PATH but after install get ...
0
votes
1answer
27 views
Root commands library
Right now I'm doing something like below to execute commands as root. But the whole thing seemed a bit manual so I googled a bit and found roottools. Is that the recommended way to go or is there ...
-2
votes
0answers
15 views
Android Eclipse Deck of cards
Hello Im a beginner in creating a game for android. i want to create a trading card game like yu-gi-oh. my problem is i dont know how to creatr a deck of cards can you give me some tutorials on how to ...
0
votes
0answers
14 views
Clean html with HtmlCleaner
I have a html file stored on the phone and I want to clean it with HtmlCleaner and see the output result. Here's my code:
public void cleanHtml() throws IOException{
HtmlCleaner cleaner = new ...
1
vote
1answer
23 views
How to Detect if Launcher Home Screen Supports Rotation
I need to check if the device launcher home screen support orientation, is that possible? if so please help me out.
for instance, Samsung Galaxy Note 2 does not support launcher orientation while ...
1
vote
2answers
34 views
Mockito - Overriding a method that takes primitive parameters
I have a class which is subclass of Context. I'm unit-testing another class which have dependency to this class, and therefore I've mocked it. However, I need some methods to act as their original ...
0
votes
0answers
10 views
how to get the area code of device without using location
How would i go about getting the area code of a device?
I have an import script where im grabbing all phone numbers in there contacts list, so i can compare it to a list in my database and act ...
2
votes
1answer
14 views
Changing the location of indicator in ExpandableListView causing problems
I'm trying to set my indicator to be next to the textview, but I just can't get the right code to do it.
XML:
<TextView
android:id="@+id/lblListHeader"
android:layout_width="fill_parent"
...
0
votes
0answers
5 views
Cannot add ActionBar to stuff to build.gradle file
I am trying to add an ActionBar to my Android app and following the instructions exactly but am having an issue. It tells me to add
compile "com.android.support:appcompat-v7:18.0.+" to the ...
0
votes
3answers
22 views
Where to place app icons in Android project
This is a stupid question, so I'm sorry if it's been asked before but I cannot find the answer and I'm not even sure if it matters or not, but:
If I want to add Icons to my Android app, not just the ...
1
vote
2answers
29 views
Error with a progress dialog
What is wrong with the progress dialog?
The java file:
public class Start_Screen extends Menu_Activity {
List<Bitmap> lbmp;
List<String> ltitles;
List<String> ldesc;
...
-1
votes
0answers
18 views
Show icons in overflow Items of android holo theme Action bar
I need to Show icons in overflow Items of android.Holo theme Action bar can someone give me a example or a way to do this ?
-2
votes
0answers
18 views
application that will check the drivers face expression [on hold]
hii i am trying to do this project :
Media, sensors and actuators: Wake up alert for sleepy drivers
This project intend to design a program that can be put on a mobile
device that will check the ...
0
votes
0answers
13 views
Android - Use ViewGroup.OnLayout() but exclude one child
I am creating a finger painting app programmatically for Android and can't find an answer to this problem. I have a palette viewgroup that contains paint views and uses onLayout() to arrange them ...
-3
votes
1answer
54 views
Execute a class on press of a button
I am using the class Kevin Kowalewski wrote in this question: Determine if running on a rooted device. I have a Button; how do I execute that class to the pressure on the button? And if the outcome of ...
1
vote
1answer
13 views
ListView null in Framgment/PageAdapter
I'm creating a basic android app, and used the default created to create the first activity. This Activity has the PageAdapter. I want to have different layouts in each of the pages, and would like a ...
2
votes
3answers
18 views
Override Dialog dismiss() with new AlphaAnimation
So right now by default the Dialog is doing this zoomin fade out effect when it gets dismissed with dialog.dismiss();
how can i override it to be my own Animation?
AlphaAnimation fadeOut = new ...
0
votes
2answers
22 views
Put in bold some parts of a TextView?
I have a TextView inside which, I wrote of the questions and answers. If I now want to put in bold only the questions as I do? There maybe some code that gives you the ability to put in bold text ...
0
votes
1answer
21 views
Shows No Sign Of input on my android calculator app
Hi i'm working on my launcher and on FragmaneTab2 I have a calculator that I want users to be able to use, well it shows up just fine but when I click on any of the buttons it does nothing It DOES NOT ...