Friday, August 2, 2013

[General] Ads and "chat invitations" on S4


Ads and "chat invitations" on S4



Hey guys, I have an s4 that is UNrooted - all stock.

I get these green plus signs in the notification bar that are random offers or ads.

I also sometimes get a candy crush thing that opens my internet and play store (and I have never even downloaded candy crush).

Finally, I get these small pop up windows with people that "want to chat."

No real big issues or anything, but its just annoying and am wondering where they come from. I have an antivirus program that scans my phone and it has never found a problem. I've opened porn on my phone but never downloaded anything, or if it accidentally downloaded something I deleted it immediately. Dunno if that has anything to do with it haha.

Anything I can do to fix these things?



Read more

forum.xda-developers.com



[General] Help with LG4 Android phone!


Help with LG4 Android phone!



I've got an old LG4 Android phone I was given. It has no SIM card and is not connected with a service provider (I use a Blacberry as my phone). I had been using it as a 'mini tablet' with the Wi-Fi connection. The other day I turned it on, slid it up to unlock it, and tapped the icon to go to the screen from which I could access my bookmarks. What I got was a screen that reads 'Applications 0 items', below that, 'Downloads 0 items' and a moving 'Loading' icon/wheel or what have you. There it sits for as long as I leave it on. The screen is totally unresponsive to touch. I've tried removing the battery to reboot, but that doesn't work.

How can I get it out of this mode? I'd be happy to go back to default settings and re-enter all my book marks, apps, etc.

Thanks.



Read more

forum.xda-developers.com



[General] 3 easy-to-use freeware recommended


3 easy-to-use freeware recommended




The freeware can convert PDF to multiple file format and support PDF combination and PDF encryption.
What I like most is that it converts the PDF files rather fast.


The program will decrypt the movie DVDs and rip the source DVD to your hard drive.
Two copy mode are provided: Full disc and Main Movie.


It is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various streaming protocols.



Read more

forum.xda-developers.com



[General] application for both viber and what's up messages?


application for both viber and what's up messages?



Hi Everyone,

I need help finding an application? that will allow me to answer what's up messages from viber.... not very tech and tried looking thru the forums but could not find anything. I know that Apple has an application that does this but I am using a Samsung Note 2 and a Samsung Tablet. Please help!

Thank you in advance



Read more

forum.xda-developers.com



[General] Make display settings for new Android OS look like Gingerbread's


Make display settings for new Android OS look like Gingerbread's



When I look at the display on Android devices where the OS is newer than Gingerbread, my eyes start hurting from the strain. For example, I tried updating my Tmobile G2's ROM from Gingerbread to ICS , then to Jellybean and after hours of tinkering with the display settings my eyes were still hurting. When I gave up and went back to Gingerbread, then my eyes were fine looking at the screen.

My question is: what exactly changed in the display settings in the newer version of the Android oS? Also How can I use an OS like Jellybean or ICS, but make the screen display with the brightness that was available via Gingerbread?

Much thanks for the help
P.S. I did try the ADW Gignerbread theme, but that mainly changes the look and feel of the icons, not the display



Read more

forum.xda-developers.com



[android help] Basic application for Android using SIP not working proper


Basic application for Android using SIP not working proper


Basic application for Android using SIP not working proper - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















Has anyone made a small basic application using SIP for android? I have tried using CSipSimple app, with SIP account on antisip.com and sip2sip.com but none of them register properly, and it gives a timeout error. Can anyone help me in this case?


I also tried those accounts with the SipDemo given with Android, and also in Linphone app. Linphone works fine with a SIP account on Linphone itself, but no other SIP accounts works.
















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










default






Read more

stackoverflow.comm



[android help] Android writing in file just last value


Android writing in file just last value


java - Android writing in file just last value - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















So am developing android application for storing sensor values in one file. My main problem is that app is just writing last value in file. Basically am trying to write code which will store every sensor value to file. Am begginer in writing Android apps... Can someone please help? Here is the code:



package com.example.hello;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

import android.app.Activity;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.os.Environment;
import android.view.Menu;
import android.widget.TextView;

public class MainActivity extends Activity {

private TextView xAxis, yAxis, zAxis;
private SensorManager sm;
private Sensor mSensor;
final File file = new File(Environment.getExternalStorageDirectory(),
"results.txt");
static FileOutputStream fos;
static OutputStreamWriter myOutWriter;
private String writeString;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
xAxis = (TextView) findViewById(R.id.xAxis);
yAxis = (TextView) findViewById(R.id.yAxis);
zAxis = (TextView) findViewById(R.id.zAxis);

sm = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mSensor = sm.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);
try {
fos = new FileOutputStream(file);
myOutWriter = new OutputStreamWriter(fos);
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

SensorEventListener sensor = new SensorEventListener() {

@Override
public void onSensorChanged(SensorEvent event) {
xAxis.setText("xAxis: " + event.values[0]);
yAxis.setText("yAxis: " + event.values[1]);
zAxis.setText("zAxis: " + event.values[2]);
String test = new String(" " + event.values[0] + " "
+ event.values[1] + " " + event.values[2]);
writeData(test);
}

@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO Auto-generated method stub
}
};

sm.registerListener(sensor,
sm.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD),
SensorManager.SENSOR_DELAY_UI);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

public static void writeData(String test) {
try {

myOutWriter.append(test);
myOutWriter.flush();
myOutWriter.close();
} catch (FileNotFoundException e) {
// handle exception
} catch (IOException e) {
// handle exception
}
}


}


























You're closing the writer every time you write without opening it again. Add logging to the exceptions instead of just leaving them empty and you should see some stacktraces.


Something along the lines of: Log.e (TAG,message,exception), so: Log.e ("MainActivity", "Failed to write values to file",e);























Try using the other constructor, by putting true as the boolean append value. http://bit.ly/16lxbld



fos = new FileOutputStream(file,true);





















Please also consider the following constructor for FileOutputStream



fos = new FileOutputStream(file,true);



















lang-java






Read more

stackoverflow.comm



[android help] Reading file takes too long


Reading file takes too long



My application starts by parsing a ~100MB file from the SD card and takes minutes to do so. To put that in perspective, on my PC, parsing the same file takes seconds.


I started by naively implementing the parser using Matcher and Pattern, but DDMS told me that 90% of the time was spent computing regular expression. And it took more than half an hour to parse the file. The pattern is ridiculously simple, a line consists of:



ID (a number) LANG (a 3-to-5 character string) DATA (the rest)


I decided to try and use String.split. It didn’t show significant improvements, probably because this function might use regular expression itself. At that point I decided to rewrite the parser entirely, and ended up on something like this:



protected Collection doInBackground( Void... params ) {
BufferedReader reader = new BufferedReader( new FileReader( sentenceFile ) );

String currentLine = null;
while ( (currentLine = reader.readLine()) != null ) {
treatLine( currentLine, allSentences );
}

reader.close();
return allSentences;
}

private void treatLine( String line, Collection allSentences ) {
char[] str = line.toCharArray();

// ...
// treat the array of chars into an id, a language and some data

allSentences.add( new Sentence( id, lang, data ) );
}


And I noticed a huge boost. It took minutes instead of half-an-hour. But I wasn’t satisfied with this so I profiled and realized that a bottleneck was BufferedReader.readLine. I wondered: it could be IO-bound, but it also could be that a lot of time is taken filling up an intermediary buffer I don’t really need. So I rewrote the whole thing using FileReader directly:



protected Collection doInBackground( Void... params ) {
FileReader reader = new FileReader( sentenceFile );
int currentChar;
while ( (currentChar = reader.read()) != -1 ) {
// parse an id
// ...

// parse a language
while ( (currentChar = reader.read()) != -1 ) {
// do some parsing stuff
}

// parse the sentence data
while ( (currentChar = reader.read()) != -1 ) {
// parse parse parse
}

allSentences.add( new Sentence( id, lang, data ) );
}

reader.close();
}


