Skip to main content

Home/ Android Dev/ Group items tagged To

Rss Feed Group items tagged

Kiran Kuppa

Google strengthens Android security muscle with SELinux protection | Ars Technica - 0 views

  •  
    The other big security enhancement introduced in Android 4.3 is a more robust way to store cryptographic credentials used to access sensitive information and resources. This means changes to the Android KeyChain, which stores digital certificates used to access Wi-Fi networks and virtual private networks used by large corporations and government agencies. With the keychain enhancements, the system-wide keys are bound to a hardware-based root of trust process devices that support this.The phone needs to have a secure element such as a Trusted Platform Module so that private keys can't be stolen even if the phone is rooted and the attacker has full access to the operating system. Phones that don't have this hardware capability will fall back to software protections for securing credentials.Enhancements to the Android Keystore, a similar resource that also stores credentials, allows users to create keys that can be accessed and used exclusively by a single application. Under version 4.3, "apps can create or store private keys that cannot be seen or used by other apps and can be added to the keystore without any user interaction A third enhancement is Android's ability to create secondary user profiles that implement fine-grained restrictions.
Vincent Tsao

How QR Codes Can Grow Your Business | Social Media Examiner - 1 views

  • Consumers want immediate access to what’s relevant and QR codes are being used to make that possible.
  • Bar codes are linear one-dimensional codes and can only hold up to 20 numerical digits, whereas QR codes are two-dimensional (2D) matrix barcodes that can hold thousands of alphanumeric characters of information. Their ability to hold more information and their ease of use makes them practical for small businesses.
  • When you scan or read a QR code with your iPhone, Android or other camera-enabled Smartphone, you can link to digital content on the web; activate a number of phone functions including email, IM and SMS; and connect the mobile device to a web browser.
  • ...4 more annotations...
  • There are other software companies that have created 2D codes that work much like QR codes, with Microsoft being the most notable.  Microsoft developed their own proprietary software to create codes known as MS tags.  Unlike QR codes, which can be read by a number of different readers, MS tags can only be read by the Microsoft Tag Reader.
  • Calls to Action – After building a community, the next logical step is to mobilize them to take action.   What are you trying to accomplish?  You can alternate special offers by simply linking your QR codes to new landing pages, and you can combine then with email opt-ins to build your list.
  • SEO and SMO – Earlier this month I wrote an article on social graphs where I discuss how web objects such as images, music clips, and videos add valuable content to your social graph.  QR codes enhance both your search engine and social media optimization.  Now you can increase traffic to those searchable objects to further optimize them by encouraging more sharing.
  • Social Proof – To help build a community offline, it can be helpful to use your vibrant online communities as social proof of your influence and expertise.  As one example, you can use QR codes to link to specific blog posts that have earned an abundance of activity.
Kiran Kuppa

A Visual Guide to Relative Layouts In Android » Mark Lapasa - 0 views

  •  
    " I will walk through the 4 kinds of Relative Layout use cases. 1.Target view position in relation to parenting View Group (i.e. a layout container) 2.Target view alignment in relation to parenting View Group 3.Target view position in relation to another View 4.Target view alignment in relation to another View We'll use Jack and Jill buttons to demonstrate this. The first two categories are in relation to a parent layout (Jack and the parent view group). The last two categories show laying out in relation to another View (i.e. Jack + Jill)"
Vincent Tsao

Avoiding Memory Leaks | Android Developers - 0 views

  • As part of my job, I ran into memory leaks issues in Android applications and they are most of the time due to the same mistake: keeping a long-lived reference to a Context.
  • There are two easy ways to avoid context-related memory leaks. The most obvious one is to avoid escaping the context outside of its own scope. The example above showed the case of a static reference but inner classes and their implicit reference to the outer class can be equally dangerous. The second solution is to use the Application context. This context will live as long as your application is alive and does not depend on the activities life cycle. If you plan on keeping long-lived objects that need a context, remember the application object. You can obtain it easily by calling Context.getApplicationContext() or Activity.getApplication().
  • In summary, to avoid context-related memory leaks, remember the following: Do not keep long-lived references to a context-activity (a reference to an activity should have the same life cycle as the activity itself) Try using the context-application instead of a context-activity Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside. The solution to this issue is to use a static inner class with a WeakReference to the outer class, as done in ViewRoot and its W inner class for instance A garbage collector is not an insurance against memory leaks
Vincent Tsao

Android Cloud to Device Messaging Framework - Google Projects for Android - 1 views

  • It allows third-party application servers to send lightweight messages to their Android applications. The messaging service is not designed for sending a lot of user content via the messages. Rather, it should be used to tell the application that there is new data on the server, so that the application can fetch it. C2DM makes no guarantees about delivery or the order of messages. So, for example, while you might use this feature to tell an instant messaging application that the user has new messages, you probably would not use it to pass the actual messages. An application on an Android device doesn’t need to be running to receive messages. The system will wake up the application via Intent broadcast when the the message arrives, as long as the application is set up with the proper broadcast receiver and permissions.
  • It uses an existing connection for Google services. This requires users to set up their Google account on their mobile devices.
  • C2DM imposes the following limitations: The message size limit is 1024 bytes. Google limits the number of messages a sender sends in aggregate, and the number of messages a sender sends to a specific device
  • ...1 more annotation...
  • The ClientLogin token authorizes the application server to send messages to a particular Android application. An application server has one ClientLogin token for a particular 3rd party app, and multiple registration IDs. Each registration ID represents a particular device that has registered to use the messaging service for a particular 3rd party app.
Kiran Kuppa

Android Cookbook: Home - 0 views

  •  
    "We are building a community-written web site which has also been used to create an O'Reilly Cookbook, both about how to build great Android applications. It is full of how-to information along with code snippets that illustrate the ideas presented. It features both how-to's that overlap with the official documentation, and material that goes beyond this to be more tutorial, more in-depth, or explaining "lessons from the trenches": what actually works to get the application functioning well. Unlike most books written by one, two or a few individuals, this one has input from dozens of contributors, who were all able to view and comment on each others' recipes before the book was published. The published version(s) include printed books, eBooks, and other uses"
Vincent Tsao

Android Developers Blog: Android Market Client Update - 1 views

  • The Android Market engineering team has been hard at work on improving the Android Market experience for users and developers. Today, I’m pleased to announce a significant update to the Android Market client. Over the next two weeks, we’ll be rolling out a new Android Market client to all devices running Android 1.6 or higher.This new Market client introduces important features that improve merchandising of applications, streamline the browse-to-purchase experience, and make it easier for developers to distribute their applications.
  • To make it easier for developers to distribute and manage their products, we will introduce support for device targeting based on screen sizes and densities, as well as on GL texture compression formats. We are also increasing the maximum size for .apk files on Market to 50MB, to better support richer games.
  • To streamline the browse-to-purchase experience, users can now access all the information about an application on a single page without the need to navigate across different tabs.
Kiran Kuppa

Tapping into Android's sensors - 0 views

  •  
    Android, a rich platform for application development, has an attractive set of user interface elements and data-management capabilities. Android also offers a healthy array of interfacing options. In this article, learn how to interact with Android's varied sensor options to monitor your environment. Sample code shows you how to record audio on an Android phone. Want to build your own baby monitor? Unlock your phone or a door with your own voice activation? Learn how to leverage the hardware capabilities of an Android-equipped device.
Vincent Tsao

Can I Use this Intent? | Android Developers - 0 views

  • This article describes a technique you can use to find out whether the system contains any application capable of responding to the intent you want to use. The example below shows a helper method that queries the system package manager to determine whether there's an app that can respond to a specified intent. Your application can pass an intent to the method and then, for example, show or hide user options that the user would normally use to trigger the intent.
  • /** * Indicates whether the specified action can be used as an intent. This * method queries the package manager for installed packages that can * respond to an intent with the specified action. If no suitable package is * found, this method returns false. * * @param context The application's environment. * @param action The Intent action to check for availability. * * @return True if an Intent with the specified action can be sent and *         responded to, false otherwise. */public static boolean isIntentAvailable(Context context, String action) {    final PackageManager packageManager = context.getPackageManager();    final Intent intent = new Intent(action);    List<ResolveInfo> list =            packageManager.queryIntentActivities(intent,                    PackageManager.MATCH_DEFAULT_ONLY);    return list.size() > 0;}
  • @Overridepublic boolean onPrepareOptionsMenu(Menu menu) {    final boolean scanAvailable = isIntentAvailable(this,        "com.google.zxing.client.android.SCAN");    MenuItem item;    item = menu.findItem(R.id.menu_item_add);    item.setEnabled(scanAvailable);    return super.onPrepareOptionsMenu(menu);}
Vincent Tsao

Is it possible to update a widget from an Activity? - Android Developers | Google Groups - 0 views

  • An AppWidgetProvider is a BroadcastReceiver. That gives you two possibilities right off the bat: 1. Have it also handle whatever other Intents you were planning on setting up with a separate BroadcastReceiver, or 2. Send an Intent from whatever component you want to the AppWidgetProvider. In other words, don't worry about trying to talk directly to the app widget (which I suspect is impossible) -- just talk to your code that already talks to the app widget.
    • Vincent Tsao
       
      good explanation
  • I update my widget from within my app, when I delete/add entries to a list. To do this, I have a method (updateWidget) and a static String (UPDATE_ACTION). My updateWidget() method sends a broadcast which is received by the widget class and then calls onUpdate() with the appropriate params: private void updateWidget() {                 Intent i = new Intent(this, TVWidget.class);                 i.setAction(TVWidget.UPDATE_ACTION);                 sendBroadcast(i);         } In TVWidget class: @Override         public void onReceive(Context context, Intent intent) {                 String action = intent.getAction();                 if (action != null && action.equals(UPDATE_ACTION)) {                         final AppWidgetManager manager = AppWidgetManager.getInstance (context);                         onUpdate(context, manager,                                         manager.getAppWidgetIds(new ComponentName(                                                         context, TVWidget.class)                                         )                         );                 }                 else {                         super.onReceive(context, intent);                 }         } This seems to work fine.
Vincent Tsao

The CommonsBlog - Activity or Notification via Ordered Broadcast - 0 views

  • I’ve run into the following generalized question a lot recently: I have an event that occurs in the background. I want to update my activity, if the activity is on the screen. Otherwise, I want to raise a Notification.
  • Hence, the recipe for the activity-or-Notification pattern is: Define an action string you will use when the event occurs that you want to go to the activity or notification (e.g., com.commonsware.java.packages.are.fun.EVENT). Dynamically register a BroadcastReceiever in your activity, with an IntentFilter set up for the aforementioned action string and with a positive priority (the default priority for a filter is 0). This receiver should then have the activity do whatever it needs to do to update the UI based on this event. The receiver should also call abortBroadcast() to prevent others from getting it. Be sure to register the receiver in onStart() or onResume() and unregister the receiver in the corresponding onStop or onPause() method. Register in your manifest a BroadcastReceiver, with an <intent-filter> set up for the aforementioned action string. This receiver should raise the Notification. In your service (e.g., an IntentService), when the event occurs, call sendOrderedBroadcast(). And that’s it. If the activity is on-screen, its receiver will be registered, so it will get the event, process it, and cancel the broadcast. If the activity is not on-screen, its receiver will not be registered, so the event will go to the default handler, in the form of your manifest-registered BroadcastReceiver, which will raise the Notification.
Vincent Tsao

Issue 1480 - android - Intent android.media.action.IMAGE_CAPTURE returns an image with ... - 0 views

  • On an HTC Hero, this EXTRA_OUTPUT doesn't even work. It doesn't put your picture in the file you specify, but it hands it to you thru a Mediastore uri. Apparently, the only way to get a full size picture is to do all camera handling in your app instead of using the IMAGE_CAPTURE intent.
  • I think Google have missed a trick on this one. They have defined standard intents for media capture, but not specified standard responses (ie. the "data" parameter in the onActivityResult Activity callback method). Other Android vendors (e.g. HTC Hero) have created their own Camera applications that handle the standard IMAGE_CAPTURE intent, but return different data & have different ways to save/return the image information. All I want is to be able to fire a IMAGE_CAPTURE intent from my own app, and get back a Uri reference to the captured image. Simple. I have no requirement to further manipulate the image .. I just need the Uri to store in my app's database for future reference.
Kiran Kuppa

Android: Dynamic and Custom Title Bars - 0 views

  •  
    Arguably the worst part in playing around with Android is its insistence to put that ugly title bar above everything I do as a default to Activities. Thankfully, the framework allows one to change this behavior.This post is going to explore the ways in which we can create custom title bars and more importantly just how far we can push the limits.
Kiran Kuppa

Android Essentials: Creating Android-Compliant Libraries - Tuts+ Code Tutorial - 1 views

  •  
    For a library to be compatible with Android, it can only reference classes available as part of Android and other classes implemented specifically in the library itself.Android Libraries can contain Java classes, resources, and other project information, but not assets. They can reference other libraries and leverage third party JAR files. They have Android manifest files just like regular Android projects. However, they differ from normal Android projects in an important way: they cannot be compiled into their own application packages or deployed onto devices. They can also not be exported as standalone JAR files. Once referenced from an Android project, the library components are incorporated into the Android application that references them at build time and added to the application package. There is no need to declare the component as the library classes are rolled into the APK directly. In terms of compatibility, the Android project must have an API Level higher than or equal to the API Level set in the Android library.
Vincent Tsao

Android Developers Blog: Twitter for Android: A closer look at Android's evolving UI pa... - 1 views

  • Additionally, you can feel free to use the Search bar selection mechanism as a replacement for tabs since it’s really just a fast pivot on a data set. If you have more than 3 data sets, tabs become problematic since no more than 3 can be onscreen at once. For example, look at how we implemented the Profile switching mechanism below:
  • The good news for developers is you get this highly functional contacts feature for free if users choose to sync contact information into your app
    • Vincent Tsao
       
      使用tab & pop-up window的方式来切换不同的数据集,作为tab的一种替换
  • The good news for developers is you get this highly functional contacts feature for free if users choose to sync contact information into your app. QuickContact for Android provides instant access to a contact's information and communication modes.
  • ...3 more annotations...
  • QuickActions can be used as a replacement for our traditional dialog invoked by long press.
  • The dashboard pattern serves as a home orientation activity for your users. It is meant to include the categories or features of your application. We recommend including an Action bar on this screen as well. The dashboard can be static or dynamic. For example, in the case of our dashboard for Twitter, we used the goodness of Live Wallpapers introduced in 2.1 to create an animated dashboard complete with real-time trend bubbles and the Twitter bird silhouette.
  • You keep a search history so users upon returning to the search activity can have quick one-button access to previous searches.
Vincent Tsao

How to update the GUI in Push/C2DM sample from advandroid book? - cw-android | Google G... - 0 views

  • > Now I just want to update the GUI from this method. > Can I somehow call a method in PushEndpointDemo.java? No, for two reasons: 1. Because C2DMReceiver is a manifest-registered BroadcastReceiver and therefore has no access to any activities 2. There might not be an activity, since you have no control over the timing of when the C2DM message is received (e.g., the user pressed BACK, the user pressed HOME) > Do I need a Broadcast Intent to do this? Possibly. -- If you want to update an activity or else ignore the message, have C2DMReceiver send out a private broadcast, picked up by a receiver registered via registerReceiver() in the activity -- If you want to update an activity or else raise a notification, have C2DMReceiver send out an ordered broadcast, as described here: http://commonsware.com/blog/2010/08/11/activity-notification-ordered-... -- If you want to update a database, call startActivity() on an IntentService, and have it do the database I/O, plus possibly broadcast an Intent to update an activity/raise a notification.
