Friday, June 7, 2013

[General] Backing up Game Progress Tutorial? No Root?


Backing up Game Progress Tutorial? No Root?



Hi everyone. I just upgraded to the new Galaxy S4. My previous phone was the Motorola Droid Bionic. I was able to figure out how to transfer everything from my old phone (ringtones, pics, videos, text messages, ect.) however I am not having any luck so far on getting my progress in the games I played transferred over to the new phone. I already have the game apps downloaded to the new phone but when you run them its like starting the game from day 1. A couple of the games I played all the time had around 2 years of progress on them. So far any google searching and reading thru forums the only processes I've found for transferring your game data over requires both phones to be rooted and then to use programs such as Titanium Backup to do the transfer. It seems like I should be able to plug my old phone up to my computer and using Windows Explorer dig down into the game files and save the data then repeat that with the new phone and copy the old data to the same location. But from the reading I have done those folders on the phones that have that data aren't accessible unless the phone is rooted.

My question is are there any ways to get that game data (progress) transferred from my old phone to my new one WITHOUT having to root the phones. First I don't know much about rooting, second I know it voids your warranty so I would prefer not to have to do that. I also don't want to lose all of that progress in those games either. Any help on this would greatly be appreciated.

My second question. If there is no other way to get my game data transferred (except for rooting) then I guess I will just accept the loss of the game data HOWEVER, is there anyway I could set up the new phone game apps so that when I upgrade again in the future I won't lose that game data? For example some type of setup where it saves the game app and the data associated with it on the microSD card which can be put into the next phone and pick up where I left off? I don't know if that example is possible but I wanted to ask that so that from now on I wouldn't lose game data from this point forward.

Thanks!



.

forum.xda-developers.com

[General] Error Message please help?!?


Error Message please help?!?



Lately, I've been getting this error message on my LG Connect 4G, "Sorry! The process com.android.phone has stopped unexpectedly. Please try again. Force Close." And it happens randomly, or better yet, it happens when it tries to connect to 4G. At the top i see the 4G sign, but then it cancels out and then the message appears. I'll be typing a text message and boom it pops up. I'd be on the internet and boom. I'd just be on the homescreen and boom. And when it pops up, im forced to hit "Force Close" and when I do that, I lose my signal. And then on the unlock screen, it says "Emergency calls only" and then at the bottom I see "Invalid SIM". So would it be my SIM Card? Or something else? What can I do to return it to normal? I've done the factory reset twice but it didn't fix it. Could it be the battery? Ever since this started the back of the phone has been getting hot and the battery doesn't last as long as it used to. Please help me, please. Thank you



.

forum.xda-developers.com

[General] Saving a wallpaper to your gallery?


Saving a wallpaper to your gallery?



I have a sports team app that has a section for wallpapers. When you select one, it's just an option to add it as a wallpaper or not(you can't long press the pic in the app) once it's set as a wallpaper, how can you save it?

Sent from my SAMSUNG-SGH-I717 using Android Central Forums



.

forum.xda-developers.com

[General] How to root Galaxy tab? (Verizon)


How to root Galaxy tab? (Verizon)



Hello,

My dad has recently bought a new Galaxy Note tablet through Verizon, and has given me his old Galaxy tab. Since it is not my main device through Verizon, I decided to give rooting a try on it to help speed things up a bit by installing a custom ROM. I have rooted my Galaxy tab 2 7.0 (WiFI only edition) already, but I cannot find out how to root the Verizon tab 7. I have searched high and low all over Google and this site, and cannot find a successful rooting method. SuperOneClick seems to have a problem with the Verizon model, and several other methods that I researched did not work successfully on this device. I do not really want to brick it, since I still will be using it for other things, even though I own another new model. If someone knows of a way to root this device, please let me know.

Thanks.

Device Specs.

Samsung Galaxy tab 7 (SCH-I800) CDMA
Carrier: Verizon
Firmware version: 2.3.5
Kernel version: 2.6.35.7



.

forum.xda-developers.com

[General] Help Someone Please


Help Someone Please



I have a S3 Gt-I9305

I am having problems with restoring my phone as I think there is a system file missing and I have tried nearly everything from flashing a stock Rom for the phone. The screen still won't respond. I am using CWM v5.0.4 I have downloaded CWM 6.0.2.9 which will flash onto my phone. I am not sure if S-Off or S-On could be the reason the phone touch screen won't work and though it might be due to problem with the kernel. This is the kernel I had on the phone before I tried to update/flash a new ROM. kernel version 3.0.31 se.infra@SEP-79#1 SMP PREEMPT Wed 2822:04 KST2012 I can't find that kernel if I search on Google and was wondering if anyone could guide me in the right direction, I can give you the build number if needed.



