Wednesday, April 3, 2013

Bunch of questions


Hello

I'm sorry to ask all those questions in a single post, but I would otherwise have had to post in several forums. I'll be grateful if you can answer even some of those questions.

I'm very happy with my Samsung Google Nexus, but there are things I need:

1. Ad blocker: For web browsing, I generally use Dolphin, and use Chrome when I need to start an incognito tab. Are there ad blockers for those browsers to avoid those heavy web pages?

2. Since 3G uses more battery, is there a way to tell Android to switch back to 2G automatically after Xmn of no web browsing (2G seems good enough for the few times I use GPS)?

3. I'd like to have the following shortcuts on the screen:
- Switch to 3G or 2G
- Enable/disable Airplane mode
- Enable/disable wifi

I currently use the "" application, but as the name implies, it only handles the first item.

4. Is it possible to change my MAC address as a work-around to those pesty public access points that limit users to 20mn? There are several utilies for Windows that do this, but is there one for Android?

5. Is there a way to tell Android to go through a proxy when browsing in 3G? The application only works for wifi

6. Is there a way for the phone to vibrate when receiving text messages?

7. Can the ring volume rise or go down depending on the surrounding noise? When on the street, I often miss calls because I can't hear the phone even with its volume pumped up to the maximum... which I must remember to lower back to a reasonable level when going back inside.

8. When using my phone as a GPS receiver while biking around on week-ends, I'd like to switch off data mode to save battery: Does GPS require a data connection, or can it work offline?

9. I generally find Android's default calendar nice to use, but there are a couple of things that bother me:

- it can't be squeezed vertically, wasting a lot of screen real estate, and making it possible to see appointments below a certain hour: Is there a way to squeeze/inflate the calendar through multi-touching? 's a screenshot.

- it always displays a "Attending?" question, even though I don't use a shared calendar (I do attend my own appointments): Can this section be removed? 's a screenshot.

Thanks for any help.



.

forum.xda-developers.com

Question/issue with my Nexus 4


I just bought this phone from T-mobile two days ago. But now it seems like there might be an issue. Sometimes when I go to unlock my phone it won't let me. The screen gets a little brighter but there's nothing I can do. Then after a few trys it finally comes on. I don't know if theres a setting I need to switch or turn off or if it's an actual issue and I should bring my phone back. Also sometimes I can't touch the screen. Nothing will happen, I don't know if its sensitivity or if I need to take the plastic covering off but it just kind of freezes. Any ideas?



.

forum.xda-developers.com

Encrypt Sasmung S3 with PIN only


Hi,

Is there any way at all to get around the requirement for an alpha numeric unlock code in order it Encrypt my Samsung S3 I9300? Having a PIN unlock code is far easier to remember and to enter when in a hurry. This seems to be a bit of an unnecessary bind.

Ta.



.

forum.xda-developers.com

[Q] [Help ME]Mono Android with MVS 2010




Default[Q] [Help ME]Mono Android with MVS 2010




Hi guys, I'm new to C# and Mono Android. I have tried to make a app, but it gives me a error, I want to ping a address, this is the error

Click image for larger version Name: error.jpg Views: 1 Size: 161.0 KB ID: 1856850

here's the code,

using System;
using System.Text;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Net;

using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Media;

namespace FirstAAp
{
[Activity(Label = "FirstAAp", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{

protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);

// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);

// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById



"An EXPERT is someone who has made all the mistakes which can be made, in a very narrow field" - Niels Bohr

--------------------------------------------------------------------------
----------------------------------------------------------------------------------------------Thanks to UKICAR@XDA



.

forums.androidcentral.com

Are these good screen protectors




DefaultAre these good screen protectors



http://www.xtremeguard.com/Samsung-G...-protector.htm

You can get the full body guard for five dollars extra but I'm also going to get this case so is it even necessary to get the full body protector

http://www.spigen.com/cell-phone/sam...eo-hybrid.html

Sent from my SPH-D710 using xda app-developers app



.

forums.androidcentral.com

[Q] What is the name of my problem, and how do I fix it?




Storage[Q] What is the name of my problem, and how do I fix it?




I successfully rooted my phone using this method:

http://forum.xda-developers.com/show....php?t=2130276

Then I tried the following method to modify multi-window on the phone:

http://www.andromods.com/tips-trick/...indow-bar.html

And ran into this problem on this step:
4. Copy and replace “FlashBarService.odex” to “/system/app” folder, as well as “services.odex” to “/system/framework” folder. If you have difficulty to replace services.odex, reboot your device. In case you experiencing bootloop after replacing services.odex, then you need to pull out and reinsert the battery, if the bootloops remains, just flash the root image with ODIN to fix it.

PROBLEM: THE PHONE FROZE. THEN WHEN I REMOVED AND RE-INSTALLED THE BATTERY AND TURNED IT ON, IT LOADS UNTIL THE 4GLTE SCREEN AND REMAINS THERE INDEFINITELY.
- I did what it directs to do with the battery but it didn't work.
- I don't know what it means to "flash the root image with ODIN"

I've tried this to fix it:

http://galaxynote2root.com/galaxy-no...tock-firmware/

and I believe maybe another thing with odin. Odin usually fails, maybe it's just my USB drive. But i have no idea what to do, or what to even look up to learn how to fix it because I don't know what my problem is called.

Can anybody help me by giving me a method to use or steps to follow or some information?



.

forums.androidcentral.com

Got a ? Regarding talk and surf



DefaultRe: Got a ? Regarding talk and surf




BTW first post but been on here for a long time, I'm a xda old fart lol just more of a reader and I usually find the answers to my questions without asking

Sent from my Yummy EVO Jelly using xda app-developers app



.

forums.androidcentral.com

[REQUEST] Stock Music Player with Xperia S sound enhancements !




Default[REQUEST] Stock Music Player with Xperia S sound enhancements !




is it possible to make the xperia s sound enhancement with the stock music player on our phones?




.

forums.androidcentral.com

Im having some trouble passing an enum in my wcf service


Im trying to parse this enum:



public enum ResponseFormat
{
XML,
JSON,
PDF,
}


in with ksoap2 to a wcf service. I tried using Marshal but im not sure if its correct.


I have a class called Format:



public class Format implements Marshal
{
public enum ResponseFormat
{
XML,
JSON,
PDF,;
}

public Object readInstance(XmlPullParser xpp, String string, String string1, PropertyInfo pi)
{
try
{
return ResponseFormat.valueOf(xpp.nextText());
}
catch(Exception e)
{
return null;
}
}

public void writeInstance(XmlSerializer xs, Object o)
{
try
{
xs.text(((ResponseFormat)o).name());
}
catch (Exception e)
{
}
}

public void register(SoapSerializationEnvelope sse)
{
sse.addMapping(sse.xsd, "ResponseFormat", ResponseFormat.class, new Format());
}
}


Then i called the wcf service like this:



try
{
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("UserSessionToken", guid);
request.addProperty("Reference", "Nicolas");
request.addProperty("ResponseFormat", Format.ResponseFormat.JSON);
request.addProperty("Surname", "Tyler");
request.addProperty("Firstname", "Nicolas");
request.addProperty("IDNumber", "1234567890123");

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.addMapping("http://schemas.datacontract.org/2004/07/SearchWorksAPI", "ResponseFormat", Format.ResponseFormat.JSON.getClass(), new Format());
envelope.dotNet = true;
envelope.setOutputSoapObject(request);

HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

androidHttpTransport.call(SOAP_ACTION + METHOD_NAME, envelope);
SoapObject response = (SoapObject)envelope.getResponse();

return response.toString();
}
catch (Exception e)
{
return null;
}


Im getting the exception:



There was an error reflecting type 'ResponseObjects.Person[]'.; at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)


It seems to me that there is something wrong with the serialization. Any ideas on whats wrong here?



.

forum.xda-developers.com

android mobile control


I don't want to do advertisement but sample app for behavior of my application is ESET antivirus.


One requested feature of my application is that for uninstall is needed password. I add my app to device admin list and it is not possible to uninstall it now. But you can Deactive app as admin device. Whan you go to Settings > Location & security > Select device administrators and you try to deactive ESET Security it starts starts the activity (I guess from DeviceAdminReceiver.onDisableRequested()) which is waiting for password and your mobile is locked. Home button, back button and even SwitchOff button doesn't react=>


1.How it is possible to disable Home,Back,SwitchOff and Camera button as ESET do.


I took out battery from my phone and after it ESET was still device admin - it mean they achieve some way that DeviceAdminReceiver was waiting for result of MyGetPasswordActivity. Because after Deactive button press you can call StartActivity(MyGetPasswordActivity) at DeviceAdminReceiver.onDisableRequested. But it is needed to wait for password and not to execute super.onDisableRequested() - app will remove app from device admin list.


2.How is possible to wait with execution of super.onDisableRequested() and wait for result of my Activity.


Thank you for ideas.



.

forum.xda-developers.com

Google Places Api is giving me request denied always



j.setUrl("https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AIzaSyA712jyN6NY0VXSGf8zgXfXSRhq01O8RLY");


This is my json url with my key. It always gives me status request denied . I have tried making alot of keys with debug keystore and new keystores but nothing works . it is the example url of google. It doesn't work for me. If you want to provide a solution regarding a new key please give me the detailed procedure on how to get a valid debug key. Please be very detailed. If you want to provide a solution regarding sensor paramater its there already. If you want json parser file its as below



package com.json;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONException;
import org.json.JSONObject;

import android.os.AsyncTask;
public class JSONParser extends AsyncTask {

static InputStream is = null;
static JSONObject jObj = null;
static String json = "";
private String url;

// constructor
public JSONParser() {

}

@Override
protected JSONObject doInBackground(Void... params) {
// defaultHttpClient
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(getUrl());

HttpResponse httpResponse = null;
try {
httpResponse = httpClient.execute(httpPost);
} catch (ClientProtocolException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
} catch (IOException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}
HttpEntity httpEntity = httpResponse.getEntity();
try {
is = httpEntity.getContent();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

BufferedReader reader = null;
try {
reader = new BufferedReader(
new InputStreamReader(is, "iso-8859-1"), 8);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
StringBuilder sb = new StringBuilder();
String line = null;
try {
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
is.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
json = sb.toString();

try {
jObj = new JSONObject(json);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

// return JSON String
return jObj;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
}


}



.

forum.xda-developers.com

Android opening other application , error on return in ICS

Android opening other application , error on return in ICS - Stack Overflow



















I am using intent chooser to share content from my app. I am getting exception ArrayIndexOutOfBounds in the line super.oncreate() of my activity only in ICS and above if the following sequence is followed : 1. Open the app to share (eg fb) from my app 2. Return without sharing by pressing back btn


This error doesnt occur in gingerbread OS
















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










default






.

forum.xda-developers.com

[JB] Transparent Weather app 4x2




Smile[JB] Transparent Weather app 4x2




Here is a transparent accuweatherwidget 4x2

Working well on my phone after some adjustments to make it look good on S Advance

Install with CWM or TWRP (mount system first).

Click image for larger version Name: Screenshot.jpg Views: 0 Size: 69.2 KB ID: 1854967

Download:
TransparentAccuweatherWidget.zip

As always I recommend you back up your original. I am not responsible for anything that goes wrong that could break your phone or make it go poof.

Hope you like it...



Phone: Galaxy S Advance I9070

Rom: Stock Rooted and Deodexed XXLQB with my mods

Kernel: CoCore-E-5.1 nightly with TWRP

My No Limit SMS app Modded SecMms

My S Advance Custom BootAnimation

Transparency My modded SystemUI

Modded Lockscreen with 4 shortcuts and more

Backup Phone: Galaxy Ace S5830

if I've been helpful, you could buy me a house but a thank you would be just as nice



.

forums.androidcentral.com

How do I center text horizontally and vertical in a TextView in Android?

How do I center text horizontally and vertical in a TextView in Android? - Stack Overflow



















How do I center the text horizontally and vertically in a TextView in android, so that it appears exactly in the middle of the TextView?





























I'm assuming you're using XML layout.



android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:text="@string/**yourtextstring**"
/>


























android:gravity="center"


will do the trick

























You can also set it up dynamically using:



textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);






















android:layout_centerInParent="true"


This works when used with a RelativeLayout where the layout's height & width are set to wrap_content.

























If you are using TableLayout make sure to set the gravity of the TableRows to center, too. Otherwise it will not work. At least it didn't work with me until i set the gravity of the TableRow to center.


For Example like this:



























In my opinion,



android:gravity="center"


is better than,



android:layout_centerInParent="true"


which is better than,



android:layout_centerHorizontal="true"
android:layout_centerVertical="true"


at least for formatting text.

























you need to set TextView Gravity (Center Horizontal & Center Vertical) like this



android:layout_centerHorizontal="true"


and



android:layout_centerVertical="true"


and dynamically using:



textview.setGravity(Gravity.CENTER);
textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);
























If you are trying to center text on a TableRow in a TableLayout, here is how I achieved this:



android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip" >
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_width="0dp"
android:layout_weight="100"
android:text="Your Text Here" />






















You cab also use combination:



android:gravity="left|center"


Then, if textview width is more than "fill_parent" the text will be still aligned to left (not centered as with gravity set only to "center").






















I used the android:gravity="center" and only in the view with :inputType="textPersonName" the text is center, the view with :inputType="number", the numbers are still flying to the top... :"(


Even iOS 3.0 was very good at things like this :"|

























In Relative layout, it will be nice with it. and another button and anything else you can add.



android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff314859"
android:paddingLeft="16dp"
android:paddingRight="16dp">
android:id="@+id/txt_logo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="your text here"
android:textSize="30dp"
android:gravity="center" />
...other button or anything else...



works nicely for me.






















I'm setting the height of the textview and can't get the text to center vertically. It stays at the bottom of the textview. Code is below but is not formatting correctly in this post (even though each line preceeded by 4 spaces).


Problem seems to be that I set textview layout_height to 20dp. If I change layout_height to wrap_content: the text does center vertically - but it's too high for my needs.


The textview is in a relative layout and has layout_centerVertical="true" and gravity="center_horizontal|center_vertical". I've also tried android:gravity="center" and tried omitting the centerVertical + many other options.

























This worked better for me: android:layout_gravity="center". The other way mentioned works but in a few test apps was being overriden. This worked better for me.






















you can just set the gravity of your textview into CENTER.






















just use android:gravity="center"

























You can set textview in horizontaly and vartically using below method. add one layout set the layout gravity horizontal and vertical and add the textview in that layout so you have textview in center horizontal and vartical




















default






.

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