Thursday, April 18, 2013

[General] phone sending erroneous sms


I've not used Chomp, but I see that it has a scheduling function that will send SMS at a later date, and send them repeatedly based on some schedule. Any chance you accidentally set that? Another thought: most texting apps have the ability to send a quick reply of predefined messages (like "in class'). Any chance you're accidentally triggering that, some how?



.

forum.xda-developers.com

[android help] Shape Pattern Matching Algorithm in Java


I'm looking for a Java implementations of shape matching algorithms. here's an image to demonstrate of what i had in mind :


enter image description here


I would also be interested to know if there are any good free implementations of*gestures recognition* for Android



.

stackoverflow.comm

[General] Issue changing profile picture on mobile?


I keep receiving this error when I try to change my android central forum profile picture from the mobile app. Any clue how to resolve this? Sometimes it will change and say that I might not have the permissions.

Sent from my Verizon Droid DNA



.

forum.xda-developers.com

[android help] Before inserting a record in the database to validate that there is

android - Before inserting a record in the database to validate that there is - 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.

















Before inserting a record in the database to validate that there is, for example I have a table that has two fields, table fields VA with Customer, First, I want to validate the field if there is no customer registration and if there insert


That i want to do in android using Sqlite



























String sql = "SELECT * FROM TABLE WHERE id = '" + id + "'";
Cursor data = database.rawQuery(sql, null);


After this check by following code



if (cursor.moveToFirst()) {
// record exists
} else {
// record not found
}






















Look at SQLite constraints. This really isn't Android-specific; it's a feature of SQLite.






















Try this, it works for me.



String[] args = { myDataToCheck };
c = ourDatabase.query(DATABASE_TABLE, columns,
myColumnToCheck + "=?", args, null, null, null);
if (c.getCount() == 0) {
// doesn't exists
}else{
//exists
}





















You have 2 possibilities :


1)make a select to check if there is the same key in database, then insert or update.


2)make directly an update. update will return the number of row updated, if the number is 0, so you can do an insert.























lang-sql







.

stackoverflow.comm

[android help] Initial lag when starting Android App


I'm working on a chess type app for the Android platform (using Eclipse and standard Java / XML connection). This isn't for school or anything, just a personal project after learning some of the fundamentals to "get my feet wet."


Anyway, my question isn't due to a direct problem, more to what I've viewing when I open the emulator and what I see in the logcat.


Generally, when I hit run for any app, the emulator takes its standard time loading it, but when it does, the main activity loads right away. However, for this app, I'm experiencing a lag after the app loads, and when I quickly glance over to the logcat, it shows a TON of orange messages being generated...and then it displays my board (the app atm is just displaying a board).


Here is the HUGE logcat activity (sorry about the pastebin, but I'm new to this site and was having difficulty formatting this properly): http://pastebin.com/skc8SXqN


And here are my xml and java files: http://pastebin.com/8ByBQ0TA


My question is...is there any obvious reason for why the ~5 second lag occurs between the app loading and the board showing up? The incredibly large logcat output is all directed to the imageview...so am I doing something heinously inefficient there?



.

stackoverflow.comm

[General] Using micro SDHC cards in a tablet's micro SD media slot


Most of the specs for tablets which have a micro SD media slot do not give any details about it. I'm generally wondering if a slot labelled "microSD" will accept a micro SDHC card (as opposed to a micro SD card). I know, for example, that some older memory card readers won't read the SDHC cards, even if they have an SD slot. I'm not sure about the tablets however.

Example of some of the tablets that I'd be interested in knowing this about are: Acer Iconia A700 or A210, and Toshiba Excite.

Thanks, David



.

forum.xda-developers.com

[General] cannot login to music manager "could not identify your computer"


Hi, I'm new to android, just bought a Google nexus 7. Liking it a lot. Rooted it so as to use stick mount but not tried any custom Roms or kernels yet. Anyway my problem is not so much to do with the device as my computer, a pretty old Packard bell easy note running Xp service pack 3.
I was impressed when a friend told me I didn't need to add music to the device, I could just upload it all to the cloud and access it or add it offline as I wanted. So I tried to set it up on my computer. I followed instructions to install Music Manager and tried to login with my Google account. ( which is working with everything else). After the verification code was sent to my iPhone I got the error message:

"Login failed. Could not identify your computer"

I suspect it may be because my internet connection is via USB tethering to my iPhone. Not all Google apps will play nice with iPhone (never been able to add gmail account to iPhone, or you tube login). However I am WiFi tethering my Nexus to the same phone and have experienced no login difficulty with any Google services.

Google drive works fine on both iPhone and nexus tethered to it. However on laptop tethered to same phone it crashes sometimes and won't sync properly.,

Any ideas? Do I just need proper Wi-Fi?



.

forum.xda-developers.com

Wednesday, April 17, 2013

[android help] Android: DialogFragment and universal xml

Android: DialogFragment and universal xml - 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 trying to take control of the database in android with Dialog Fragments. I mean, for example to add a new record I will click a button and pop-up fragment appears asking me for the specific fields. I click ok which fires the method in my hosting activity. That part works.


However, I also want to have other operations like delete, update, search record ect.


Is there a way to have a universal code for fragment but then assign different xml according to different database operations? I am looking for the most efficient way around my problem.


Thanks!


























You can inflate different views on your Fragment...



public class MyClass extends Fragment {
String xmlToLoad;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstances);
Bundle data = getArguments();
xmlToLoad = data.getString("what you set in your fragments pager");
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if(xmlToLoad.equals("whatever")) {
View view = inflater.inflate(R.layout.thisXML, container,false);
}
}
}



















