Are you over 18 and want to see adult content?
More Annotations
A complete backup of https://controlplagasmallorca.org
Are you over 18 and want to see adult content?
A complete backup of https://pmdnews.lk
Are you over 18 and want to see adult content?
A complete backup of https://institute.org
Are you over 18 and want to see adult content?
A complete backup of https://roliboneno.tk
Are you over 18 and want to see adult content?
A complete backup of https://forsvaret.no
Are you over 18 and want to see adult content?
A complete backup of https://budapestbamako.org
Are you over 18 and want to see adult content?
A complete backup of https://barcelonaprofessionalsoccer.com
Are you over 18 and want to see adult content?
A complete backup of https://captainform.com
Are you over 18 and want to see adult content?
A complete backup of https://afbank.com
Are you over 18 and want to see adult content?
A complete backup of https://gamesapks.mobi
Are you over 18 and want to see adult content?
A complete backup of https://pamukkaletraverten.com
Are you over 18 and want to see adult content?
A complete backup of https://eicar.fr
Are you over 18 and want to see adult content?
Favourite Annotations
User Drivers - Hardware Drivers & Digital Devices Software Free Download
Are you over 18 and want to see adult content?
PeterStamenoff – Peter Stamenoff Design
Are you over 18 and want to see adult content?
Saskia Vola - Textmining, NLP and Elasticsearch consulting
Are you over 18 and want to see adult content?
Vehicle history check. Check your car VIN. For FREE!
Are you over 18 and want to see adult content?
Joel Media Ministry | das ewige Evangelium für Stuttgart, Deutschland und die Welt
Are you over 18 and want to see adult content?
Identity and security company Nexus Group
Are you over 18 and want to see adult content?
BloggingTek - Blogging Basics and Tutorials for Beginners
Are you over 18 and want to see adult content?
Text
WHAT IS USSD.?
USSD is a communication technology that is used to send text between a mobile phone and an application program(network operator) in thenetwork.
WHAT ARE USSD CODES.? USSD codes are used by network users to get usage infromation from the current operator. USSD codes start with *, preceeding with numbers and end up with #. Ex : *123# Different network operators have different USSD codes. Ex : *123# is used to get usage information for Airtel *111# is used to get usage information for Vadafone HOW DO WE GET THIS USSD INFORMATION IN ANDROID APPLICATION.? The below code will display a USSD popup, showing the balance information for the current sim // Get vadafone balance(*111*2for vadafone) private void dailNumber(String code) { String ussdCode = "*" + code + Uri.encode("#"); startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussdCode)));}
Add the following permission (to make a call) in the manifestSTEPS TO IMPLEMENT
1. Write a class named "XXXX" public class XXXX extends AccessibilityService { public static String TAG = "XXXX";@Override
public void onAccessibilityEvent(AccessibilityEvent event) { Log.d(TAG, "onAccessibilityEvent"); String text = event.getText().toString();if
(event.getClassName().equals("android.app.AlertDialog")) { performGlobalAction(GLOBAL_ACTION_BACK); Log.d(TAG, text); Intent intent = new Intent("com.times.ussd.action.REFRESH"); intent.putExtra("message", text); // write a broad cast receiver and call sendbroadcast() from here, if you want to parse the message for balance, date}
}
@Override
public void onInterrupt() {}
@Override
protected void onServiceConnected() { super.onServiceConnected(); Log.d(TAG, "onServiceConnected"); AccessibilityServiceInfo info = new AccessibilityServiceInfo(); info.flags = AccessibilityServiceInfo.DEFAULT; info.packageNames = new String{"com.android.phone"}; info.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED; info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC; setServiceInfo(info);}
}
2. Add an entry for the above service in the manifest android:name="android.accessibilityservice.AccessibilityService" /> // created below
/>
To run a accessibility service, user permissions are needed. The above xml is used to provide the necessary description to the user . 4. Now in your activity, invoke this startService(new Intent(this, XXXX.class)); dailNumber("*111*2"); 5. Launch your application. 6. After the launch, change the settings manually Setting->Accessibility Setting -> You can see a option 'your app name'. Turn it on. (This has to be done from as a part of application flow(not manual)) 7. Restart your application, and check the logs, that I wrote inService class
HAPPY TO SEE THE USSD LOGS.. CHEERS :) FEEL FREE TO ASK IF YOU FACE ANY DIFFICULTIES WITH THE ABOVEEXPLANATION..
PLEASE GIVE YOUR FEEDBACK ON THIS POST AS A LIKE, COMMENT, SHARE.. Posted by Unknown at11:15
137 comments:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
Home
Subscribe to: Posts (Atom)BLOG ARCHIVE
* ▼ 2015 (1)
* ▼ November
(1)
* How to read/parse USSD messages in Android .? Travel theme. Powered by Blogger .Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0