Vincent Tsao

How to implement a Button on an Android Widget - Stack Overflow - 0 views

  • I am just getting started with Android development and I have created a nice little widget that displays some info on my home screen. However, I now want to implement a Button on my widget that updates the info in my widget TextView.
  • Solved - I can confirm that an Activity is NOT needed if you want create a Button to update an Android AppWidget. I have been able to implement my AppWidgetProvider class such that it registers an android.appwidget.action.APPWIDGET_UPDATE intent-filter with the Broadcast receiver in the AndroidManifest.xml, which then fires the onUpdate event in the AppWidgetProvider class (which in turn then runs the UpdateService).
  • The UpdateService in my AppWidgetProvider class then uses onHandleIntent to run a private buildUpdate method - which registers the onClick event with a call to setOnClickPendingIntent as follows:
  • ...1 more annotation...
  • // set intent and register onclickIntent i = new Intent(this, MyWidget.class);PendingIntent pi = PendingIntent.getBroadcast(context,0, i,0);updateViews.setOnClickPendingIntent(R.id.update_button,pi);
Vincent Tsao

Android 2.1′s speech-to-text feature reviewed - it's "OK", just about » EuroD... - 0 views

  • Their conclusion is that Android 2.1′s new speech-to-text thing works, just about, although there’s a delay of a few seconds while the phone crunches your spoken words and tries to get the gist of what you’re saying – and a few errors sneak in, particularly when dealing with those smaller words we tend to hurry over. Basically, it looks like you have an awkward choice to make – speak your messages then spend a bit of time awkwardly tidying up the few errors that will inevitably sneak in, or carry on as normal with traditional text input methods.
Vincent Tsao

How to connect your Android phone to Ubuntu to do development, testing, installations o... - 0 views

  • $ sudo gedit /etc/udev/rules.d/99-android.rules
  • $ sudo restart udev
  • $ adb kill-server $ adb start-server
  • ...2 more annotations...
  • Add the following line to it and save it: SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1″, SYMLINK+=”android_adb”, MODE=”0666″
    • Vincent Tsao
       
      for Nexus one
  • $ lsusb
Vincent Tsao

Android Developer Income Report - 2 views

  • Moreover I am not one of top developers nor any of my apps have been promoted by Android Market. I am just an one among of thousands of Android developers with not to well known apps. And what may be really surprising all my apps are free as Google do not allow developers from my country (Poland) to sell apps via Android Market!
  • So keep in mind these facts: None of my apps has been ever promoted in Top of Android Market I am providing only free apps (mostly due of Android Market limitations) Even if I would be able to sell apps I would not use it as main income source… (I believe that you still can make more from ads…)
  • X-Ray Scanner (over 268 000 downloads) Cracked Screen (over 182 000 downloads) Virtual Drums (over 20 000 downloads) Daily Beauty Tips (over 11 000 downloads) Don’t push it (over 6 500 downloads) WP Stats (over 4 000 downloads)
  • ...2 more annotations...
  • I have started to learn Android Development on April 2010. My first application was ready to be published on May. And it bring me first few dollars… I was not satisfied as I have been expecting that this app (WP Stats) will be really popular… Unfortunately it wasn’t… Anyway I have published a few more apps that got a lot more popularity… So here is my total income breakdown: May 2010 – $4.92 June 2010 – $138.87 July 2010 – $538.26 August 2010 – $920.00 September 2010 – $1545.45 October 2010 – $1059.31
  • October looks to be lower in earning but it happened only because I have not been updating any of my apps in this month (I have been moving to new house and had no time for it…). So as you may see income has not been high on the begging but with each month with regular updates and new apps it has been growing very rapidly!
1 - 20 of 159 Next › Last »
Showing 20 items per page