<activity android:name=".PackageInstallerActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content" />
<data android:scheme="file" />
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConfigurableWidgetConfigureActivity extends Activity { | |
int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID; | |
private EditText etUrl; | |
private Button btAdd; | |
private AppWidgetManager widgetManager; | |
private RemoteViews views; | |
@Override | |
public void onCreate(Bundle icicle) { | |
super.onCreate(icicle); |
Before we start writing our first UI test I want to describe our development process.
- First, we write a test for a UI or logic that does not yet exist.
- We expect to see build errors or failed tests.
- Then we create a UI element or write program logic.
- Finally, we run the test and make sure it passes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |