I’ve been able to integrate Google Analytics into my Android app, but am stuck with campaign tracking. In GA, I see page views, events, and custom variables, but campaign referrals never appear. Is there an additional step that is not documented at code.google.com/mobile/analytics/docs/android? like additional permissions specific to referals? Could be something obvious that I should know, I'm new to Android. Here’s my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mytestapp.ga"
android:versionCode="4"
android:versionName="4.0">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="#drawable/icon"
android:label="#string/app_name">
<activity android:name="com.mytestapp.ga.MyActivity"
android:launchMode="standard">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Used for install referrer tracking -->
<receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
Try testing it out:
https://developers.google.com/analytics/solutions/testing-play-campaigns
And then look at the troubleshooting section if it doesn't work. One thing I forgot was to add the bits of java code. I sortof missed the part where you have to get Google Analytics in general to work first, but it sounds like you have that part covered.
Related
So, I made an update in my android app and uploaded the new APK file in the console. Unfortunately, I got this after a few hours
I am using firebase, so maybe that's why I get this problem. Here is my manifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="theodosios.tziomakas.news">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher_foreground"
android:label="#string/app_name"
android:largeHeap="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<!--Disable Analytics collection -->
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />
<activity android:name="theodosios.tziomakas.news.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="theodosios.tziomakas.news.StartActivity"
/>
<activity
android:name="theodosios.tziomakas.news.RegisterActivity"
android:parentActivityName="theodosios.tziomakas.news.StartActivity" />
<activity
android:name="theodosios.tziomakas.news.LoginActivity"
android:parentActivityName="theodosios.tziomakas.news.StartActivity" />
<activity
android:name="theodosios.tziomakas.news.ForgotPasswordActivity"
android:parentActivityName="theodosios.tziomakas.news.LoginActivity" />
<receiver android:name="theodosios.tziomakas.news.widget.NewsAppWidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/news_app_widget_info" />
</receiver>
<service android:name="theodosios.tziomakas.news.widget.UpdateNewsWidgetService" />
<service
android:name="theodosios.tziomakas.news.widget.GridWidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<activity
android:name="theodosios.tziomakas.news.DetailActivity"
android:parentActivityName="theodosios.tziomakas.news.MainActivity" />
<provider
android:name="theodosios.tziomakas.news.data.FavouriteProvider"
android:authorities="theodosios.tziomakas.news"
android:exported="false" />
<activity
android:name="theodosios.tziomakas.news.FavouriteNewsActivity"
android:parentActivityName="theodosios.tziomakas.news.MainActivity" />
<activity android:name="theodosios.tziomakas.news.CommentActivity" />
</application>
Make sure you follow these policies listed here link
Also read all these and make change to your app if you app did not follow any of these policy link
As in the email they do not mention the reason for rejection clearly. So you have to hit and try what changes you made in this app which are agains the policy.
Before submiting another update check your dashboard of that app, if previous app is still under processing or not. If it is still under update process. Do not submit another update. Wait for sometime to reflect some changes.
After making changes in your app after reading the policies then make new update. Now after update rejection this new update will take 7 to 10 days. Be calm and have patience.
Bonus tip: Also make sure your app store listing do not go against any policy. SO make sure you are not using any icon, discription or short discription which are related to any brand like youtube, facebook, whatsapp any brand name should not be there. Also your long discription should be readable like a normal paragraph and it should not be spammy which is filled with full of tags only.
I've read countless StackOverflow posts, answers and the Android documentation. Yet. I still can't wrap my head around how to achieve the following.
I wish to make an app, the does something when a new SMS text is received, regardless, if the app itself, is in the foreground (user is currently in the app using it), is in the background (user switched to another app but the app is still open so to speak) or closed (user has for example restarted the phone and not opened the app since restart).
I have a broadcast receiver with permissions, but the app only works if the app is in the foreground or the background. If the app is closed, it does not do anything when a SMS is received.
The term background app, "long running background service" etc. in android terminology is confusing and is probably the reason why I haven't figured out what it is I am looking for. Perhaps if someone could explain the three states proper naming or explain how to do what I wish to achieve that would be dandy!
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="10000"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:enabled="true"
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name="com.tns.NativeScriptActivity"
android:label="#string/title_activity_kimera"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
android:theme="#style/NoActionBar">
<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="#style/AppTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.tns.ErrorReportActivity"/>
<receiver
android:name="io.basickarl.passer.HandleSMS" android:exported="true" android:enabled="true">
<intent-filter android:priority="2147483647">
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
</application>
</manifest>
I know it is a redundant question but I tried to solve the problem but with no success.
I published an App in Google Play Store a week ago. But I'm still not able to find it in the search. I tried to search by App name, package name and by the developer name and it is not there. When I click on the developer name I get only my other App. The App name is not in English and there are few apps have similar keywords. I have contact Google but I didn't get any result till now. Any suggestion about how to track such an issue? Should I change package name or delete the App and republish it?
I can only access to my App using the URL that is provided in the Google Play Console.
Here is the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="-----------">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<application
android:name=".PUSH_UP_NOTIFICATION"
android:allowBackup="true"
android:icon="#mipmap/doc_luncher_icon2"
android:label="#string/app_name"
android:roundIcon="#mipmap/doc_luncher_icon2_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".State_Activity" />
<activity android:name=".GetDoctorInfoActivity" />
<meta-data
android:name="com.parse.SERVER_URL"
android:value="#string/back4app_server_url" />
<meta-data
android:name="com.parse.APPLICATION_ID"
android:value="#string/back4app_app_id" />
<meta-data
android:name="com.parse.CLIENT_KEY"
android:value="#string/back4app_client_key" />
<meta-data
android:name="com.parse.push.gcm_sender_id"
android:value="id:-------" />
<activity android:name=".ViewDoctors" />
<activity android:name=".SignUpActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".DoctorManagingActivity" />
<activity android:name=".GetAppointmentActivity" />
<activity android:name=".ShowPatientQueue" />
<activity android:name=".SearchForDoctorActivity" />
<activity android:name=".AboutActivity" />
<activity android:name=".ContactUsActivity" />
<activity android:name=".PatientAppointmentsActivity" />
<service android:name="com.parse.PushService" />
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="---------------" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.OPEN" />
<action android:name="com.parse.push.intent.DELETE" />
</intent-filter>
</receiver>
<activity android:name=".ResetPasswordActivity" />
</application>
</manifest>
I'm using Parse and Firebase for push notification, so most of the Permissions are for them.
If you can't find it with this link (add your application id at the end of it)
https://play.google.com/store/apps/details?id=[APPLICATION_ID]
Than you have not published your app correctly.
Go to the play store console -> all apps and check if "published" is mentioned on the right side of your app entry.
Also go to the release dashboard and check what is mentioned there.
Finally check if you missed something by going through that checklist here: https://developer.android.com/distribute/best-practices/launch/launch-checklist
It is possible that you simply forgot to configure some stuff like age restrictions etc
For those who may face the same issue and avoid asking to not get negative rating!
Here is how I have solved mine:
I have contacted Google support several times, and I have received several premade emails about new Apps with low ranking and needing time . However, I insisted that it is not the case, so the support team has escalated the problem to their engineers ("as they said"). After couple of days I get this email from them:
Hi again,
Thanks for your patience while our team investigated this issue.
I received word today to ask you to do the following for your app:
Select the app in the Play Console Navigate to Store Presence >
Pricing & Distribution Click "Manage countries" Scroll to the bottom
and un-check "Rest of the world" Re-check "Rest of the world" Click
Submit Update
Once you've done this for all four apps, they should start to show up
in search results again within a few hours.
And after following the instruction, now I can find my app as first in the search result.
I am making an app that communicates with a piece of usb hardware made by my company (this is the only app allowed to talk to the usb accessory, it's not a public api). I am having difficulties setting up the proper launch modes in the manifest.
There are three components to the app: the main activity, a login activity, and the USBService.
I'm assuming the intent for the main goes to the login activity, and the intent for the usb goes to the USBService, but I am not sure if I do this, will this start the service if the app is not running? More over, if it does, how do I fetch an already existing service?
What type of structure should I be looking at for the manifest file? (specifically, intent-filters, and appropriate launch modes... I've read a few documents about the launch modes but I am still not sure I quite understand... There should only ever be at most one instance of each activity/service, and they need to communicate together.
edit: it is not necessary for communications to start before the app is open, nor is it necessary to launch the app automatically when the usb is connected.
edit: my manifest as it stands, looks like:
<uses-feature android:name="android.hardware.usb.accessory" />
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name="mainpackage.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="#xml/accessory_filter" />
</activity>
<activity
android:name="mainpackage.LoginActivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="adjustResize|stateVisible" >
</activity>
<service android:name="updater.USBService"
android:exported="false" >
<!--
-->
</service>
</application>
in your manifest add
<manifest ...>
<uses-feature android:name="android.hardware.usb.host" />
<uses-sdk android:minSdkVersion="12" />
In this case, the following resource file should be saved in res/xml/device_filter.xml and specifies that any USB device with the specified attributes should be filtered:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<usb-device vendor-id="1234" product-id="5678" class="255" subclass="66" protocol="1" />
</resources>
Hope this help.
Your manifest looks good,
I think you make a good choice for putting the intent-filter "android.hardware.usb.action.USB_ACCESSORY_ATTACHED" in the mainActivity and start the application in this activity,
and again I think it's a good choice to start your mainActivity in SingleTop launch mode,
because if an instance of the mainActivity already exists at the top of the current task, the system going to launch this activity, no new instance of this activity will be created.
For a best understanding of the different launch mode available in android,
I think this link may help you :
http://www.intridea.com/blog/2011/6/16/android-understanding-activity-launchmode
To make a long story short I think you'll be all set with this manifest as is.
To Use Android Devices min SDK version should be set to 12 and need to declare following line in AndroidManifest.xml file
<>
<uses-sdk android:minSdkVersion="<version>" />
...
<application>
<uses-library android:name="com.android.future.usb.accessory" />
<activity ...>
...
<intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="#xml/accessory_filter" />
</activity>
</application>
I want to use map activity in my application, I don't know how to deal with Google Map API v2.
How to generate an API key and All? Right now my application is not working with normal intent code.
Intent intent = new Intent(this,GeoMap.class);
startActivity(intent);
Android manifest entry like this
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity android:name=".HomeTab" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".HomeActivity" />
<activity android:name=".SearchActivity" />
<activity android:name=".GeoMap" >
</activity>
</application>
</manifest>
please help me.
Thank you.
Before asking something I think you should check the FAQ.
When you ask something ask Google first,it should give you some answer.
Anyways check this step by step tutorial for MAP API V2: Google Maps API v2 for Android
And for obtaining an API Key this simple tool might help you:
JavaKeytoolGUI Beta 2