Android :: Retrieving Data From USSD Command

May 17, 2009

I want to call a USSD (http://en.wikipedia.org/wiki/USSD) command and have the reply returned as a String. I can make the device automatically dial the USSD - like so

// String encodedHash = Uri.encode("#"); String ussd = "*" + encodedHash + "105" + encodedHash; startActivityForResult(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussd)), 1); //

This calls the USSD and the result is displayed in an alert menu generated by the OS dialer. There's no way that I can see to intercept the USSD reply, prevent the dialer displaying it, and then use the result as a String. Essentially, all I really want to do is (pseudo code) // String ussdReply = call("*#105#"); // I've tried creating an "onActivityResult" but it never receives anything from the startActivityForResult. So, does anyone know how I can use the reply within an application?

Android :: Retrieving data from USSD command


Android :: Programmaticaly Divert A Call By Sending USSD Command?

Dec 17, 2009

Can any one tell me how to programmaticaly divert a call on particular number by

sending the USSD command.eg, to divert a call on the number-123456789 we dial

*122*123456789#. it divert the call on to the 123456789.

View 2 Replies View Related

Android :: Retrieving Data From The Database

Jul 10, 2009

I created the following method for retrieving stored settings from the database:

public String getEntry(long rowIndex){
String value = "";

Cursor c = db.query(DATABASE_TABLE, new String[] {KEY_NAME, VALUE}, KEY_NAME + "=" + rowIndex, null, null, null, null);
int columnIndex = c.getColumnIndex(VALUE);
int rowsCount = c.getCount();
if(rowsCount > 0){
String value = c.getString(columnIndex);
}

return value;
}

On debugging I can see cursor c contains two columns and one row but when it comes to line

String value = c.getString(columnIndex);

it throws the CursorIndexOutOfBoundsException although columnIndex = 1 which should point to a valid entry. Does anyone know what could be wrong here?

View 3 Replies View Related

Android :: Retrieving Data From Portrait To Landscape

Feb 18, 2010

For changing from portrait to landscape mode i have done some changes in manifest.xml and included some code in test.java file

In manifest.xml i have included <activity_name android:configChanges="orientation"/>

i entered some data in portrait mode. but when i rotate my mobile from portrait to landscape the control goes to onConfigurationChanged() method.

public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setContentView(R.layout.screen1_landscape);
}

View 3 Replies View Related

Android :: AppWidget Retrieving Data From Another Application

Apr 30, 2010

I have an AppWidget which provides a summary of some data stored and controlled by my main Application. (In a similar way to a Calendar AppWidget showing the next event from the main Calendar application). I want to know the best practice for retrieving the data to update my widget. I have followed the example, and I have extended AppWidgetProvider and have a working widget, onto which I can update. I would expect to read the data from my main application and then update it via my AppWidgetProvider's onUpdate() routine.

Now, is the best practice here for my separate main application to provide the data via a ContentProvider? I assume so, as my Appwidget is not part of the same application. Is it possible to access a ContentProvider inside my onUpdate() routine? Before writing my main application content provider I started to test out retrieving some available data like Contacts information, and showing say a contact name in my widget, to show I can extract data from an existing ContentProvider. When accessing the Contacts contentprovider, the examples talk about:

1) Activity.managedQuery(), but my AppWidget is not an activity. 2) ContentResolver.query(), but I can't work out how to get a valid ContentResolver so I can access the Contacts. getContentResolver() does not appear to be defined for AppWidgetProviders. Am I approaching this the correct way?

View 3 Replies View Related

Android :: SQLlite Crashes After Try To Retrieving Data

Jun 6, 2010

I'm kinda new to android programming so please bear with me. I'm having some problems with retrieving records from the db. Basically, all I want to do is to store latitudes and longitudes which GPS positioning functions outputs and display them in a list using ListActivity on different tab later on. This is how the code for my DBAdapter helper class looks like:

public class DBAdapter
{
public static final String KEY_ROWID = "_id";
public static final String KEY_LATITUDE = "latitude";
public static final String KEY_LONGITUDE = "longitude";
private static final String TAG = "DBAdapter";....................

View 4 Replies View Related

Android :: Retrieving Data From Webserver Using Json?

Sep 10, 2010

Retrieving data from the webserver using json

View 2 Replies View Related

Android :: Retrieving Json Data Into List View

Apr 30, 2010

I want to retrieve the data from the url(http://www.sumasoftware.com/ alerts/GetAlerts.php) and parse the data. The data should be inserted to a list view showing alert text and the corresponding date. I have done this using a text view. But cant figure out how to display using list view... Plz help me out. I'll be grateful if anyone could provide some sample code too...

View 12 Replies View Related

Android :: Error When Retrieving OData Data While Using OData4J

Nov 2, 2010

I am trying to use OData4J to retrieve a list of Users from the StackOverflow OData service (onto an Android 2.1 device), but it isn't working.

public static Enumerable<OEntity> getUserInfo() {
ODataConsumer c = ODataConsumer.create("https://odata.sqlazurelabs.com/OData.svc/v0.1/rp1uiewita/StackOverflow/");
return c.getEntities("Users").execute();

I think it is unable to retrieve data from the URL. Any ideas why this would be? Is there anything wrong with my code?

View 1 Replies View Related

Android :: Retrieving And Parsing ICal Data Over HTTP

Jan 23, 2010

I am making an application that asks the user for userid, appends the userid to a static HTTP link to retrieve the user's daily schedule info file that has a .ical (calendar) extension. I need to read the data from file, format in new UI and representing some useful data on an Android device. My query is can I access a static HTTP link behind the scenes? And when I use the same link on desktop browser, it asks user to save the file — how can I do this on a mobile? Do I need to read the data and save it somewhere or I can save the .ical file and read from it?

View 2 Replies View Related

Android :: Code Samples About Writing And Retrieving Data From Website?

Mar 9, 2009

Was just wondering if anyone had any code samples about writing and retrieving data from a website? I am currently creating an application which populates its textviews by accessing information from an online source.

View 8 Replies View Related

General :: Retrieving Google Keep Data

Aug 20, 2013

I have the following issue; a couple of months ago i had a Desire z (happy HTC One owner now) but it fell and it broke. Or atleast the phone itself/ screen does nothing. However i can hook the phone up to my pc and its get recognized and i can browse the phone with the command prompt.

My phone broke while i was on a trip in Thailand and unfortunately the info (email adresses from new friends) that i typed into google keep that night had not been synced yet...

I would very much like to get this info off of my phone and read it or transfer it to my new phone or something (reading it on the pc has my preference as my HTC One is not rooted).

View 2 Replies View Related

Android :: ADB Rejected Shell Command - Ls -l /data

Feb 10, 2010

I keep getting

ADB rejected shell command (ls -l /data):

And the command prompt when running adb shell tells me error: device not found although the emulator is open.

View 1 Replies View Related

Android :: Dial A USSD Code?

Jan 23, 2009

When I dial a divert number directly from the handset it works. For example: **004*+668190099# sets up my call forwarding to the number +668190099

However, when I try to do the same thing from within an application I get a problem. The number displayed in the dialer is missing the ending #.

CODE:....................

Is this a bug or is there some other reason it wont let me dial a ussd code?

View 5 Replies View Related

General :: ADB Shell Command - Wipe Data

Jun 2, 2014

I pushed + and power the red triangle pops i went to adb devices it showed the devices on recovery mode. Is there a command that i can put to wipe data? Such as adb shell command.

View 1 Replies View Related

General :: How To Prevent USSD Message From Being Sent

Jun 8, 2014

I've just bought an Android phone (JIAYU F1 - link here), and it's really great.

Thing is, I have special SIM from my carrier, that allows me to use only certain models of phones, and not others.
I moved the SIM from the old phone to the new one - and for the first 10 second - it was great.

I could dial numbers, and recive call from other phones. BUT - after like 10 sec's or so - I saw the words "USSD sent" on the screen, some blank message appears, and since I clicked OK (no other choice...) - I couldn't make and receive any calls.

My guess is that this "USSD message" is responsible for the whole mess, reporting to my carrier which phone model using the SIM right now. This is why I want to find a way to prevent it to be sent to my carrier.

View 1 Replies View Related

General :: Sending USSD Logcat Included

May 5, 2014

I have LG optimus LTE 2 (F160K) and I have got problem while sending USSD code error "Connection problem or invalid MMI code".

As I see from another users it must be working. Tried flashing stock and many other roms but still no luck.

Logcat is included in the atachment.

View 1 Replies View Related

Samsung Galaxy S :: USSD Codes Not Running / Make Them Able?

Nov 9, 2010

1. I am not able to run USSD codes on my GalaxyS-I9000. Whenever I dial any USSD it says "USSD Code Running" and then it disappears, nothing happens after this.
2. Every time after I hung up a call in my old cell/any other cell it use to show the balance amount I have (prepaid card) and last call cost, but in my GalaxyS its not showing anything after the call.

View 2 Replies View Related

General :: Motorola XT800 USSD Request Failure

Mar 1, 2013

I have been trying to send ussd request for balance check and sms bundle but the call disconnects when I do. This problem is really getting annoying I have been trying to fix it but can't do it. I have master rested my phone twice but the problem remains my Android version is 2.2.

View 2 Replies View Related

Samsung Captivate :: Wifi - Error 'mmc1 Got Command Interrupt 0x00060001 Even Though No Command Operation Was In Progress

Sep 6, 2010

I have a rooted samsung captivate with sideloading enabled. After experimenting with different wifi tethering apps from the unofficial market, I began experiencing difficulties with my wifi connection. Even after uninstalling every app that I thought was changing the wifi state, the problem still persists. I can turn on the wifi and it will act normally for about 30 seconds before turning off without user intervention. In dmesg, the error is as follows: 'mmc1: Got command interrupt 0x00060001 even though no command operation was in progress.' Is this caused by an app or is this a more complicated problem?

View 15 Replies View Related

Android :: Retrieving Live Scores

Sep 1, 2010

How would I go about collecting the latest Live NFL/Soccer scores? Are there open API's available for this?

View 1 Replies View Related

Android :: OnListItemClick With Mulitple Value / Retrieving Value

May 22, 2010

I am trying to retrieve the 2nd value from a Arraylist/ArrayAdapter that I have populated. I am new to Array so please correct me if I am wrong

Q1. I created the Array Favorite. What I think what I created is an Array with two set of value call Detail | Value. example Detail="Yasmin",Value="8". Is this correct?

Q2. I have assign the Favorite Array to the mFavlist listview. During the OnItemClick I can return the label "Yasmin" by the position of the listview. What I would like to do is return the value of "8". What would be the best way to do this?

import java.util.ArrayList;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.AdapterView.OnItemClickListener;...................

View 1 Replies View Related

Android :: Using Listpreference And Retrieving Key String

Mar 23, 2010

I have a settings menu that pops up and in it is a listpreference type menu. It is associated with a settings.xml file where there are 'array-strings' within it. It all works good but I don't know how to retrieve the users preference. As an example, let's say the user picks a color (red, green, or blue). The list that I've made within my 'array-strings' contain the text red, green, and blue. Within my code, I would like to do something if the user has choosen red, something else if they choose blue, etc., etc. Would I use a 'case' statement or an 'if' statement? And most importantly, how would I retrieve the users preference - the key? (am I checking for a boolean?)

View 2 Replies View Related

Android :: Retrieving XML Document From Web Service

Jul 30, 2010

I am trying to retrieve a XML document from web service. I am passing a soap object with a token implementing the OAuth concept and retrieving the data. But the data does not turn out to be in XML format. It contains a curly braces in the place of start tag and semicolons when it ends. Is there any way to retrieve the document in XML format as such?

View 17 Replies View Related

Android :: Retrieving Previously Purchased Apps

Nov 28, 2009

I just bought the app Avanced Task Killer for my moto cliq, great app by the way. But I'm going to return and exchange the phone for a new cliq or a mytouch because of some touchscreen issues. I was just wondering if I get a new phone will I be able to retrieve my purchased apps even if I change my phone to a mytouch?

View 3 Replies View Related

Android :: Retrieving XML / Stream From HTTP (Parsing XML)

May 4, 2010

What are the best practices parsing XML from an HTTP resource in Android? I've been using HttpURLConnection to retrieve an InputStream, wrapping it with a BufferedInputStream, and then using SAX to parse the buffered stream. For the most part it works, though I do receive error reports of SocketTimeoutException: The operation timed out or general parsing error. I believe it's due to the InputStream. Would using HttpClient instead of HttpURLConnection help? If yes, why? Should the stream be output to a file, having the file parsed instead of the stream?

View 1 Replies View Related

Android :: Mediaplayer - Retrieving After Starting A New Activity

Feb 1, 2009

I'm using a mediaplayer to play a sound file, when you leave the application the sound continues in the background, which is the desired behaviour.

However, when the app is resumed, the mediaplayer isn't retrieved, so hitting pause just starts a new player so now there are two sounds playing.

Is the mediaplayer a type of service? How can I access the original player again?

View 3 Replies View Related

Android :: Retrieving EditText Field From Alertdialog?

Nov 16, 2009

I am facing some not understandable error. Could anybody help to put light on it.... The variable edtTxt is returning null and encoutering nullpointer exception while I am trying to run and entered text in the txt_edit field.

Here is the code....................

View 2 Replies View Related

Android :: How To Retrieving Image From Sd Card In Droid

Mar 11, 2010

How can I retrieve the last image in the SDcard.

View 1 Replies View Related

Android :: Retrieving Records From A Created Database And Put It In Spinner

Jun 18, 2009

I created a database with records in it and everything. I am trying to use its fields and put it in a spinner. The database contains university names.

I created a spinner with:

CODE:............

where I am feeding the spinner the records from an array. I want to do it from the database that I created. I read thru the classes and there are 2 ways but I can't find a proper code to use any of them. I just want to insert the code to get records from the database. It shouldn't be complicated is it?

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved