Wednesday, June 26, 2013

[General] App to turn another app on and off based on time


App to turn another app on and off based on time



Hi all...

I like to sleep at night! When I do I would love it if I could turn Google Talk off but have it switch on again in the morning without me having to remember to do it. At the moment I have an app which puts the phone into airplane mode and I set a time to turn it back on. If I could do the same with Google Talk it would be awesome.

Does anyone have any ideas of an app that would turn it off for a set period of time, or maybe at a certan time of the day check to see if it is off and start it up again?

Thanks guys.



.

forum.xda-developers.com

[General] can I back up but *not* restore using Backup and Restore?


can I back up but *not* restore using Backup and Restore?



Hi,

If I use the Backup and Restore option in my S3's settings, can I just back up my settings to Google and back out of the restore? I'm afraid to give it a try in case it goes from backup --> restore on it's own.

Thanks,
Deb



.

forum.xda-developers.com

[General] Downloading on 3g


Downloading on 3g



I have a question, hopefully i'll make sense and someone can help me

Say I want to download a tv programme onto my tablet but I'm not in a wifi hospot, so using 3g.

Let's the the programme is 350mb, does that mean that downloading on 3g would use up 350mb of my data allowance?



.

forum.xda-developers.com

[General] Unlock to last app used


Unlock to last app used



It should do that by default, however some system intensive apps like games and the like will restart when you unlock your phone.

The reason being that some apps don't work well with wake locks. And putting the phone to sleep during the middle of a system intensive app interrupts the process and forces it to close. Because turning the phone off causes the processor to sleep.

Sprint GS3 Running TN's Msg and Chubbs



.

forum.xda-developers.com

[General] Seeking App for Non-Cloud Email with Folders and Filters


Seeking App for Non-Cloud Email with Folders and Filters



Is there an Android email app that will do the following:


  • Sync with multiple POP3 accounts

  • Sort mail into folders automatically

  • One of the sort criteria: Sender is in my Contacts list

If not, would someone please write it?

(I can't switch to IMAP and I won't use Gmail or another cloud-based service.)


.

forum.xda-developers.com

[General] Looking for a good headset


Looking for a good headset



Is there a good monaural headset with a large leather earcup that can fit around the ear?

Sort of like this except with a leather earcup. Blutooth would be best, but wired is acceptable. Does not matter if earcup is closed or open, although closed would be best. The phone I will use it for will be either a Samsung Note II or S 4.



.

forum.xda-developers.com

[android help] Android: Image Over Zooming


Android: Image Over Zooming



I have this code from a tut that enables scrolling and zooming of an image, but even if the image is small, the code will stretch the image so that It will fill the whole screen. I want it to have a dialog maybe that contains the image and enables the zooming and scrolling by modifying the code without occupying the whole screen.


Edit: Is it possible to have a limit in scrolling or limit the size of the image using the code below?



public class ZoomHelloActivity extends Activity {

// Physical display width and height.
private static int displayWidth = 0;
private static int displayHeight = 0;


static String img="";

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

Display display = ((WindowManager)
getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
displayWidth = display.getWidth();
displayHeight = display.getHeight();

//get intent
Bundle extras = getIntent().getExtras();

if (extras != null) {
Toast.makeText(this.getBaseContext(),"Inside: "+img.toString(),
Toast.LENGTH_SHORT).show();
img = extras.getString("img");
// and get whatever type user account id is
}
else{ Toast.makeText(this.getBaseContext(),"ERROR ni",
Toast.LENGTH_SHORT).show();}
setContentView(new SampleView(this));


}

private static class SampleView extends View {
private static Bitmap bmLargeImage; //bitmap large enough to be scrolled
private static Rect displayRect = null; //rect we display to
private Rect scrollRect = null; //rect we scroll over our bitmap with
private int scrollRectX = 0; //current left location of scroll rect
private int scrollRectY = 0; //current top location of scroll rect
private float scrollByX = 0; //x amount to scroll by
private float scrollByY = 0; //y amount to scroll by
private float startX = 0; //track x from one ACTION_MOVE to the next
private float startY = 0; //track y from one ACTION_MOVE to the next

public SampleView(Context context) {
super(context);

// Destination rect for our main canvas draw. It never changes.
displayRect = new Rect(0, 0, displayWidth, displayHeight);
// Scroll rect: this will be used to 'scroll around' over the
// bitmap in memory. Initialize as above.
scrollRect = new Rect(0, 0, displayWidth, displayHeight);

// Load a large bitmap into an offscreen area of memory.
int assignImg;
assignImg = Integer.parseInt(img);
bmLargeImage = BitmapFactory.decodeResource(getResources(),
assignImg);
}

@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
// Remember our initial down event location.
startX = event.getRawX();
startY = event.getRawY();
break;

case MotionEvent.ACTION_MOVE:
float x = event.getRawX();
float y = event.getRawY();
// Calculate move update. This will happen many times
// during the course of a single movement gesture.
scrollByX = x - startX; //move update x increment
scrollByY = y - startY; //move update y increment
startX = x; //reset initial values to latest
startY = y;
invalidate(); //force a redraw
break;
}
return true; //done with this event so consume it
}

@Override
protected void onDraw(Canvas canvas) {
int newScrollRectX = scrollRectX - (int)scrollByX;
int newScrollRectY = scrollRectY - (int)scrollByY;

// Don't scroll off the left or right edges of the bitmap.
if (newScrollRectX < 0)
newScrollRectX = 0;
else if (newScrollRectX > (bmLargeImage.getWidth() - displayWidth))
newScrollRectX = (bmLargeImage.getWidth() - displayWidth);

// Don't scroll off the top or bottom edges of the bitmap.
if (newScrollRectY < 0)
newScrollRectY = 0;
else if (newScrollRectY > (bmLargeImage.getHeight() - displayHeight))
newScrollRectY = (bmLargeImage.getHeight() - displayHeight);

// We have our updated scroll rect coordinates, set them and draw.
scrollRect.set(newScrollRectX, newScrollRectY,
newScrollRectX + displayWidth, newScrollRectY + displayHeight);
Paint paint = new Paint();
canvas.drawBitmap(bmLargeImage, scrollRect, displayRect, paint);

// Reset current scroll coordinates to reflect the latest updates,
// so we can repeat this update process.
scrollRectX = newScrollRectX;
scrollRectY = newScrollRectY;
}
}
}


.

stackoverflow.comm

[android help] First Android app not running


First Android app not running



I am following the steps as in android training google and my activity_main.xml is like




xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/edit_message" />
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send" />



I have defined the hint strings






My First App
Enter a message
Send
mainActivity
Settings
Hello world!




AVD details


But when I click on run button, it shows no activity !



.

stackoverflow.comm

[android help] Regex to remove track number from song name?


Regex to remove track number from song name?



I have a ListView that display song names and artists. Sometimes, the song names contain the track number and a separator with some in this format



13 - J. Cole - Best Friend


and others like this



13 - Beautiful People


After some digging around I found that the best way to go about this is to define a regex pattern that will remove any unnecessary characters in the string. Cool. I've looked at other SO questions on a similar topic here and a couple blog posts but still no luck.


This my first time dealing with regular expressions and I find it quite useful, just trying to wrap my head around coming up with efficient/useful patterns.


Here's what I need to remove from the string if it is a match



The track number
The "-" or whatever separator character that follows it
The artist name and the "-" that follows that(Each artist name is listed below the song, so it would be redundant)


Any help on this would be greatly appreciated as usual guys, thanks!


Edit: The same output that I would like is something like this, with just the song names. No track numbers, and if applicable; no artist names following the "-"



Beautiful People
Angel of Mine
Human Nature


.

stackoverflow.comm

[android help] How to activate speech to text with a button?


How to activate speech to text with a button?


android - How to activate speech to text with a button? - 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 would like to implement a button that when clicked would activate android's speech to text translator like the one provided by android's keyboard. Specifically, I would like a button that would have the app transcribe what the user is saying in real time, and record it word by word (real time) in an editText box. What would be the best way to go about doing this?


Thanks
















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










default






.

stackoverflow.comm

[android help] Android web server that can stream real time audio from local mic


Android web server that can stream real time audio from local mic



I want to write a web server on Android phone. When other phone users look at the server's web page in browsers, the web page can play real time audio recorded from the server's microphone. Can anyone please point me to the right direction? Thanks a lot!



.

stackoverflow.comm

[android help] Model View Controller in android


Model View Controller in android


stackoverflow - Model View Controller in android - 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 write android project that use MVC concept , and load available data from the model to controller to pass it to view to display it .But is there any way to load data not available and when you ensure this data is available to controller to pass it to View class to display it?.


























Observer Pattern is the answer. You will need a mechanism that Controller will register himself for Load Data Event. Which basically triggered by an Observable Class which tells observer that something has changed. And whenever this event will occur Controller will go and get the data from Modal and forward it to View.




















default






.

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