0
votes
0answers
9 views
setItemChecked in listview comparing to an arraylist
I create a listview from an arraylist; this arraylist contains a number of courses that a studen can take. I created a class User and I add the courses from an string[]. The problem is, I don't get ...
0
votes
1answer
17 views
Reading object from file using ObjectInputStream? ClassNotFoundException
In previous code in my program, I had saved an ArrayList (consisting of objects of a custom class called location as you can see in my code) in a file using ObjectOutputStream and FileOutPutStream. ...
-1
votes
1answer
19 views
Not being able to get data from website
I have run into a problem in my Android application where I could not get specific data from a website. My app just crashes. Here is my code:
private void AddListenerOnButton() {
spinner = ...
0
votes
2answers
25 views
Detect type of JSON attribute
JSON:
{"attribute1":11, "attribute2":"string atribute"}
I want to detect what kind of type are attribute1 and attribute2:
attribute1 is integer
attribute2 is string
...
0
votes
1answer
10 views
Side menu turns white when I scroll dow
I am trying to implement a side menu in my application it works fine for the most part, but the problem I have is that once I display de menu and try to scroll down the whole list turns white ...
0
votes
0answers
10 views
Jsoup gives exception with selecting tab but not with original website url
I'm trying to get a website content to use it in my Android app. I'm trying it with jsoup and it gives me exception where excetion.getMessage() gives null. When I pass the url of the main page of ...
0
votes
1answer
16 views
TextViews in a container
Okay so I have 3 TextViews (top, divider, botom) that form a stacked fraction (like 3/4 but the 4 is below the 3 with a horizontal line dividing them).
The problem is the horizontal line... because ...
0
votes
1answer
9 views
Replace content of a fragment and remove old content - Android aplication
I have two fragments, one with a list of objects and the other objects selected in the first list. When I add an item from the first tab would have to recharge the second tab with new data. Now I'm ...
0
votes
2answers
31 views
Java defining objects on the fly
So I have a somewhat general question regarding something I came across recently. Let's say have I have 2 classes, Activity and Task. In Activity, a new Task object is instantiated, but instead of ...
0
votes
0answers
12 views
FileNotFoundException when trying to upload a recorded video to server from Android app
I'm trying to record a video and then upload it to a server upon its completion. Relevant code is here:
public void recordVideo(View view){
Intent takeVideoIntent = new ...
0
votes
2answers
29 views
Calculate distance travelled -Android
I have this code in my main activity which will show the location data in textviews:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
0
votes
3answers
16 views
android.widget.Button cannot be cast to android.view.View$OnKeyListener
Could someone please explain why I am getting this error?
Java.lang.ClassCastException: android.widget.Button cannot be cast to android.view.View$OnKeyListener
Below is the java code. I am ...
0
votes
1answer
15 views
Connection between two android devices on different networks
we have two android device A and B on different network and different IPs, we donot know the phone number of device A.Device B want to connect with device A i only know the application ID of the ...
-1
votes
0answers
7 views
How do you correctly use the async methods in a Wsdl2Code web service call?
I need comeone to show me the correct way to call a Wsdl2Code async method. I don't have a clue how to do it! I am looking for the correct way to call the method, and then get the response back, ...
1
vote
2answers
23 views
Getting a value from a Spinner selection
I want a spinner to return an value to me once the user has selected an item.
I know I could use a button and then use spinner.getSelectedItemPosition() in the OnClick(), but I want the value to be ...
-1
votes
0answers
12 views
Libraries similar to MP4parser
I am writing a mp4 writer in Java, and I was wondering if anyone knows of any library similar to MP4Parser that can read/write in the MP4 file structure.
Thanks!
0
votes
1answer
13 views
Error when I try to run App with GoogleMapApiv2
I have problem to run simply app with GoogleMapsApiV2.
I did tutorial from this movie: http://www.youtube.com/watch?v=awX5T-EwLPc
and I have error's on 13:00 minutes, when trying to run app (the ...
0
votes
0answers
10 views
How to set the (OAuth token) Authorization Header on an Android OKHTTPClient request
I'm able to set the Auth Header on normal HTTPURLConnection requests like this:
URL url = new URL(source);
HttpURLConnection connection = this.client.open(url);
...
0
votes
0answers
11 views
After press a key, view go down, only in S3
I have a weird problem. I have a view with a editext field, when the user tap over this, the keyboard shows (I'm using android:windowSoftInputMode="adjustPan"), so this is ok. The problem happen when ...
-1
votes
2answers
33 views
Application Crash as Orientation Changes
For Learning Purposes I'am making an application .. When I change my orientation before pressing any button on Screen .. it successfully changes orientation and shows respective layout that I've ...
0
votes
1answer
14 views
Can you push only a specific view up when soft keyboard shows?
When a soft keyboard shows up, I want my EditText to be pushed up so it's at the top of my keyboard, but not anything else. I can get adjustPan working fine but that slides the root view up.
Is there ...
0
votes
0answers
31 views
blackscreen on android (infinite loop)
I'm trying to create a network monitoring app in android, and it's giving me black-screen problems. I understand that the problems is due to my infinite loop, but the log cat stack-trace is not giving ...
1
vote
2answers
26 views
How do you display part of text field in italics in android?
I am developing an Android app which takes some data from text fields entered by the user, and outputs a single string in a new text field based on this data. Simple enough, however I need parts of ...
-1
votes
1answer
32 views
Passing an instance of a class. . (trying to make a side menu global)
Still don't know what is going on. Trying to make my code show the menu globally, but it is not. I tried passing the instance of context from MainActivity by
public void onCreate(Bundle ...
0
votes
1answer
34 views
Cannot get specific content off of website
I am encountering a problem where I cannot put the URL in the stringbuilder. What I am trying to accomplish here is to just get a particular part of the page. Here is the webpage I am trying to get ...
-3
votes
2answers
28 views
How to create a live wallpaper for android
I know there's a lot of information about creating a live wallpaper with renderscript, but I thought I read somewhere that this way of doing things would be deprecated. I don't know if I just ...
0
votes
1answer
13 views
using VideoView twice in one layout
On create, im trying to play two videos at one time. I am currently using two videoviews. Firstly, should i create buttons to start the video views or should I use MediaController? Also, I have haerd ...
0
votes
2answers
28 views
How to implement more than one event for Android/Java
I have an class lets say Downloader in which i want to have multiple events let's say OnCompleted , ReportProgress and OnCancle.
I want to know how I can add these event to my class.
I am new to ...
0
votes
1answer
33 views
Adding listener to ActionBar item, onOptionsItemSelected NullPointerException
*Answered!: * It turns out that you need to have title for an item even if you have an icon for it.
I am currently implementing (Sherlock)Action Bar in my application. I currently have an on screen ...
1
vote
0answers
19 views
Is there a way to relaunch the camera service on Android?
I'm working on a simple camera application that will need to run for a long time, but take a single picture occasionally. The problem is the camera services goes to sleep or dies when the app runs for ...