default






.

stackoverflow.comm

[android help] my soundpool project won't play properly?


I've been trying to implement this soundpool class (with some help from a tutorial) but when I try to run it on a virtual device, the sound won't play... The main_activity XML file loads fine, but it was expected that on loading, a sound would be played.


here is the source code.



public class MainActivity extends Activity {

private SoundPool soundpool;
private boolean soundPoolLoaded = false;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

// Create a new SoundPool instance.
// 2 = number of sounds that can be simultaneously played
// AudioManager.STREAM_MUSIC = The type of sound stream. STREAM_MUSIC is the most common one
// 0 = sound quality, default is 0.
// setOnLoadCompleteListener loads the file
soundpool = new SoundPool(2, AudioManager.STREAM_MUSIC, 0);
soundpool.setOnLoadCompleteListener(new OnLoadCompleteListener() {
@Override
public void onLoadComplete(SoundPool soundPool, int sampleId, int status) {
soundPoolLoaded = true;
}
});

playSound("car_phonic");
}


// This method will load a sound resource from the res/raw folder by the input name given as a string (soundName).
// If the sound resource is found by name, it will attempt to play the sound
// soundPoolLoaded value becomes true when the file is fully loaded
public void playSound(String soundName) {
if(soundPoolLoaded == true)
{
// Get the current context resources and find the correct sound resource for playing the sound
Resources res = this.getResources();
int soundId = 0;
soundId = res.getIdentifier(soundName, "raw", this.getPackageName());

if(soundId != 0){
soundpool.play(soundId, 1, 1, 0, 0, 1);
}


SystemClock.sleep(500);
playSound(soundName);

}
}
}


Any help would be appreciated! Thanks



.

stackoverflow.comm

[General] Applications Crashing....MAX RAM?!


The way Android works, it will always want to fill up free RAM with processes so that they're more quickly accessible when you need them. In general, RAM will optimally be used at around 70-80%. I'm not a total Android techie, so I can't give you the down and dirty details, but in short, when the system detects that it's crossed a certain threshold of RAM usage, it will start shutting down less recently used processes to free up more RAM. 400 MB out of 812 MB RAM used is pretty low, and would not be how things are supposed to work. However, 790 MB out of 812 MB RAM used is pretty high, so that could explain why your phone's been acting a little loopy.

If things keep bogging down even after a restart, I would suspect one of your apps misbehaving. When your memory usage is up around 790 MB, take a screenshot of your Running Apps screen under Settings/Apps/Running, so we can see which one the hog is.



.

forum.xda-developers.com

[General] SD card memory caps


Hi All:
just gone into the android world by purchasing a cheap android tablet, dint want to commit 2 years to do any of the carrier for now until later, its Ice Cream sandwich by the way

one question i run into is the SD card, the tablet came with 4GB of memory internally, i purchased a 32GB SD card hoping to boost its usability, and used a few apps to "move app to SD" its been working good, but its not showing any size decreased in the SD card after i moved about 30-40 apps to the SD card using these app, its still saying it has 29GB or so and used none of it , this is the reading from the built-in "disk usage" meter in the device management options...., and i downloaded a few more app that gives me the reading of the SD card status and usage, it gave me much less than what i expected, it said my SD card only has 1.7GB total give or takes

so this kind of puzzles me, how can we tell if which usage data is right ? is my cheap tablet being cheap because of this so it would only see about 2GB of the 32GB SD card maybe this was the reason ??

thanks for your help and advise



.

forum.xda-developers.com

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...