.

forum.xda-developers.com

[android help] Multiply strings?


Multiply strings?


java - Multiply strings? - 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,i have those :



String[] pret = new String[allcant.size()];
String[] totaluri = new String[allcant.size()];
String[] cant = new String[allcant.size()];


I want to do something like this :



totaluri[l]=pret[l]*cant[l];`


but i can't.I guess i have to make them float? since my input from the edittexts that get the values in the cant and pret are decimals? How can i do that ? I tried this but it won't let me



totaluri[l]=Float.parseFloat(cant[l]) *Float.parseFloat(pret[l]);




























You need to use Double.parseDouble() or Float.parseDouble() to convert a String to a numerical value with a decimal fraction. You can then use Double.toString() or Float.toString() to convert the result of your calculation back to a `String.


Putting this all together:



double temp = Double.parseDouble(cant[l]) * Double.parseDouble(pret[l]);
totaluri[l] = Double.toString(temp);


I strongly suggest that you read Primitive Data Types and Lesson: Numbers and Strings from Oracle's Java Tutorial for more information about using Strings and Java's primitive data types.



























BigDecimal pretBD = BigDecimal.valueOf(pret[i]);
BigDecimal cantBD = BigDecimal.valueOf(cant[i]);
BigDecimal totaluriBD = pretBD.multiply(cantBD).setScale(2); // Decimals #.##

totaluri[i] = totaluriDB.toString();


It is much typing, and no operators (multiply, add), but double is for financial purposes inadequate. 5000 * 0.2 will not be 1000.0.






















What about this?



totaluri[l] = new String(Float.parseFloat(cant[l]) * Float.parseFloat(pret[l]));



















lang-java






.

stackoverflow.comm

[android help] Check Camera Orientation


Check Camera Orientation


android - Check Camera Orientation - 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.

















How do I check camera orientation for landscape or portrait continuously in phonegap android?


I am using cordova2.0.






















default






.

stackoverflow.comm

[android help] Taking picture with camera and sending it to mail in Android


Taking picture with camera and sending it to mail in Android



I want to write an application that only has this functionality: - take image using phone camera - send it as a mail attachment to a given address


I have written the following code, and i don't understand why i cant exit camera mode (pressing the accept button has no effect)



public class MainActivity extends Activity {
private static final int CAMERA_REQUEST = 1888;
private ImageView imageView;
private File f;
public File getAlbumDir()
{

File storageDir = new File(
Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES
),
"BAC/"
);
return storageDir;
}
private File createImageFile() throws IOException {
// Create an image file name

String imageFileName =getAlbumDir().toString() +"/image.jpg";
File image = new File(imageFileName);
return image;
}

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.imageView = (ImageView)this.findViewById(R.id.imageView1);
Button photoButton = (Button) this.findViewById(R.id.button1);
photoButton.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
try {
f = createImageFile();
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));
startActivityForResult(cameraIntent, CAMERA_REQUEST);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}



}
});
}

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == CAMERA_REQUEST && resultCode == RESULT_OK) {
Bitmap photo = (Bitmap) data.getExtras().get("data");
imageView.setImageBitmap(photo);

Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL , new String[]{"first.last@gmail.com"});
i.putExtra(Intent.EXTRA_SUBJECT, "first picture");
i.putExtra(Intent.EXTRA_TEXT , "body of email");

Uri uri = Uri.fromFile(f);
i.putExtra(Intent.EXTRA_STREAM, uri);
try {
startActivity(Intent.createChooser(i, "Send mail..."));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(MainActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
}
}
}
}


I would appreciate any suggestions! Thanks!



.

stackoverflow.comm

[android help] android notification shows just the last notificatoin


android notification shows just the last notificatoin



I have application android which gives data from server, i want to make notifications, one notification for each row of data, I want when the user press on the notification, an activity is triggered, i want to do all that using android service, i could do all of that.


my problem is that whatever the notification the user press, it just shows the last row of data.


code:



lient client = new Client(Configuration.getServer());
String str = client.getBaseURI("offers");
try {
JSONArray json = new JSONArray(str);
for (int i = 0; i < json.length(); i++) {
JSONObject oneOffer = json.getJSONObject(i);
int offerID = oneOffer.getInt("ID");
String offerDescriptoin = oneOffer.getString("Description");
String endDate = oneOffer.getString("EndDate");
String startDate = oneOffer.getString("StartDate");
JSONObject restaurant = oneOffer.getJSONObject("Restaurant");
int restaruantID = restaurant.getInt("ID");
String restaurantName = restaurant.getString("Name");
Offer offer = new Offer(offerID, startDate, endDate,
offerDescriptoin, new Restaurant(restaruantID,
restaurantName));
Log.d("DES", offerDescriptoin);
Offer.getAllOffers().put(offer.getID(), offer);
Intent intent = new Intent(this, OfferNotification.class);
PendingIntent pIntent = PendingIntent.getActivity(this, 0,
intent, 0);
Uri soundUri = RingtoneManager
.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(
this).setSmallIcon(R.drawable.ic_launcher)
.addAction(R.drawable.ic_launcher, "call", pIntent)
.addAction(R.drawable.ic_launcher, "more", pIntent)
.addAction(R.drawable.ic_launcher, "add more", pIntent)
.setContentTitle("Offer from " + restaurantName)
.setContentText(offerDescriptoin).setSound(soundUri);
// Creates an explicit intent for an Activity in your app
Intent resultIntent = new Intent(this, OfferNotification.class);
resultIntent.putExtra("offerID", offer.getID());
TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);

stackBuilder.addParentStack(OfferNotification.class);

stackBuilder.addNextIntent(resultIntent);
PendingIntent resultPendingIntent = stackBuilder
.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(resultPendingIntent);
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

mNotificationManager.notify(offer.getID(), mBuilder.build());
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


.

stackoverflow.comm

[android help] ListView with sections and custom backgrounds for each section


ListView with sections and custom backgrounds for each section



For ur ref , I have implemented the same thing in the following application


this is how I have implemented, 1) kept all the data in an Arraylist. For example:



private String HEADING_TAG="heading";
private String ITEM_TAG="item" ;
ArrayList data=
new ArrayList();
data.add( HEADING_TAG+"@selector");
data.add( ITEM_TAG+ "@item1")
/* in the above line "heading" is a tag, just to know that the
following listitem is a heading.
"@" is a separator using which we wl split the string later in
the adapter*/


2) Now implement a custom adapter and overide getView() method. Note: pass the length of the list to the adapter. 3) access the data list inside getView() method, an arguement called position will be available in getView method. Use that variable to iterate list. For Example:



getView(....,....,int pos,....)
{
String temp[]= data.get(position).split("@");
if(temp[0].equals( HEADING_TAG ))
{
// change the background to the layout which u r inflating.
// Set the heading to the textview or what ever view u defined
//the layout
}
else if (temp[1].equals( ITEM_TAG ) )
{
// set the item to the view
}
}


Hope this helps...



.

stackoverflow.comm

[android help] Displaying part of a spritesheet in an Android ImageView


Displaying part of a spritesheet in an Android ImageView



In Android, is there a clean way to display only a given part of a bitmap in an ImageView (for example a single sprite of a sprite sheet), without having to :


  • Manually split the bitmap png into small pngs (=> more drawables embedded in the app, tedious manual operation possibly leading to bugs, or loose the spritesheet).

  • Have small pngs used in the ImageViews, with the sprite sheet being generated (=> complicated)

  • Create "dirty" subclasses for ImageView, Drawable, etc (=> the more we use Android API "ASIS" the better)

  • Programmatically create sub-bitmaps of the big bitmap (=> We have to do all the work programmatically)

For instance I have tried creating an ImageView of width/height of 40dp, and setting its drawable as a ClipDrawable displaying only the part of the bitmap I wanted, but it did not go well :


Furthermore this solution is feasable with a simple sprite sheet (for example 2*2 sprites), but I do not think it is possible when using something like a 4*4 sprite sheet. I think ClipDrawable is not meant for such a use.


Isn't there something "clean and easy" like in OpenGL where you can set a texture Id, and set the texture coordinates to display only part of the texture? Considering my researchs I think the best solution is to manually split the big bitmap with Bitmap.createBitmap, when I'd rather ask before starting something like that.


PS : I consider using SpriteSheets because of OpenGl, although my "menus" are developed using Android APIs, hence using ImageView.



.

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