Google Analytics blocks Android App

i had similar i removed the below code and application runs.. <meta-data android:name=”com.google.android.gms.analytics.globalConfigResource” android:resource=”@xml/analytics_global_config” /> and add following code for getTracker class… build the GoogleAnalytics using java code rather than XML approch synchronized Tracker getTracker(TrackerName trackerId) { Log.d(TAG, “getTracker()”); if (!mTrackers.containsKey(trackerId)) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(this); // Global GA Settings // <!– Google Analytics SDK … Read more

How to use the new Android M feature of “Text Selection” to be offered from outside of your app?

First, to clarify the question: On an M emulator, if you highlight text, you will see the new floating action mode. If you click the overflow icon, you will see “API DEMOS” show up: Clicking that brings up an activity from the API Demos app, showing the highlighted text: Replacing the value in the field … Read more

Create System Application

Ok, I think that I find sollution from great xda developers: http://forum.xda-developers.com/showthread.php?t=1776095 here is full description how to obtain access to apps signed by platform keys. Do you apply with this approach? PS it is interesting that users from stack instead of investigating hard problem immediately say that you can not solve it, then reduce … Read more

Start activity on boot

Try this: 1] In AndroidManifest.xml file: <uses-permission android:name=”android.permission.RECEIVE_BOOT_COMPLETED” /> <application … <receiver android:name=”.StartMyActivityAtBootReceiver” android:enabled=”true” android:permission=”android.permission.RECEIVE_BOOT_COMPLETED” > <intent-filter> <action android:name=”android.intent.action.BOOT_COMPLETED” /> <category android:name=”android.intent.category.DEFAULT” /> </intent-filter> </receiver> </application> 2] Inside BroadcastReciever class with StartMyActivityAtBootReceiver as class name. @Override public void onReceive(Context context, Intent intent) { Intent i = new Intent(context, MainActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); } This worked for … Read more

How to run an activity only once like Splash screen

This is how I achieved it!Hope it helps! import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; public class check extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); SharedPreferences settings=getSharedPreferences(“prefs”,0); boolean firstRun=settings.getBoolean(“firstRun”,false); if(firstRun==false)//if running for first time //Splash will load for first time { SharedPreferences.Editor editor=settings.edit(); editor.putBoolean(“firstRun”,true); editor.commit(); Intent i=new … Read more

Capture media button on Android >=4.0 (works on 2.3)

Make sure that you have an activity in your app, and that the user runs this activity before attempting to press that button. Until then, your <receiver> will not receive any broadcasts. UPDATE On Android 4.0 and higher, it appears that you also need to call registerMediaButtonEventReceiver() on AudioManager in order to receive the events. … Read more

Launcher icon missing in Android

The problem is <data android:scheme=”linkedinapp” android:host=”connect” /> , you cannot logically use this tag in launcher activity, See below line , I taken from http://blog.marcingil.com/2011/03/starting-android-application-from-browser-uri/ Set if the activity should be an option for the default action (center press) to perform on a piece of data. Setting this will hide from the user any activities … Read more