yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] xomanuel:
how to move the [x] button (clear) to top beside the settings button, and how to remove the word "notification" and remove the dots, and the date, week in the top and date and year at the bottom of it
[Galaxy S II Q&A, Help & Troubleshooting] Beso:
Hi.

I bought new 1800 mah battery and a charger. I use it to charge one battery while other is in galaxy. Everything fine. I just wonder why I get 50% less with new 1800 mah battery than with stock 1650 mah.

Even if I check in Battery Monitor Widget with new battery it shows that I have 1650 mah battery?

Any suggestions why is that? :)

Tnx
[Galaxy S II Q&A, Help & Troubleshooting] -Grift-:
Fake (rip-off) battery?
[Galaxy S II Q&A, Help & Troubleshooting] immortalneo:
From where did u buy it mate?

"To err is human, to forgive is divine"

Sent from my SGS II
[Galaxy S II Q&A, Help & Troubleshooting] fxrb:
Battery Monitor Widget does not read out the battery's capacity. The value you see (1650 mAh) is the value you should set yourself according to your battery ;).
[Galaxy S II Q&A, Help & Troubleshooting] gastonw:
I need future batteries from samsung's flag ships to fit, so nobody can ask "how battery life on that ROM"

Sent from the little guy
[Galaxy S II Q&A, Help & Troubleshooting] jr866gooner:
The only official sammy one that's larger is the 2000 ma one isn't it?
[Galaxy S II Q&A, Help & Troubleshooting] gastonw:
As far as I know..yeap.

Sent from the little guy
[Java for Android App Development] DoR2:
Hello app developers!

I have got serious problem. Every time I call alertdialogs or other dialogs I see them only in activity. But my app needs to show this dialog when user works on phone, that's why it must be shown out of activity. Any ideas?
[Java for Android App Development] nikwen:
You cannot do this. There is simply no feature for that. I have had that problem, too. :(

Use a Notification or a Toast message.
[Java for Android App Development] zalez:
There is a work-around for this. If you run a service, you can technically launch an activity that can resemble this.

I have an app that uses a broadcast receiver to listen for the events I want to alert my user to. I created a custom layout for my alert dialog and then when the event happens, my broadcast receiver calls the activity.
[Java for Android App Development] nikwen:
Yes, great idea. Launch a transparent Activity and start a dialog. Set an onDismissListener and close the app when the dialog is closed.
[Java for Android App Development] DoR2:
If I start a transparent activity user can't see that it was started as I understand. Can you give code for broadcast receiver maybe I misunderstand something
[Java for Android App Development] zalez:
The broadcast receiver is just the mechanism I use to launch the activity. It is a mere intent that I start from it. Below is the class I use for my alertdialog. You won't be able to cut and paste because I also created my own class to dismiss the activity.

public class SilentDialog extends TimedActivity implements OnTouchListener{
Intent intent;
[MENTION=439709]override[/MENTION]
public void onCreate(Bundle savedInstanceState) {
//Remove title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);

//Remove notification bar
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);

showAlert();
}
[MENTION=439709]override[/MENTION]
protected void onDestroy()
{
//this is very important here ;)
super.onDestroy();
}

public boolean onTouch(View v, MotionEvent event)
{
final int actionPerformed = event.getAction();

//reset idle timer
// put this here so that the touching of empty space is captured too
// it seems that LinearLayout doesn't trigger a MotionEvent.ACTION_UP or MotionEvent.ACTION_MOVE
if (actionPerformed == MotionEvent.ACTION_DOWN)
{
super.onTouch();
}

return false;//do not consume event!
}
public void showAlert(){
//would you like it to expire?
AlertDialog.Builder builder;
final AlertDialog alertDialog;

Context mContext = SilentDialog.this;
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.pop1,
(ViewGroup) findViewById(R.id.layout_root));
NumberPicker spin = (NumberPicker) layout.findViewById(R.id.SpinRate);
spin.setVisibility(8);
TextView rate = (TextView) layout.findViewById(R.id.RateTitle);
rate.setVisibility(8);
TextView text = (TextView) layout.findViewById(R.id.txtAlertDiag);
text.setText("ButlerSMS has detected the ringer mode has changed to silent. " +
"\n\n Would you like ButlerSMS to turn on?");
final NumberPicker picker = (NumberPicker) layout.findViewById(R.id.SpinRate);
picker.setValue(60);

builder = new AlertDialog.Builder(mContext);
builder.setView(layout);
builder.setTitle("ButlerSMS - Silent Mode");
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {

intent = new Intent(getBaseContext(), ButlerWidget.class);
intent.setAction("StartSMS");
intent.putExtra("msg","Normal");
sendBroadcast(intent);
finish();
}
});
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// Canceled.
finish();
}
});

alertDialog = builder.create();
alertDialog.show();
final Timer t = new Timer();
t.schedule(new TimerTask() {
public void run() {
alertDialog.dismiss(); // when the task is active then close the dialog
t.cancel(); // also just top the timer thread, otherwise, you may receive a crash report
finish();
}
}, 19000);
}

}
[Java for Android App Development] DoR2:
I understood everything except the way how app switch between position before signal came and required activity with alert dialog in it. As I see this code initialize activity and alert dialog but don't contain switching that I need
[Java for Android App Development] zalez:
Are you asking how I call the dialog? If so, a simple intent from a broadcast receiver.

Intent i = new Intent(context, SilentDialog.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

context.startActivity(i);
[Java for Android App Development] nikwen:
I would use the AlertDialog.Builder class for compatibility.
[Java for Android App Development] Zatta:
Why not use a notification, I think that is more elegant.

public class InstalledReceiver extends BroadcastReceiver {
private NotificationManager mNotificationManager ;
[MENTION=439709]override[/MENTION]
public void onReceive(Context context, Intent intent) {
if (BaseActivity.DEBUG) System.out.println("Received Broadcast");
Boolean update = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false);
mNotificationManager = (NotificationManager) context.getSystemService("notification");
SharedPreferences getPrefs = PreferenceManager.getDefaultSharedPreferences(context);
Boolean disabledNotifications = getPrefs.getBoolean("disableNotifications", false);
if (!disabledNotifications && !update) makeNotification(context);
}

private void makeNotification(Context context) {
CharSequence label = context.getString(R.string.labelNotify);
CharSequence text = context.getString(R.string.textNotify);
CharSequence full = context.getString(R.string.fullNotify);
final Notification notification = new Notification(R.drawable.ic_launcher,text,System.currentTimeMillis());
notification.setLatestEventInfo(context,label,full,null);
notification.defaults = Notification.DEFAULT_ALL;
mNotificationManager.notify( 0, notification);
}

}

Taptalked u see .. əəs n pəʞlɐʇdɐʇ
[Java for Android App Development] nikwen:
I agree, but if he wants to use a dialog, we help him to make one. ;)

The bad thing about the dialog is that it will interrupt whatever the user is doing. This could be very annoying. And who wants to use an app which has annoying popups?
[Java for Android App Development] DoR2:
When I use this code activity don't shows when I am out of application. For example Handcent SMS when SMS comes to user shows up a great dialog over all windows. My aim is the same thing
[Java for Android App Development] nikwen:
Start an Activity. Set a transparent layout. Show a dialog. That will result in what you want.
[Java for Android App Development] DoR2:
I have used this code

Intent i = new Intent(context, SilentDialog.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

context.startActivity(i);

and made transparent layout with dialog, but my dialog appears only in my app
[Java for Android App Development] nikwen:
Could you please post your code?
[Java for Android App Development] DoR2:
How I call activity

if(answer.contains("BEEP")){
Intent intent=new Intent();
intent.setAction("Navi_Beep");
sendBroadcast(intent);

r.play();

Intent i = new Intent(context, NBeep.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

context.startActivity(i);
}

NBeep.java

public class NBeep extends Activity {
[MENTION=439709]override[/MENTION]
public void onCreate(Bundle savedInstanceState) {
Log.d("NaviBeep","Here");
//super.onCreate(savedInstanceState);
super.onCreate(savedInstanceState);

AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle("Title");
alertDialog.setMessage("Message");
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent=new Intent();
intent.setAction("Navi_BeepOff");
sendBroadcast(intent);

finish();
}
});

// Set the Icon for the Dialog
alertDialog.show();
}
}
[Java for Android App Development] nikwen:
Ah. You need to call setContentView. Create a transparent View and pass it as a parameter.
[Java for Android App Development] DoR2:
Doesn't help:

public class NBeep extends Activity {
[MENTION=439709]override[/MENTION]
public void onCreate(Bundle savedInstanceState) {
Log.d("NaviBeep","Here");
View view=new View(this);
view.setBackgroundColor(Color.TRANSPARENT);

setContentView(view);
super.onCreate(savedInstanceState);

AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle("Title");
alertDialog.setMessage("Message");
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent=new Intent();
intent.setAction("Navi_BeepOff");
sendBroadcast(intent);

finish();
}
});

