yashsingh1/xdaforums huggingface dataset:
[Java for Android App Development] tmlhodge:
Alright guys, first app here. I hit a bump in the road, can someone tell me how to use preference manager to save and restore my switch states?

A snippet of my code,

public class MainActivity extends Activity implements View.OnClickListener {

[MENTION=439709]override[/MENTION]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
PreferenceManager.getDefaultSharedPreferences(this).getBoolean("sw1",false);
}

public void onClick(View v) {}

public void sw1(View view) {
// Is the view now checked?
boolean checked = ((Switch) view).isChecked();
// Check which checkbox was clicked
switch(view.getId()) {
case R.id.sw1:
if (checked) try {
//Toast.makeText(this, "SW1 Checked", Toast.LENGTH_SHORT).show();
Runtime.getRuntime().exec(new String[] { "su","-c","mod1" });
PreferenceManager .getDefaultSharedPreferences(this).edit().putBoolean("sw1",true).commit();
} catch (IOException e) {
e.printStackTrace();
}
else try {
//Toast.makeText(this, "SW1 NOT Checked", Toast.LENGTH_SHORT).show();
Runtime.getRuntime().exec(new String[] { "su","-c","mod1b" });
PreferenceManager .getDefaultSharedPreferences(this).edit().putBoolean("sw1",false).commit();
} catch (IOException e) {
e.printStackTrace();
break;}
}
}
[Java for Android App Development] alobo:
Try this:

[MENTION=439709]override[/MENTION]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
boolean checked = PreferenceManager.getDefaultSharedPreferences(this).getBoolean("sw1",false);
Switch mSwitch = (Switch )findViewById(R.id.sw1);
mSwitch.setChecked(checked);
}

I'm not sure where you setup your click/check listeners.. If you could provide some more details, that would be great.

Hope this helps!
[Java for Android App Development] tmlhodge:
Alright, the on click listener is right before the list of buttons, you can actually see it in the code in the OP.

Also I am starting to get excited because that actually made my switch turn on! But now it's just on every time I turn it off and exit app..
[Java for Android App Development] tmlhodge:
That got me on the right track and I figured the rest out! Thank you very much good sir/mam [MENTION=4553333]alobo[/MENTION]
[Nexus 4 Q&A, Help & Troubleshooting] scottharris4:
Did I take care of everything to get it back to 100% stock so I can sell it like it was fresh out of the box? I'm taking it to a place that will inspect it thoroughly, so got to make sure I got all the loose ends wrapped up

1. Have Android 4.3 (got the OS update a day or two ago)

2. It is unrooted

3. It is locked

4. It has the stock recovery

5. The kernel is listed as 3.4....a bunch of other stuff...mtv.corp.google.com #1

6. Deleted anything resembling a custom ROM, kernel, or recovery in the "SD Card" partition

Anything else any of you can think of?
[Nexus 4 Q&A, Help & Troubleshooting] klvnhng:
Sounds good to me, just make sure you have the stock bootloader and radio as well (you didn't mention it). Also, boot up the phone once to make sure it can actually start up (flashing the stock images sometimes results in getting stuck at the bootlogo on boot).
[Nexus 4 Q&A, Help & Troubleshooting] scottharris4:
Pretty sure I have that done. How do I look to see if I have stock bootloader and radio?
[Nexus 4 Q&A, Help & Troubleshooting] klvnhng:
Boot into fastboot.

Look under BOOTLOADER VERSION:

MAKOZ20i

BASEBAND VERSION:

ends in .84
[Nexus 4 Q&A, Help & Troubleshooting] scottharris4:
Cool, I can check baseband in the about phone system settings. Got that right. Just went into fastboot and bootloader checks out too. Thanks.
[Verizon Samsung Galaxy Note II] kingamra:
Had 2 rooted verizon note 2s... one running beans and the other just rooted stock...

Yesterday my phone ran through 3 batteries in as many hours and then started getting dirty popups from big red about 'non-vzw' roms.... I actually lost phone function for a while which sux cause I was on-call... I quick odin'd back to stock for function...

Wifes rooted stock lost root access same day...

Big red now big brother?

Is this the purpose of the new casual exploit in the dev section?

Thanks!

-b
[Off-topic] Kato:
Hi - I broken display on my MDA II (HTC Himalaya). Where can I buy new? (internetshop). I have seen a cheapest for cca $250 - this is very much. Rather as unbroken used MDA II. Where is cheapest? Thanks a lot for answer.
[Off-topic] smithy318i:
http://pdascreens.co.uk/
[Galaxy S 4 Q&A, Help & Troubleshooting] andys93:
Hello guys, just bought a Samsung Galaxy S4 i9500 from a technology store in Cyprus

I have a problem with the SD Card Socket, it doesn't click when i insert the sdcard and i have to drag it out to take it out, it won't click out either.

Using an 32GB Class 10 Verbatim MicroSDHC.

I've used the application SD Tools several times and when i "Start Speed Tests" the application freezes and i can't use the sd card in any other application, I don't know if any other guy has this issue.

Please tell me anything if u know how to fix this.
[Galaxy S 4 Q&A, Help & Troubleshooting] sxi200:
It seems your socket is broken. You have some options which are to take it back to the store for replacement or repair, or buy the part yourself and change it. It's a very easy fix.

Costs about $5 on eBay.

View attachment 2160043
[Galaxy S 4 Q&A, Help & Troubleshooting] andys93:
thank you very much, the strange part is that i used a SanDisk 16GB Class 4 microSDHC card and it clicked perfectly, it even clicks-out too, and it works perfectly, i don't know what to think, i've put the two microsd cards next to each other and they have the same exact size, i don't know what is wrong ;/
[Galaxy S 4 Q&A, Help & Troubleshooting] andys93:
Hello guys, just bought a Samsung Galaxy S4 i9500 from a technology store in Cyprus

I have a problem with the SD Card Socket, it doesn't click when i insert the sdcard and i have to drag it out to take it out, it won't click out either.

Using an 32GB Class 10 Verbatim MicroSDHC.

I've used the application SD Tools several times and when i "Start Speed Tests" the application freezes and i can't use the sd card in any other application, I don't know if any other guy has this issue.

If anyone knows anything please tell me how to fix this
[Galaxy S 4 Q&A, Help & Troubleshooting] acboy555:
If you just bought it and have such a problem... The better option might be to take it back on warranty and see what they have to say about the sd card slot. Since it is not clicking in properly, maybe some of the connectors are a bit out of line with the improper insertion.
[Galaxy S 4 Q&A, Help & Troubleshooting] ultramag69:
Hell yeah, that's what warranty is for. Why pay to fix something that should be working out of the box...
[Galaxy S 4 Q&A, Help & Troubleshooting] sxi200:
Check my reply in your other thread in the general forum.
[Galaxy S 4 Q&A, Help & Troubleshooting] andys93:
checked your reply, thank you very much, the strange part is that i used a SanDisk 16GB Class 4 microSDHC card and it clicked perfectly, it even clicks-out too, and it works perfectly, i don't know what to think, i've put the two microsd cards next to each other and they have the same exact size, i don't know what is wrong ;/
[Samsung Epic 4G Touch] hanseric:
Howdy pards!

Got a rooted E4GT running Supernexus for about the last 2 months give or take.

All has been well until about 2 weeks ago (thereabouts), I started noticing my callers and I could not hear each other for about the first 10 secs of the call.

The delay is just long enough that it usually convinces caller they should hang up .

It happens a lot but not every time. I'd say half my calls.

My phone is integrated with Google Voice. That has had some delays but usually just small latencies (coudld still hear) and I haven't had that problem in a good year or two now.

Outgoing calls are fine usually. No delays like this.

Some things I have wondered is if it could be the PRL that needs to be updated?

And if it is, should try an update? Is that safe when running an AOSP ROM? (Doesn't seem like it would be so I haven't.)

(Corollary question: are there other updates that people typically do that folks like me should avoid?)

Attaching my Hardware Info screenshot.

Any ideas?
[Shield Q&A] aDigitalPhantom:
I am thing I missed something but my Shield cant find my pc. Geforce experience says everything is good but the wifi, and says I need wireless a/g router or a wireless n router is needed, I have a wireless n access point but no router.

Here is what Geforce experience says about my pc.

GPU

GeForce GTX 660

GeForce GTX 660

GeForce GT 620

CPU

Inter(R) Core(TM) i7-3820 CPU @ 3.60GHz

Memory

63.95 GB

Current Resolution

1920 x 1080, (60Hz)

Driver Version

326.41

Operating System

Microsoft Windows Ultimate

If more specific PC specs are needed please tell me.
[Shield Q&A] agrabren:
Is your PC on wireless, or do you have it wired to the network? Also, from 1wayjonny:

Please check your advanced wireless router settings and check if IGMP snooping is enabled.

If so try to disable IGMP snoop or any jitter correction like WMM as well.

Hope this helps, it took hours to figure out the router setting.
[Shield Q&A] aDigitalPhantom:
No my PC is not on wireless, it is connected to a gigabit Switch. I am not sure if that switch goes to the WiFi AP or if it goes to another switch then the WiFi AP.

I already looked for IGMP snooping and did not see anything close to that.
[Shield Q&A] agrabren:
And you've checked that your SHIELD has taken the update (you'd know, it requires a reboot like any OTA)
[Shield Q&A] oushidian:
It might be related to my problem, but check these:

1. Are the IP of your shield and PC on the same network, only last number is different? (ex. 192.168.1.*) If so then they are on the same "router".

2. You are already on the beta drivers, make sure you have the newest Shield firmware like agrabren mentioned.

3. Reboot everything.

4. In Geforce experience, have you had it scan for games? This is a must and must be done first.

5. Now go to Preferences and click on the Streaming Tab. Is "Allow..." checked? If so, click the reset button.

6. Try going to PC Play on your shield and hopefully it will see your PC.
[Shield Q&A] aDigitalPhantom:
1.

my PC has a static IP of 192.168.0.76 netmask 255.255.255.0 gateway 192.168.0.1

my shield ip is dhcp and 192.168.0.6

2.

yes

3 i can do that but it may do more harm then good.

4.

yes

5.

yes

6.

No Dice

my shield matches the above.
[Shield Q&A] oushidian:
Rebooting is always the magic elixir :)

My problem was my shield could see my PC but not acknowledge the connection. I fixed it by uninstalling Geforce Experience and reinstalling it (scanning for games, clicking reset under streaming, then trying it). Try uninstalling GE (not the drivers), rebooting, reinstalling and giving it a go.
[Shield Q&A] aDigitalPhantom:
Define everything please.

a list of everything (I can currently think of) on my LAN

1 24 port gigabit switch (stuck at 100Mbps)

1 5 port gigabit switch

1 DSL Modem

1 Printer

1 WiFi AP

4 Servers (lan only)

? WiFi Devices

2+ Desktop PCs

1 FXO/FXS voip adapter

1 2xFXS voip adapter

There is probably more I have forgotten.

Some of those things have a good chance of having problems after rebooting.
[Shield Q&A] oushidian:
I was thinking of just the PC and the Shield, but looking at the list of things on your network I'm thinking the PC might not be the problem. There might be something in the AP or the two switches that is preventing the Shield from seeing it. You might try getting some Android network tools (ping and such) to test if the shield can see the PC's IP. I haven't done network troubleshooting with Android so I can't recommend any good methods, but you could probably find some forums on XDA that would help.

I'd try the reinstall of Geforce Experience first just to make sure it's not that.
[Shield Q&A] aDigitalPhantom:
ping says that both the shield and pc can see each other. reinstalling GFE
[Shield Q&A] agrabren:
I had to uninstall both my graphics driver and GFE client and reinstall them to get mine working...

And dang, that's a heck of a setup. :)

If you search for mDNS or Bonjour tools, they have a discovery tool that should help you find your GFE PC. That's how SHIELD does it.
[Shield Q&A] aDigitalPhantom:
I have reinstalled GFE, Drivers, and have restarted both my pc and shield no diffference. Shield says "No available GeForce GTX PCs Found"
[Shield Q&A] 1wayjonny:
Hi

I have this running on a DAP-1525 access point so its OK that it is not the router.

I saw you looked for the IGMP, and that sucker was my exact issue after hours. The funny thing is it was default while the router did not have this default from factory.

Would you mind sharing what AP model you have?
[Shield Q&A] aDigitalPhantom:
sure my access point is a trendnet TEW-638APB. Thought I posted that, but it looks like i did not.
[Shield Q&A] agrabren:
I'm fully stumped. :( At work, I have the following setup (which is a closer match to your setup than my home setup)

1x NetGear Gigabit Switch

1x NetGear N900 Wireless Router in AP mode (only cable is from switch to internet port)

2x PCs connected to Gigabit Switch

The discovery traffic is mDNS (also known as Bonjour) so if anything is configured to filter that out, that'll be a problem. It's also considered a broadcast packet, so you may be able to research Bonjour or mDNS and your wireless AP or other equipment... If you have another computer on the network, there are tools for mDNS discovery, you could use those to see if the PC is appearing (but I don't remember it's discovery name).

Wish I could be more help, but not really my area. I'm an Android guy. :) You can also try grabbing a logcat on your device, it may say something when you go into the TegraZone dashboard.
[Shield Q&A] aDigitalPhantom:
will try logcat, and I did try using mdnsscarn from http://sourceforge.net/projects/mdnstools/?source=navbar and windows that spits out "Port 47989 is open on 192.168.0.76"
[Shield Q&A] agrabren:
That sounds like the port... But there should be a service name with it from mDNS...
[Shield Q&A] aDigitalPhantom:
Can I get the exact name for that mdns service, I can't find anything close to dns or mdns running on my computer.

actully I can find something but only dnscache.
[Shield Q&A] oushidian:
My only other suggestions for debugging is make sure the nvStreaming service is running. If you start the Task Manager (right click on start bar) then look for NVSTREAMER.EXE. If it's not running that's the main problem. There's a service for it (Admin tools/services) that I think GFE installs. If it's there and not running then try starting it. If it's not there at all then I guess reinstall GFE again.

Another thing I can think to try is turn off windows firewall (or any that you are using) in the Control Panel.

The last thing is to isolate your setup to just the Shield, wireless AP, and PC. Plug the AP (LAN port) directly into the PC so it's just serving the Shield wirelessly and the PC wired. If the AP is just a simple WAN port (no LAN) then see if you can set it up as a bridge (a pain) or better yet, try another AP. Hopefully you can isolate the problem.
[Shield Q&A] aDigitalPhantom:
I have a nvstreamsvc.exe but no nvstreamer.exe

Turned on windows event logging.

From Error group.

[CODE]The description for Event ID 1 from source NvStreamSvc cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

NvStreamSvc
NvVAD endpoint registered successfully [0]

The description for Event ID 1 from source NvStreamSvc cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

NvStreamSvc
Unregistering VAD endpoint [0]

[/CODE]

From Information group

[CODE]UpdateThe description for Event ID 3 from source NvStreamSvc cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

NvStreamSvc
Started [0]
I turned on Windows event logging, and I have the following errors.

The description for Event ID 3 from source NvStreamSvc cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

NvStreamSvc
Stopped [0]

The description for Event ID 3 from source NvStreamSvc cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

NvStreamSvc
Do not restart event received from SSAU [0]

[/CODE]
[Shield Q&A] oushidian:
I have first one as well. When I start PC Play on the Shield then nvstreamer.exe kicks in. If you right click on nvstreamsvc.exe in the task manage and select "Open File location" they should both be in the same directory.

Those were the same errors I was getting when I was debugging my problem. I just checked and I'm still getting those errors even though it works so they don't seem to be the problem.
[Shield Q&A] aDigitalPhantom:
The files are in the same directory, but nvstreamer.exe does not start that I Have seen.

I am wondering if the fact GFE says I don't have good wifi might be the problem. I don't exactly want to go buy new internet equipment for this.
[Shield Q&A] aDigitalPhantom:
logcats
[Shield Q&A] agrabren:
I see nothing useful. :( It doesn't appear to be finding your server at all.
[Shield Q&A] pidge2k:
I work for NVIDIA. I am sure you've tried this but can you verify your router is using the latest firmware available? I've had issues in the past where Bonjour breaks sometimes with certain firmwares. THe AP seems like is still available for purchase. May see if I can pick it up to test with.
[Shield Q&A] aDigitalPhantom:
No the firmware is old updating it now.

I don't update the firmware on a regular basis because doing that normally bricks the device I am updating.

Update

No Change
[Shield Q&A] pidge2k:
Thanks. It seems some users are having issues with certain AP. I'll see if we can acquire your model so we can investigate.
[Shield Q&A] 1wayjonny:
Thanks I found an emulator for your router here: http://www.trendnet.com/emulators//TEW-638APB

I have a few questions for you.

1) Do you have this as Access Point or AP Client?