And I was quite surprised to realize that the performance was super bad. Most of the time is spent in FileReader.read, obviously. I guess reading just a char costs a lot.


Now I am a bit out of inspiration. Any tip?



Read more

stackoverflow.comm



[android help] Error switching activity


Error switching activity


android - Error switching activity - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I am having an error when trying to switch from one activity(com.intelligent.stocktrader.MyAccount) to another(com.intelligent.stocktrader.SharePerformanceDetails).What am i doing wrong? My code has no error. Below is the log cat content.



E/AndroidRuntime(787): FATAL EXCEPTION: main
E/AndroidRuntime(787): java.lang.RuntimeException: Unable to start activity `ComponentInfo{co`m.intelligent.stocktrader/com.intelligent.stocktrader.SharePerformanceDeta`ils}: java`.lang.RuntimeException: Parcelable encountered IOException writing serializable `object (name` = org.achartengine.chart.LineChart)
E/AndroidRuntime(787): at `android.a`pp.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
E/AndroidRuntime(787): at `android.ap`p.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)

























Probably, you didn't edit the androidmanifest.xml to accept the second activity.




















default






Read more

stackoverflow.comm



[android help] assembleRelease task dependency - Ask for keystore password


assembleRelease task dependency - Ask for keystore password



To avoid writing the keystore password in plain text, I'm trying to add a dependency to the assembleRelease task created by the android Gradle plugin.


I've checked the Gradle documentation Manipulating existing tasks but I'm unable to place the dependency where it should


This is my task, defined in $root$/myApp/build.gradle above the android plugin.



task readPasswordFromInput << {
def console = System.console()

ext.keystorePassword = console.readLine('\n\n\n> Enter keystore password: ')
}

apply plugin: 'android'


Then, I've tried the two possibilities offered by Gradle: task.dependsOn and task.doFirst, but none works. The latter appears to be ignored, while dependsOn does add the dependency, but too late in the dependency chain. Running ./gradlew tasks --all prints this



:assembleRelease - Assembles all Release builds [libs:ActionBarSherlock:bundleRelease, libs:DataDroid:bundleRelease, libs:SlidingMenu:bundleRelease]
:compileRelease
...
[SEVERAL TASKS]
...
:packageRelease
...
[SEVERAL TASKS]
...
:readPasswordFromInput


The problem is, the keystore password is needed in the task packageRelease


Just as a side note, this works as I want



buildTypes {
release {
def console = System.console()

ext.keystorePassword = console.readLine('\n\n\n> IF building release apk, enter keystore password: ')

debuggable false

signingConfigs.release.storePassword = ext.keystorePassword
signingConfigs.release.keyPassword = ext.keystorePassword

signingConfig signingConfigs.release
}
}


but it asks for the password every single time you use gradlew, no matter if it's a clean or an assemble


Thanks!


EDIT


Thanks to @Intae Kim, here's my build.gradle version 2.0



task readPasswordFromInput << {
def console = System.console()

ext.keystorePassword = console.readLine('\n\n\n> Enter keystore password: ')

android.signingConfigs.release.storePassword = ext.keystorePassword
android.signingConfigs.release.keyPassword = ext.keystorePassword
}

tasks.whenTaskAdded { task ->
if (task.name == 'validateReleaseSigning') {
task.dependsOn readPasswordFromInput
}
}

apply plugin: 'android'


Then, the buildTypes



release {
debuggable false

signingConfig signingConfigs.release

runProguard true
proguardFile 'my-file.txt'
}


Gradle executes correctly, but it only generates a release-unsigned.apk



Read more

stackoverflow.comm



[android help] Handle messages and errors from operating system


Handle messages and errors from operating system



I wonder if can handle messages from OS.


For example: If i try to open PDF file and is fail , i get from OS mesage that i can't open this file.


Is it possibility to catch this message and replace with my message?



Read more

stackoverflow.comm



Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...