Questions tagged [android]

167424 questions
0

votes
2

answer
72

Views

Google App Engine - Datastore - Get an entity, not by it's key

I'm building an Android app, and I'm using Google App Engine to store user's data. I want users to be able to connect from other devices to their account, but I could not figure how. The users table (kind) has 4 properties: id, email, nickname and level: I have read this: https://cloud.google.com/a...
Tal Barda
3

votes
2

answer
1.9k

Views

Android Layout Gravity

I am trying to create a layout where when in Portrait mode the layout_gravity should be center_vertical and when i am in Landscape mode it should be top. When i have center_vertical in landscape mode the layout is positioned to the center and i can scroll up.. Portrait Landscape How can i do this i...
Harsha M V
4

votes
1

answer
938

Views

Eclipse/Android - Debug Configuration - Device?

I have set up a 'Debug Configuration' to debug my Android project. However to get it to debug on a device (HTC Desire) I have to set the Configuration's 'Target' to 'Manual', there seems to be no way to set in the Debug Configuration that it should go to a selected Device. It does work, but each deb...
3

votes
1

answer
68

Views

Setting the Permission from one particular App to the another in Android

I have been working on an Application where I need to get the Permission set that is being set by the another individual application without getting rooted. Is there any clue out for this?
Jack Patoliya
11

votes
2

answer
1.3k

Views

Scala+Android: Is anybody successfully building and debugging in Eclipse?

So far, the only way I've been able to debug within Eclipse is to use Treeshaker with Scala IDE's buggy 2.8 branch. If I try to build with Scala IDE without Treeshaker, I get ClassNotFound errors per this long thread on scala-on-android. Ideally I would build with sbt-android and debug within Eclip...
Jeff Axelrod
5

votes
2

answer
4.8k

Views

Android: Sherlock action bar drop down

I'm trying to implement a drop down list as navigation for the action bar in Android. I can see the drop down list and the items, but I can't get the clicking event. I'm not sure what I'm missing since I was following the tutorial in http://developer.android.com/guide/topics/ui/actionbar.html This i...
noloman
11

votes
2

answer
9.8k

Views

How to install android market on emulator for all api's

How can I install android market and other apk's on the android emulator. I tried some solutions, but they don't seem to work, or are unclear.
user804736
5

votes
1

answer
2.1k

Views

Making a semitransparent Theme.Wallpaper

I am trying to set up a child them of Theme.Wallpaper.NoTitleBar, but I want it to only be semitransparent. My current style is written as such: #F0000000 The ultimate goal is to still be able to see the wallpaper in the background, but darken it so that text is more easily readable. Am I at least o...
Andrew Guenther
5

votes
1

answer
1.1k

Views

How can I speed up builds for an Android project in Intellij?

I have an Android project. In eclipse, if I change one line and rerun the app on my phone, the turnaround time is super fast. On Intellij, it does a full recompile of my project and takes over half a minute. Can this be sped up in any way? Is this a bug or might I have misconfigured something?
lowellk
4

votes
1

answer
2k

Views

How to implement a sliding up a view (like news feed in facebook app)

I am not sure how to do this? I want a static view at the bottom of another layout that the user can slide up to show another view. I'm not sure what this feature is called but I know the Facebook app does this and so does ESPN and Google plus. Thanks!
thunderousNinja
1

votes
4

answer
155

Views

R Errors In Eclipse [duplicate]

This question already has an answer here: R cannot be resolved - Android error 106 answers package de.vogella.android.sqlite.first; import java.util.List; import java.util.Random; import android.R; import android.app.ListActivity; import android.os.Bundle; import android.view.View; import android.w...
Icy
3

votes
2

answer
232

Views

Android and making `this` a listener for one of its buttons

I have a custom view MyView inflated from my_view.xml (with a corresponding Java class MyView.java). I override MyView(Context context, AttributeSet attrs) to connect subviews up to members of the class. Now one of these subviews is a Button, and I'd like for my view to listen for a click on its but...
SK9
3

votes
3

answer
1.9k

Views

Best way to go about making application background fit different devices

So I am looking to spice up my application a bit with some nice background images and such. What I am curious about though is how do I make sure that different androids render correctly? I will have backgrounds behind text and I need to make sure they are the same size and location for each differ...
Rob
3

votes
2

answer
2.3k

Views

Kill the Thread in android

I'm using 3rd party library for doing some work in my application. Unfortunately, some bugs were found in it and they cause very sad result: my app is hanging as worker thread probably infinite looping. I've read some questions about killing the thread in android VM but they are didn't help me becau...
se.solovyev
5

votes
1

answer
81

Views

What are all of the images sizes that you need for images on Android to make things look really good?

There are over 60 devices for Android. What are all of the images sizes that you need for images on Android to make things look really good? From tablets to the smaller phones. I know with Apple hardware this is very easy to figure out, but I am wondering about Android image sizes.
Daniel Kivatinos
8

votes
3

answer
7.3k

Views

My app crashes when using addView()

Im a noob at android. My app keeps crashing whenever I use ViewGroup addView() method but works when I use the Activity addContentView() method. The reason I want to use addView() instead of addContentView() is that I want to be able to remove the layouts when not needed which is not possible with a...
kredj
7

votes
1

answer
11.2k

Views

Error building Android project with Maven

I am trying to build my Android project with Maven so I could automate my tests, but I'm getting the following error: D:\Projects\mtproject>mvn install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building AppScience 1....
noloman
3

votes
1

answer
86

Views

Android - BarChart, Bargraph

I want to implement a feedback/rating chart in my android app.(it is like when you open the google play and check an app's feedback there is a colourful graph from users who had voted it) Can anyone help me how to start that? I appreciate any help you can provide.
Peter
5

votes
2

answer
1.1k

Views

Refunding test purchases when testing Google in-App

I'm having trouble refunding. When i log-in to the publisher console, it shows my purchase and a 'Cancel Entire order' button. The 'refund some money' button is greyed out. Payment was done using a test-account. The app is not yet published. How do i go about getting my money back, and will google s...
AkasH
11

votes
5

answer
6.6k

Views

Processing PDFs to reduce file size / and or complexity

I have PDF files I need to prepare for viewing on mobile devices. The worse case would be ~50 pages, with lots full color images and vector art, file size approx. 40MB. This is acceptable for PC viewing on broadband, but not great for mobile viewing due to long download times and very laggy scrollin...
Tyler Eaves
6

votes
1

answer
1.8k

Views

Best way for Service that starts Activity to communicate with it

I have a service that listens to a socket. When receiving certain input it is to create an activity. When receiving other input, it is to kill this activity. I have struggled for a while to make the service communicate with the activity through AIDL (http://developer.android.com/guide/developing/too...
pgsandstrom
3

votes
2

answer
472

Views

In App Purchase frequency of In App Notify

In my application, I am selling images. My program flow is as follows: 1. Buy Button : performs the purchase 2. On getting the signed data and signature, I sent it to my server to get it verified 3. If verified, my server responds with the URLS of the images that are sold 4. I store them in a databa...
arjoan
3

votes
1

answer
1.4k

Views

Best 2d Game Engine for Android[physics] [closed]

Which is the best 2D game engine For android game development? I heard the popular game engines are andEngine and libgdx. Which one is better? Can I use this engine for physics simulation?
Jackson Chengalai
3

votes
1

answer
188

Views

Getting hostname mismatch after enabling deprecated cipher suite in Android 7 org.apache.http (Apache HttpClient 4.0)

I managed to enable the correct cipher suite, but in the process I broke the hostname comparison. Here is the code before I started: HttpParams params = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(params, 10000); HttpConnectionParams.setSoTimeout(params, 20000); DefaultHttpClien...
George Bailey
6

votes
5

answer
759

Views

Android dev time vs iPhone dev time

IF someone has to develop the same application for Android and iPhone, is it more difficult to develop in one platform than on the other? Does it take more time? Lets think about the average app. Lists, text , buttons, fetch information from the internet. Person has same experience on both platforms...
5

votes
2

answer
1.2k

Views

How to get a Gesture View like in official Facebook app

I want to implement the same behaviour of the notification view in the official Facebook app. The 'notifications' tab are at the bottom and can drag/drop via fingers to full screen. How can i do that? I've tried it via ViewFlipper and Animation.... But no success. Does anyone know how we can do this...
chrisonline
3

votes
1

answer
122

Views

How to link download of one application with another

I want to use some applications from openintents (http://www.openintents.org/en/) but is there is way to have where installing one application will also install, or at least download, other applications? For example, if the program is going to be relying on the OpenIntents File Manager (http://www.o...
James Black
2

votes
1

answer
80

Views

How to declare dependencies

I'm studying Dagger 2 so I would like to understand some basic things. I have the following code: @Module public class MainModule { @Provides public Presenter provideMainActivityPresenter(Model model){ return new MainPresenter(model); } @Provides public Model provideMainModel(){ return new MainModel...
ste9206
3

votes
2

answer
6k

Views

Facebook Album and Photos unaccessible with all needed permission (GRAPH API)

In my android application I download album list of specified friend of user. I've got permission as follows:friends_about_me, friends_photo_video_tags, friends_photos, user_photos. For some friends it works perfectly and I am able to download full list and all photos. But for some it returns empty...
Jakub Szczygieł
4

votes
1

answer
1.4k

Views

JSoup 1.6.0 on Android throws Exception: String.isEmpty() NoSuchMethodExists

I'm trying to use JSoup 1.6.0 with my Android application and it throws a NoSuchMethodExists exception. This other question tells me that isEmpty() was not added to Java JRE until 1.6 -- I've checked my JRE in eclipse, and it is 1.6, however when I try to run my app on my emulator it throws the abov...
Brian D
3

votes
1

answer
756

Views

how to change listview's row properties without layout?

Good time! My Android app has so feature that I use ListView in the one of the page of TabHost without layout for ListView. Like that: ListView lv = new ListView(this); lv.setAdapter(myAdapter); So I'd like to change some row's properties like text size in the row. So, how can I get access to the pr...
Eugene Shmorgun
2

votes
2

answer
51

Views

Test void method using mokito

How do I test below method using mockito public void showArg(String ss) { if(ss == null) { throw new NullPointerException(); }else if(ss.equals('')) { throw new IllegalArgumentException(); } // Log.d('',''+ss); if(ss.equals('xyz')) { this.show(); }else { getResult(0); } } In this example, there is n...
Tushar
0

votes
1

answer
650

Views

MediaPlayer keeps playing although i closed the app

i've got this Activity and as soon as i hit the home button during the playback of the sounds the sounds keep playing and when the sound is finished it brings back the app. public class View5 extends MasterView implements OnCompletionListener { int[] tracks = new int[4]; int[] times = new int[4]; in...
Kazoooka
5

votes
3

answer
1.9k

Views

Getting started programming in dynamic languages in Android ((J)Ruby, Clojure…)

I've been looking around, and I can't seem to find any definitive answer or headway that seems 'up to date'. I've seen some interesting projects like Mirah (formerly Duby), and am looking into it a bit. I've seen JRuby unsuccessfully used to compile ruby into .dex. I've also been looking, indepen...
Justin L.
3

votes
1

answer
1.2k

Views

How to execute two observables sequentially?

How to execute two observables sequentially and overwrite one result by another in rxjava chain? For example i have got data1 = observableFromDb and data2 = observableFromServer; I would like to combine them in chain and overwrite data1 by data2 result.
lman
3

votes
1

answer
130

Views

Holo Calendar crashes when using Calendar.SATURDAY as last day of week

I am using Holo Calendar library. It is a large amount of code, and so I cannot include it in this thread. Hopefully someone will see this who has used it, but the library is free and there is a link at the bottom of the page to a completed project that you can open. You can set the start and end da...
Birrel
3

votes
1

answer
27

Views

Why does my Header mix up the onClicklistener

When I add a header to my listview it messes up my onclick,it selects the wrong item every time. package ie.example.artur.projectrepeat; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import androi...
ebatinstitute
3

votes
1

answer
309

Views

Use ADT's “build performance improvements” for ant

Here's an exerpt from the ADT's latest changelog: Build performance improvements. The big changes in Ant, besides supporting the new type of library projects, and the build improvements mentioned above (aapt and png crunch cache) is that the new Ant build finally properly supports dependency check b...
MasterScrat
2

votes
1

answer
313

Views

isGooglePlayServicesAvailable and LocationClient

Is there anyway to find if the Location Service is disabled on the phone (System -> Settings -> Location), using GooglePlayServices or LocationClient?
Blackbelt
3

votes
2

answer
1.1k

Views

ListView item backgrounds not changing

I have an unusual issue with my ListView. I currently have a 'deselectAll()' method which iterates through the items in my ListView and sets them to unchecked (the items implement the Checkable interface). The 'checked' variable gets changed correctly (the view reports as not being checked), but t...
John Leehey