Seen Here: http://www.trendnet.com/emulators/TEW-638APB/AP_Client/opmode.html

2) In the QoS tab have you turned OFF both the WMM features?

Seen Here: http://www.trendnet.com/emulators/TEW-638APB/AP_Client/station/qos.html

3) Have you tried turning OFF MPDU Aggregation

Seen Here: http://www.trendnet.com/emulators/TEW-638APB/AP_Client/station/advance.html

If I had to take a guess at testing myself, I would make sure its an Access Point not and AP Client. I would also have both WMM features OFF and MPDU OFF as well.

That would be my starting point then turning those same features on one by one.

Also just double check you have no software firewall running such as windows, etc.
[Shield Q&A] aDigitalPhantom:
1. Access Point

2. N/A

3. N/A

See attached pic for available advanced settings.
[Shield Q&A] 1wayjonny:
Hmm the emulator need a firmware upgrade Bah! =)

Your screen looks like what I would have done and I am sure you have tried tick different options.

Maybe you can try going to "station/qos.html" manually and force it in the web browser if you get the path right. Or its just missing. Weird

If I think of anything else I will get back to you.
[Shield Q&A] aDigitalPhantom:
It is starting to look like my shield is indeed talking to my pc, but failing to see the GTX GPUs

I have mdnsscan and mdnsdiscovery running on my pc and it is seeing the shields ip, but the shield can't find any GTX PCs
[Shield Q&A] agrabren:
If GFE is giving you the "Streaming" tab, then it knows you're capable of streaming. And I believe mDNS works the other way... SHIELD is trying to find your PC using mDNS.
[Shield Q&A] aDigitalPhantom:
Something is running IGMPv2 any idea how to find out what?

Update

It looks like everything that IGMP is reporting to a different address, is that normal?
[Shield Q&A] aDigitalPhantom:
I have been watching packets via wireshark. The mdns packets fall under 'TTL low or unexpected', and the time to live is 255. I understand that the ttl should be 1 for multicast?
[Shield Q&A] Faithinchaos21:
I'm not sure if this is any help at all but I noticed you have a gtx620 running in there too, any chance this is throwing it off at all? I mean, if shield isn't seeing the GPU's maybe it's because it's seeing the incompatible one? ... I honestly don't have much experience here but I just thought I'd throw that suggestion out there..
[Shield Q&A] aDigitalPhantom:
I moved the GT 620 to a different computer and nothing changed.

Today I bought a WiFI router from recommended list HERE, and I found the pc using that. What I find really interesting is I can now connect from the other access point fine.
[Shield Q&A] agrabren:
Does that mean you're up and running??? :D
[Shield Q&A] aDigitalPhantom:
yes
[Shield Q&A] agrabren:
And? What do you think?
[Shield Q&A] aDigitalPhantom:
Most of my games are older and the controller does not work. The one game I have played it works great. I will be checking to see if any of my other games will work.

The game is Need for Speed: Most Wanted (2012)

I noticed that it streams better by changing the in game resolution setting to 720
[Shield Q&A] agrabren:
Yes, for "NVIDIA Supported" games, the resolution change is automatic. But for other games, you'll get a lot better results if you change the resolution to 720p, since that's the native panel resolution (higher res means higher bandwidth)

I've said in another thread, thinking of an idea to get controller support to work better. Stay tuned. :)
[Shield Q&A] Marvy_marv702:
Fix: Resolved

This is your classic Server/Client troubleshooting.

Server = PC

Client = Shield

on PC:

go to Start --> Run --> type : "services.msc"

look for NVIDIA Streamer Service (mine was set to Automatic --> yet it wasn't running) --> right click and start

**this should kick on the NVIDIA Streamer Network Service as well.

on Shield:

the Stream Icon should appear (if on the same network) - if not, reboot

Verify:

** For us Network/IT people:

You can confirm services are running by bringing up the task manager - show details (may need to add the PID column under view)- look for the NvStreamNetworkService -- and it's PID ,

Open a command prompt do a "Netstat -ano" and look for PID. it should be listening one of those high 5200s ports -- may need to check if software firewall is blocking on PC