// Set the Icon for the Dialog
alertDialog.show();
}
}
[Java for Android App Development] nikwen:
If you use another layout, is the Activity opened?

Is the "Here" written to the log? Is there any Error message?

And I recommend configuring the AlertDialog within the AlertDialog.Builder: http://www.mkyong.com/android/android-alert-dialog-example/

(However, I guess that it will not solve your problem.)
[Java for Android App Development] DoR2:
I finally made it!:victory: Here is code:

1) Call dialog:

NBeep.createDialog(NBeep.DIALOG_ERROR, context);

2) NBeep.java

public class NBeep extends Activity{
public final static int DIALOG_ERROR = 4;

protected Dialog onCreateDialog(int id) {
Dialog dialog;
switch(id) {
case DIALOG_ERROR:

AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle("Title");
alertDialog.setMessage("Message");
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent=new Intent();
intent.setAction("Navi_BeepOff");
sendBroadcast(intent);

finish();
}
});
alertDialog.setCancelable(false);
dialog = alertDialog;//new AlertDialog.Builder(this).setMessage("ERROR! This is a global dialog\n Brought to you by Sherif").create();
break;
default:
dialog = null;
}
return dialog;
}

[MENTION=439709]override[/MENTION]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showDialog(DIALOG_ERROR);
}

public static void createDialog(int dialog, Context context){
Intent myIntent = new Intent(context, NBeep.class);

myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myIntent);
}
}
[Java for Android App Development] nikwen:
What is the difference?

---------- Post added at 06:46 PM ---------- Previous post was at 06:44 PM ----------

Something else: They recommend using a DialogFragment (it is for Android 1.6+ in the supportv4 library): http://stackoverflow.com/questions/13765127/dialogfragment-advantages-over-alertdialog
[Java for Android App Development] DoR2:
I really don't know where is the difference, but it works:D
[Micromax A110] saadmshk:
I am on MMX STOCK JB 1.11 on Q mobile A10. I'm having this problem receiving late notifications, messages and calls on VIBER and WHATSAPP. Plz someone guide me plz....
[Micromax A110] maddyrokieasta:
reset your device or reflash the latest rom .. hit thanks if i helped :)
[Micromax A110] dangeradit:
Can be your slow network problem too
[Micromax A110] saadmshk:
m on wifi 24x7 n get almost 1000KB/s download speed...m i still slow???

i reset many times but same problem...
[Micromax A110] maddyrokieasta:
so flash it again to stock rom :)
[Micromax A110] saadmshk:
done that hundreds of time same issue...:(
[Micromax A110] dangeradit:
from where did you downloded stock rom?

or you are using pc companion to update software?
[Micromax A110] maddyrokieasta:
okay .. so root your device and install Suvi rom v6 .. it will definatly gonna solve your problem .
[Micromax A110] saadmshk:
i like STOCK ROM simple stock theme n looks thats why i can't flash any other ROM but thanks for the help...:good:

http://xdaforums.com/showthread.php?t=2160609 PAPLU3's thread

first flashed with SP tool then using CMW flashed Micromax A110 Stock JellyBean V1.11
[Micromax A110] maddyrokieasta:
okay then download stock rom from OFFICIAL FTP server :)
[Micromax A110] ashwani.rock2:
Any battery saver are there on ur cell like deep sleep???
[Micromax A110] saadmshk:
no nothing just STOCK JB 1.11 rooted one
[Micromax A110] saadmshk:
Plz somebody help....!!!!
[AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin] Reload147:
Well, I ordered samsung galaxy s4 for my brother when his credit check failed. But after I went through the next day I also got the same email as my brother saying there was problem with the order so it hasn't been placed. Then my brother got a call and they asked if he wanted to place the order again because there was a system error. And it was placed successfully.

Then after that I got a call to ask if I wanted to put the order again and I said no because I change my mind.

But today My brother got a s4 and I got one too!.

I called them saying why I received the phone explaining the top paragraph and they said they had to place orders manually because the system was declining all the credit checks saying all failed. I asked to cancel the contract and They are going to give me back £50 in 14 days if I stay with them.

The contract is £35. and I have Htc one x £29 a month I think it ends next year June. And an iPad which I recently got for £34 a month contract.

