0
votes
1answer
12 views
Pass javascript object to java's JsonObject
I am trying to pass some simple javascript object from my Parse.com cloud function (back-end)to my android application.
Here is the code of the javascript class:
function Rate()
{
this.avgRate = ...
0
votes
2answers
28 views
How can I stop my activity from being destroyed when I rotate the emulator?
I currently have two activities: MainActivity and DisplayActivity. When I run my application and rotate the emulator, the activities get destroyed.
How do I make sure that my activity doesn't get ...
0
votes
0answers
17 views
How do I pass two results from separate AsyncTask inner classes to the same method in the main activity?
I hope I explained this issue correctly in the title. I have some inner classes that extend AsyncTask to read some JSON data and parse it. I have two separate ones for each search query the user ...
0
votes
0answers
12 views
How do I use a global reference across JNI calls
I have to use assetmanager in Android to open some files. I am using the Assetmanager to open a lua file. To that end, I create a luastate in an init function in JNI using AAssetmanager. I then use ...
0
votes
3answers
37 views
Type Conversion: Byte[] to String , String to Byte[]
I'm trying for educational purposes, use the camera of Android to get a photo and send this to a webservice using SOAP.
First, the camera send me a byte[] but this isn't serializable and I can't send ...
0
votes
2answers
57 views
Parsing a string to calculate numbers
I have a string like: 2+4*4/2, the string can be longer or shorter, but in both cases I need to parse it and calculate the division and multiplication first before the addition and subtracting.
What ...
0
votes
2answers
21 views
main activity does not wait for sub activity to finish
I'm quite new to Java and Android, so be gentle :)
I trying to start ActivityForResult to enable bluetooth, but seems that main activity keeps running and executes getPaireddevices without wiaitng for ...
0
votes
1answer
10 views
DialogFragment created by an event from a button in a custom ArrayAdapter always has same position
I'm a newb so try to be patient with me
Here is some background information about the problem I am having:
I have a fragment, ViewFragment, that consists of two components: a Spinner and a ListView. ...
0
votes
0answers
16 views
ListView system overlay using viewgroup
I'd like to create a ListView overlay using ViewGroup. I've made overlays before but I can't get ListView to work with it. So far this is the logcat Error I get:
D/AndroidRuntime( 696): Shutting ...
-1
votes
3answers
37 views
how to parse JSONArray in android
I want to read this JSON lines but because it start with JSONArray im a little confused
"abridged_cast": [
{
"name": "Jeff Bridges",
"id": "162655890",
...
0
votes
0answers
23 views
Getting NullPointerException on context.getPackageManager() - not sure why
i am trying to get a list of social media clients on a phone in my Android code. i cant see why, but i am getting a nullpounterexception at the init'ing of List
Do i need permissions in manifest to ...
1
vote
1answer
26 views
Android sql database
I try to connect from eclipse emulator android to an sql server using this code:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
...
0
votes
1answer
46 views
How do I save a string in android and recall it afterwards?
Beginner question, but I have been looking around about SQLite and internal date storage but basically I didn't understand anything in the past half hour.
I want particular strings to be saved,
...
0
votes
1answer
27 views
Android sql database connection
I try to connect from eclipse emulator android to an sql server using this code:
String driver = "net.sourceforge.jtds.jdbc.Driver";
Class.forName(driver).newInstance();
String connString = ...
0
votes
1answer
21 views
Returning JSON from WCF after POST in Android
I just started coding for my android application and I am unsure of how I should start coding.
If I want to do lets say a login in my android application. How should i start?
Is it possible if I do ...
0
votes
2answers
33 views
Service App stopped working
I'm trying to create a simple app which just do a simple job: I press "Start Service" button and Toast appears with a TextView changed(same with Stop Service). But when I trying to run app, I get ...
0
votes
1answer
26 views
Android multiple shortcuts
This link: http://www.kind-kristiansen.no/2010/android-adding-desktop-shortcut-support-to-your-app/ teaches me how to create a shortcut to any of my app's activities. However, when you look at your ...
0
votes
3answers
55 views
To check if string contains particular word
So how do you check if a string has a particular word in it?
So this is my code:
a.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
...
0
votes
0answers
24 views
android JSON parsing How to make two http Connection one after the other
Im using Rotten Tomatoes api and for some reason if i want to get more information about a movie like the movie director or the studio I need another http page. this is the url that im getting ...
0
votes
0answers
20 views
How can I code a client-server Java program that uses the client computer's monitors as second or third monitors for the server one?
In short I am interested in a Java code that allows a computer to:
1) think it has a second monitor (virtual monitor without having a device atached)
2) regulairly extract pixel information from ...
0
votes
1answer
39 views
JAVA is required to run android project in eclipse for windows 7 [duplicate]
I am newbie to android so i wonder java installation is required to run android project from eclipse SDK ?
If it is required then i already installed it. Then why i am getting this error:Error while ...
1
vote
1answer
17 views
How to re-enable screen dimming?
I needed to keep screen on while displaying my application so I disabled Dimming using this code :
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
the problem is that when I ...
-1
votes
0answers
16 views
how to rebuild R.java in internet build of android studio
can anyone share a way to make internal build to recreate R.java in the build folder?
only the external build does it for me and it's broken in 0.1.5
0
votes
0answers
14 views
MediaRecorder.getMaxAmplitude returns always 0
I'm new in Java and my English isn't the best too.
I want to write an app which meassures the Amplitude of a record. The app works except for the fact, that the amplitude is always 0. I have now read ...
0
votes
2answers
34 views
fraction of value gets increased each time
// Grams to Pounds and Ounces
public static String convertGramsToPoundsAndOunces(String grams) {
double weightInKG = Double.parseDouble(grams) / 1000;
double pounds = weightInKG / 0.45359237;
...
3
votes
1answer
52 views
Did anyone compare performance of Android apps written in Xamarin C# and Java? [closed]
I came across Xamarin claims that their Mono implementation on Android and their C# compiled apps are faster than Java code. Did anyone perform actual benchmarks on very similar Java and C# code on ...
0
votes
1answer
34 views
Calendar returns wrong milliseconds after Calendar.add()
final Date now = new Date();
Calendar c = Calendar.getInstance();
final Calendar cal = Calendar.getInstance();
cal.setTime(now);
cal.add(Calendar.HOUR_OF_DAY, 3);
SetTime(c.getTimeInMillis());
...
0
votes
1answer
30 views
Save ListView data and get it back on application start
I have a simple application with one activity containing listview in which data is loaded with a custom adapter and some json content fetched in an asynctask, minified code below
Main.class
...
0
votes
1answer
33 views
trying to fetch a textView from another screen in android
I have a home screen a data screen and a database. The user makes a selection on the home screen, the database then performs the actions to display this on the data screen by fetching the textViews on ...
0
votes
3answers
42 views
Android welcome screen waiting too long?
I'm new in Android development, every time when i try to start mine application, i need to wait very long?
I have low PC perfomance, but i see that peoples with much faster PC's has same problems.
...