I used debug.keystore as well as a new keystore but i keep getting the same error. i saw numerous posts about this problem but could'nt find any solution.
this is my map.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="07QY1V71kePjxTjGCtnM7cgrccxWizYevUYKFig"
android:clickable="true" >
</com.google.android.maps.MapView>
</RelativeLayout>
this is my manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bombil.aawaz"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="10" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.bombil.aawaz.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.bombil.aawaz.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- Network State Permissions to detect Internet status -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<uses-library android:required="true"
android:name="com.google.android.maps"></uses-library>"
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.Registration"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name = "com.bombil.aawaz." />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.TraceLocation"
android:label="#string/app_name"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.TraceLocation" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.HelpMe"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.HelpMe" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity
android:name="com.bombil.aawaz.HelpAlert"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.HelpAlert" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<receiver android:name="com.google.android.gcm.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="com.bombil.aawaz" />
</intent-filter>
</receiver>
<service
android:name=".GCMIntentService">
</service>
<activity
android:name="com.bombil.aawaz.AlertWidget"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
>
<intent-filter>
<action android:name = "com.bombil.aawaz.AlertWidget" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
Thanks in advance..
Solved , debug key just works during debugging through eclipse , while when u want to use the apk u need to use release key. Also release key does'nt work in debugging mode.
Related
I can only get null for the messageType when I called the function gcm.getMessageType(intent) in the class which I extended the IntentService. I'm sure the intent parameter is the intent I received in your BroadcastReceiver.
In the page GCM returns a null message type they said the problem is more or less related to the manifest file, but I checked my file and could not find the reason. The example I use is from http://www.grokkingandroid.com/?s=gcm&x=0&y=0.
My AndroidManifest.xml is provided as below. Much appreciated if someone can help me to figure it out. I am stuck in this problem for several days.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.grokkingandroid.sampleapp.samples.gcm"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.grokkingandroid.sampleapp.samples.gcm.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.grokkingandroid.sampleapp.samples.gcm.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/gcm_demo_app_name"
android:theme="#style/DemoAppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.grokkingandroid.sampleapp.samples.gcm.GCMDemoActivity"
android:label="#string/gcm_demo_title_activity_gcm_demo" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.grokkingandroid.sampleapp.ACTION_START" />
<data
android:host="grokkingandroid.com"
android:path="/samples/gcm demo"
android:scheme="app" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.grokkingandroid.sampleapp.samples.alert.AlertListActivity"
android:label="#string/Emergency_warning" >
</activity>
<activity
android:name="com.grokkingandroid.sampleapp.samples.description.DescriptionActivity"
android:exported="false"
android:label="#string/gcm_demo_title_activity_description" />
<receiver
android:name="com.grokkingandroid.sampleapp.samples.gcm.GcmBroadcastReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.grokkingandroid.sampleapp.samples.gcm" />
</intent-filter>
</receiver>
<service android:name="com.grokkingandroid.sampleapp.samples.gcm.GcmIntentService" />
</application>
I build a push client app using Parse.com SDK.
I can receive push messages on Nexus 5 and 7 which both have Android OS v4.4.2.
But I can't receive push messages on older devices like Samsung Galaxy Ace (v2.3.5)
Here is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.me.myapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="9" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!--
IMPORTANT: Change "com.parse.starter.permission.C2D_MESSAGE" in the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
-->
<permission
android:name="com.me.myapp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.me.myapp.permission.C2D_MESSAGE" />
<application
android:name="WolApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.me.myapp.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<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" />
<!-- IMPORTANT: Change "com.parse.starter" to match your app's package name. -->
<category android:name="com.me.myapp" />
</intent-filter>
</receiver>
<receiver
android:name="com.me.myapp.MyCustomReceiver"
android:exported="false" >
<intent-filter>
<action android:name="com.me.myapp.UPDATE_STATUS" />
</intent-filter>
</receiver>
</application>
</manifest>
I'm using worklight for my mobile app project. My question is how to disable splash screen in android manifest?
This is my android manifest.
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rmbp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="18" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- Push permissions -->
<permission
android:name="com.rmbp.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.rmbp.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:debuggable="true"
android:icon="#drawable/icon"
android:label="#string/app_name" >
<activity
android:name="com.rmbp.rmbp"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.rmbp.rmbp.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Preference Activity -->
<activity
android:name="com.worklight.common.WLPreferences"
android:label="Worklight Settings" >
</activity>
<!-- Push service -->
<!--
In order to use the c2dm library, an application must declare a class with the name C2DMReceiver, in its own package, extending com.google.android.c2dm.C2DMBaseReceiver
It must also include this section in the manifest, replacing "com.google.android.apps.chrometophone" with its package name.
-->
<service android:name="com.rmbp.GCMIntentService" />
<service android:name="com.rmbp.ForegroundService" />
<!-- Only google service can send data messages for the app. If permission is not set - any other app can generate it -->
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.rmbp" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.rmbp" />
</intent-filter>
</receiver>
</application>
</manifest>
Check my repo: https://github.com/datomnurdin/worklight-mobile
Thanks a lot in advance.
Move this block:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.rmbp.rmbp.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
to the activity which you want to start first. Intent filter will mark this activity as default for start from launcher.
For example:
<activity
android:name="com.rmbp.SplashScreen"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/title_activity_splash_screen"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.rmbp.rmbp"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.rmbp.rmbp.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Im working on android map API and I got it working. The problem is when add a new activity (.ListActivity) and make it my Launcher the console is giving me an error "No Launcher found". Here is my code...
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.themap"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<permission
android:name="com.example.themap.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.themap.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my_key" />
<activity
android:name="com.example.themap.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.themap.ListActivity"
android:label="#string/title_activity_list" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</activity>
</application>
It has to be in an intent-filter together with the MAIN.
<activity
android:name="com.example.themap.ListActivity"
android:label="#string/title_activity_list" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
In your second activity addition you forgot to add intent-filter tags. that is why you are getting the error.
Change your xml file second activity addition as below.
<activity
android:name="com.example.themap.ListActivity"
android:label="#string/title_activity_list" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
tag is missing in com.example.themap.ListActivity
Also you have more than one android.intent.action.MAIN defined
This is defined in both your activities
Refer - http://developer.android.com/reference/android/content/Intent.html#ACTION_MAIN
Im using novoda project to use a jar gps locator (https://github.com/novoda/Novocation)
with so I keep on getting the same error on the manifest file -
"attribute is missing the android namespace prefix", Cant figure out why, ideas? thats a really big bummer since by the documentation and the sample app I can really use his gps locator...
Here Is my manifest file :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mappermate"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="13" />
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" >
</uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<uses-permission android:name="android.permission.CALL_PHONE" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" >
</uses-permission>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:name="com.mappermate.application.MappermateApp"
android:icon="#drawable/ic_launcher"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<uses-library android:name="com.google.android.maps" />
<!-- Uploader Activity -->
<activity android:name="com.mappermate.ui.phone.UploaderActivity" >
</activity>
<!-- Login Activity -->
<activity android:name="com.mappermate.ui.phone.LoginActivity" />
<!-- Register Activity -->
<activity android:name="com.mappermate.ui.phone.RegisterActivity" />
<!-- Authentication Activity -->
<activity android:name="com.mappermate.ui.phone.AuthenticationActivity" />
<!-- Exit Activity -->
<activity android:name="com.mappermate.ui.phone.ExitActivity" />
<!-- Main Menu Activity -->
<activity android:name="com.mappermate.ui.phone.Delete_MainMenuActivity" />
<!-- Preferences Activity -->
<activity
android:name="com.mappermate.ui.phone.PreferencesActivity"
android:theme="#style/PreferencesTheme" >
</activity>
<!-- My Location Activity -->
<activity
android:name="com.mappermate.ui.phone.MapperMateScreen"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="com.novoda.location.receiver.ActiveLocationChanged" >
<intent-filter>
<action android:name="com.novoda.location.ACTIVE_LOCATION_UPDATE_ACTION" />
</intent-filter>
</receiver>
<receiver android:name="com.novoda.location.receiver.PassiveLocationChanged" />
<receiver
android:name="com.novoda.location.receiver.RestorePassiveListenerOnRestoredConnectivity"
enabled="false" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<receiver android:name="com.novoda.location.receiver.StopPassiveLocationUpdatesOnLowBattery" >
<intent-filter>
<action android:name="android.intent.action.BATTERY_LOW" />
<action android:name="android.intent.action.BATTERY_OKAY" />
</intent-filter>
</receiver>
<receiver android:name="com.novoda.location.receiver.RestorePassiveListenerBoot" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
What I can see wrong is
enabled="false"
needs to be
android:enabled="false"
In addition, you need to add
</manifest>
at the end of your manifest.