The question is what do I do! because I can still cancel. But I like the S4 too. :P
[AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin] Ker~Man:
Aweful situation to be in - your life is overflowing with high-end mobile devices! Ahhh!!!
[AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin] Reload147:
Deffo :P only thinking about s4 because Ive had many problems with one x since I had it. But now Im going to send the s4 back and put up with my one x because After my htc one x contract ends Ill be able to get s5 or other phones hopefully.
[AT&T HTC One (M7)] homeslice976:
This mod will remove the on screen 3 dot menu bar and restore the Option under Settings/Display, Gestures, and Buttons for Back Button Options, letting you choose Press for back, press and hold for menu (as shows in the screenshot). This mod will not enable Menu functionality in Prism (the sense launcher). This will work on Stock/Rooted, odexed or deodexed. Flash in recovery, wiping dalvik and cache afterwards is necessary. Contains a slightly modified Settings and build.prop with a line added to remove the 3 dot menu bar - built from ATT's 1.26.502.10

Also included is a mod to enable the back button settings, but leave the 3 dot menu bar. And one will go back to stock Settings. Note that this is based off of the ATT software like stated above. If you've flashed this to another build, and you want to go back to stock, you need your Settings.apk. If you're stock ROM was odexed, you also need Settings.odex. Put them both (with 7zip on a PC) in /system/app/ of the bk2stock zip and flash away. Not a bad idea to also use your stock build.prop if you're going back

​
[AT&T HTC One (M7)] jam10238:
Works great! Thanks!!!!
[AT&T HTC One (M7)] rgoyena:
Nice this is what's needed
[AT&T HTC One (M7)] KidCarter93:
Cheers for this. Worked on my international variant where other methods wouldn't :thumbup:
[AT&T HTC One (M7)] homeslice976:
Good to hear! Thanks for the report.
[AT&T HTC One (M7)] tell4ever:
great job man, gonna try this immediately
[AT&T HTC One (M7)] Namit1994:
What code did you change to enable back button as menu? I would like to try this on a different base.
[AT&T HTC One (M7)] homeslice976:
It's in the display flags smali

To remove the 3 dot menu bar, it's just a build.prop edit (last line of the build.prop included in the package posted)
[AT&T HTC One (M7)] blackplague1347:
Incredible. This is just what I've been wanting since I got my One. Thanks so much OP.
[AT&T HTC One (M7)] martyotaku:
Thank you works great on my dev one
[AT&T HTC One (M7)] jmz:
Wrote up a tutorial. Thanks to O.M.J. for sharing.

http://www.teamdirt.me/showthread.php?p=1118
[AT&T HTC One (M7)] homeslice976:
Was gonna do that this week when I had a moment. Thanks jmz!
[AT&T HTC One (M7)] tybowski:
Seems like another reason to get off my ass and unlock bootloader and root already.kcco
[AT&T HTC One (M7)] ForcedZucchini:
Anyone run into a problem trying to disable the mod and get the 3 dot menu back? When I select always go back from gestures the 3 dot won't show up nor does the long press work.
[AT&T HTC One (M7)] homeslice976:
Yea the 3 dot was permelanently removed by this mod.. no configuring it, so if you turn the back button menu setting off, you won't have any menu other than the in app menu that has been the android standard since Ics. I'll provide another .zip this afternoon that leaves the 3 dot menu but also enables the back button setting
[AT&T HTC One (M7)] tier~:
Ran this script, another winner. Only had one small hiccup, the amazon kindle app was uninstalled. Nothing a quick trip to the play store couldn't fix...
[AT&T HTC One (M7)] homeslice976:
Wait... with this mod? or the debloat script?

This mod shouldn't remove anything other than the 3 dot menu bar. The debloat script should remove the kindle app, since Amazon let ATT call it ATT Amazon Kindle, it became ATT Bloat :)
[AT&T HTC One (M7)] dc4:
Works great on my Rogers One!
[AT&T HTC One (M7)] Kjelstrup:
I am desperate to get it to work, but it comes with errors eventually "X Application not installed"

It is a brand new HTC one from Denmark

SW ver. 1.29.401.12 HTC SDK API 12.5

Really hope you can help me.
[AT&T HTC One (M7)] Kjelstrup:
And i dont have the back button menu in my settings??
[Xperia Z Q&A, Help & Troubleshooting] Shadow Ryder:
I had a few questions about locking and unlocking bootloader.

1. After unlocking we lose the DRM keys. Which apps will no longer work?a list would be useful.

2. If i relock my bootloader again will the DRM keys be restored and ca i use those apps again?

Thank you!
[Xperia Z Q&A, Help & Troubleshooting] diego9016:
1. Check this thread

2. They won't be restored. There's a way you can make a backup of your TA partition here.
[MDA II, XDA II, 2060 ROM Development] kopecek:
Hi all,

I am cooking my own ROM. I extracted original T-mobilCZ CABs from Extended ROM and now I want to add some must-have applications to my ROM. The ms_.nbf space is 16MB and If I add my appls I am over that limit by 100kB.

The problem is, that largest CAB is T-mobileCZ customization CAB. I want only something from this CAB. I want to remove Themes, Helps, some settings and so on.

Is any possibility to remove fome stuff from instalation CAB file - respectively "re-pack" it?

Something like reengeneer the instalation sources, remove something and make new instalation CAB?

Thanks for help.
[MDA II, XDA II, 2060 ROM Development] Xant:
Use WinCE cab-manager, that will do the job.
[MDA II, XDA II, 2060 ROM Development] Southern_Man:
Are you able to save files in the extended ROM?

My Xda II 1.6.50 ROM is write-protected - how do I unprotect it?
[MDA II, XDA II, 2060 ROM Development] kopecek:
WinCE CAB Manager is right. I just modify my operator customize CABs and cooked my own ROM. All seems to be perfect...

Thanks...
[MDA II, XDA II, 2060 ROM Development] EelcoV:
xda2nbftool -x ms_.nbf ms.nba 0x20040305
[Nexus 7 Themes and Apps] rushy7uk:
hi,any files i download (you tube vids etc )when i use nexus media importer to copy or move them from the nexus to the sd card (or usb stick) when i come to play them on windows or my wd live media player they dont show up as on the sd card.

any ideas?
[T-Mobile Samsung Galaxy S II SGH-T989] tjmortenson:
I updated to the official jellybean, but I haven't seen any guides on how to root it yet, is there a way?
[T-Mobile Samsung Galaxy S II SGH-T989] meekrawb:
Install TWRP 2.5.0.0 with Odin, boot into TWRP and press reboot and then system. You should get a prompt to install SuperSU. After that you boot your phone, open SuperSU and let it update. That should do it. You can get the latest TWRP tar file here:

http://techerrata.com/browse/twrp2/hercules
[T-Mobile Samsung Galaxy S II SGH-T989] tjmortenson:
Ok thanks I'll try that when I get home
[T-Mobile Samsung Galaxy S II SGH-T989] tjmortenson:
Ok, I forgot I tried to flash superuser with CWM when I updated, so I have superuser, but no root, and no way to delete superuser. Is there any way to uninstall superuser without being rooted?
[T-Mobile Samsung Galaxy S II SGH-T989] meekrawb:
I am not aware of a way to delete it without root. I had the same problem as you so I just started over by Odin flashing the update and then TWRP. Good luck.
[T-Mobile Samsung Galaxy S II SGH-T989] xdaDemiGod:
The almighty Odin

Summoning thy powers of the almighty Odin shall always work in ones favor, to reach ROOT Valhalla!
[T-Mobile Samsung Galaxy S II SGH-T989] IVIorph:
Here is an easy how to guide...

http://xdaforums.com/showthread.php?t=2249849
[T-Mobile Samsung Galaxy S II SGH-T989] tjmortenson:
Ok, thanks everyone for helping, I'm going to start over with Odin, then root with twrp.
[Galaxy Ace S5830i Q&A, Help & Troubleshooting] ProGadgetReviews:
Hi every one, I have bought a galaxy ace and I have experience with smartphones, especially android.

I appearently soft bricked the device after attempting to install CWM recovery. I installed the usb drivers dozens of times and odin just won't recognize my device! I must fix this! this isn't my phone and i am running out of options! Odin just won't recognize it (It is in download mode).

Also every time i plug it in the USB input the computer tells me that it is unrecognized. PLEASE HELP
[Galaxy Ace S5830i Q&A, Help & Troubleshooting] Nabs Zains:
I guess you have not read FAQ before creating thread
[Galaxy Ace S5830i Q&A, Help & Troubleshooting] ProGadgetReviews:
I did read the FAQ and that's why i need help, i tried everything there and nothing worked! Odin just won't read my phone!
[Galaxy Ace S5830i Q&A, Help & Troubleshooting] srt99:
some times drivers needed to be installed several times..

reinstall drivers, reboot and try again..!

best install samsung kies..

if still no solution then try to flash through other pc!
[Galaxy Ace S5830i Q&A, Help & Troubleshooting] Kakaroth89:
I had the same problem... installed all the driver I can found but odin won't recognize the phone

at the end I canceled all the drivers; installed Kies, reboot... and voilà, odin works