how to add my application inside launcher app? - android

im using my own launcher i take this launcher app from github https://github.com/strider2023/Black-Launcher--Android- is install launcher in phone but i also wants to add my application in launcher so when launcher install my application also install inside launcher and automatically my app start after launcher start. this is launcher manifist file below my appplication class file is MainActivity.java how do i start my application after start launcher???
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.touchmentapps.black"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15"/>
<permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal" />
<permission
android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"/>
<permission
android:name="com.android.launcher.permission.READ_SETTINGS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"/>
<permission
android:name="com.android.launcher.permission.WRITE_SETTINGS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="normal"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.BIND_APPWIDGET" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:hardwareAccelerated="true"
android:largeHeap="true">
<activity
android:name=".BlackLauncherActivity"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:windowSoftInputMode="adjustPan"
android:theme="#style/Theme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY"/>
</intent-filter>
</activity>
<activity android:name=".Activity2"/>
</application>
</manifest>

As far as i understand your question, you want to see your app displayed in the launcher ?
This is related to intent-filters : http://developer.android.com/guide/components/intents-filters.html
Black launcher looks for applications that are flagged as being "LAUNCHER" applications. As you can see in their code here : https://github.com/strider2023/Black-Launcher--Android-/blob/master/Black%20Launcher/src/com/touchmentapps/black/functions/AppInfoHandlerFunctions.java
You have to add your activity tag in your Manifest file and include the LAUNCHER category.
<activity
android:name=".MyActivity"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:windowSoftInputMode="adjustPan"
android:theme="#style/Theme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Related

Android - application not found error for some users after update

I have an android app on play store. I just released a new version but some of users report that after update they cant open application because they get application not installed error but they can open application through market by touching on open button. On new version i used same .jks file, I changed AndroidManifest.xml because i wanted to change main activity from .MainActivity to .Landing so mainActivity is no longer main. Maybe problem happens because of that? By the way not all users effected from this problem. Here is old and new AndroidManifest files and could you please check these files? Maybe another row cause that problem?
Solitions;
- Some users restart their phone and it works
- But some users cant fix by restarting their phone, so they remove and install again to fix it
But why this happens to some users?
OLD AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.example"
android:versionCode="9"
android:versionName="2.0.0"
android:installLocation="internalOnly"
>
<uses-sdk android:minSdkVersion="10" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="com.test.example.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.test.example.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
>
<!--This meta-data tag is required to use Google Play Services.-->
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<activity android:name=".MainActivity" android:label="#string/app_name" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Contact" android:windowSoftInputMode="adjustNothing" android:screenOrientation="portrait"></activity>
<activity android:name=".Notes" android:screenOrientation="portrait"></activity>
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.test.example" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
<!--Include the AdActivity configChanges and theme. -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
</application>
</manifest>
NEW AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.example"
android:versionCode="10"
android:versionName="2.0.1"
android:installLocation="internalOnly"
>
<uses-sdk android:minSdkVersion="10" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true"/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="com.test.example.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.test.example.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
>
<!--This meta-data tag is required to use Google Play Services.-->
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
<activity android:name=".Landing" android:label="#string/app_name" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Contact" android:windowSoftInputMode="adjustNothing" android:screenOrientation="portrait"></activity>
<activity android:name=".Notes" android:screenOrientation="portrait"></activity>
<activity android:name=".MainActivity" android:windowSoftInputMode="adjustNothing" android:screenOrientation="portrait"></activity>
<receiver
android:name=".GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.test.example" />
</intent-filter>
</receiver>
<service android:name=".GcmIntentService" />
<!--Include the AdActivity configChanges and theme. -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
</application>
</manifest>
Your MainActivity is no longer a MAIN/LAUNCHER activity. Are you sure it's not just a matter of old shortcuts disappearing/failing to launch because of this?
The difference between users may be caused by having different launcher apps (various manufacturers or manually installed). If you have some helpful users, you could ask them to:
check the app drawer for the app, and
take a bugreport and send it to you (so that we may be able to see some logs of a failed launch)

Creating multiple custom versions of the same android app

I'm trying to create multiple versions of my app for different clients, and have done these steps:
-Duplicate all the folders with a simple copy and paste in the finder,
-Open the project i have just created,
-Changed the package name in the AndroidManifest.xml,
-Refactor all the classes and files that where failing (with the refactor option),
-Clear project and run.
I have been able to instal the 2 apps in the device, but every time I try to run any app the os shows me this:
As you can see I have the 2 app installed and running:
And every time i press a button ask me again:
This is the first AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="epinom.jm.smarthotel"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="16" />
<permission android:name="epinom.jm.smarthotel.maps.googlev2.permission.MAPS_RECEIVE"
android:protectionLevel="signature">
</permission>
<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"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="epinom.jm.smarthotel.maps.googlev2.permission.MAPS_RECEIVE"/>
<uses-feature android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBjg8TtFgJTMuLFyiGlScVuEDNPjJnLxyM"/>
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".vcMainScreen"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="vcMainScreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
This is the second AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="goSmart.guestperience.MoncloaDeSanLazaro"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="16" />
<permission android:name="goSmart.guestperience.MoncloaDeSanLazaro.maps.googlev2.permission.MAPS_RECEIVE"
android:protectionLevel="signature">
</permission>
<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"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="goSmart.guestperience.MoncloaDeSanLazaro.maps.googlev2.permission.MAPS_RECEIVE"/>
<uses-feature android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/MyTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDNqe1PO7pvZLtba_Vu3m5BvmOdJtqhU0M"/>
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="standard" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".vcMainScreen"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="standard" >
<intent-filter>
<action android:name="vcMainScreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
I'm starting with Android development so please tell me what I'm doing wrong, is there something that I'm missing to configure.
I'm using Eclipse on a Mac.
TO ANWSER THE QUESTION OF #David, this is the code i use to call every new screen:
String IntentName = Util.getController(buttons
.getJSONObject(arg2)
.getString("ViewController"));
Intent intento = new Intent(IntentName);
intento.putExtra(
"jsonConfig",
buttons.getJSONObject(arg2).getString(
"JsonConfigFile"));
intento.putExtra("title", buttons.getJSONObject(arg2)
.getString("Label"));
intento.putExtra("icon", buttons.getJSONObject(arg2)
.getString("ImageIconTitle"));
startActivity(intento);
You have 2 activities with the same name.... in differents App´s.
Change the name of 1 activity.
Thanks to the comment of Nimish Choudhary and more Google the answer to my problem was that I have to make unique all Activity names for to the 2 Apps.
So in the AndroidManifest.xml I have change all the names of all the Activities, i.e.:
<activity
android:name="app1.vcMainScreen"
android:label="#string/title_activity_home"
android:screenOrientation="portrait"
android:launchMode="standard" >
<intent-filter>
<action android:name="app1.vcMainScreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
And I change the return of the switch when I was calling the function:
Util.getController(buttons
.getJSONObject(arg2)
.getString("ViewController")
Now the return is:
switch (Integer.parseInt(num)) {
case 0:
return "app1.vcMainScreen";
default:
return null;
}
I hope this help someone one day.
Thanks to all.

Activity doesn't open when the user taps on the notification

In my app main activity doesn't open when the user taps on the notification
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mx.com.eluniversal.test.pruebapushtags">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17" />
<permission android:name="mx.com.eluniversal.test.pruebapushtags.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="mx.com.eluniversal.test.pruebapushtags.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" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:allowBackup="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:theme="#style/AppTheme">
<activity android:name="mx.com.eluniversal.test.pruebapushtags.ActivityPrincipal" android:label="#string/app_name" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="mx.com.eluniversal.test.pruebapushtags.ActivityPrincipal.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.worklight.wlclient.ui.UIActivity" />
<service android:name="com.worklight.wlclient.push.GCMIntentService" />
<receiver android:name="com.worklight.wlclient.push.WLBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="mx.com.eluniversal.test.pruebapushtags" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="mx.com.eluniversal.test.pruebapushtags" />
</intent-filter>
</receiver>
</application>
</manifest>
It doesn't open if the app is on the background and doesn't update the information in the activity while in the foreground when a new push notification arrives.
You can take a look at the following Native Android sample application that demonstrates implementing Tag-based push notifications: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/notifications/push-notification-native-android-applications/tag-based-notifications/
Compare its files with yours (AndroidManifest.xml, strings.xml, ...).
Since you are not responding in the comments, that's the best that can be done at this time.
Note: This application is based on MobileFirst Platform 7.0, so you cannot open the project file in previous releases. However, you can still extract the .zip file and look at the source files from the file system.

Library installed as application Android

I have two android projects, one of them I'm using as library. I've created .aar file to use it as library in project. And it's working :). But I've a problem. It installs two apps with the same name in device. Any suggestion?
Application Manifest
<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" />
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but are recommended.
-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name="package"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name="net.riinvest.riinvest.Harta"
android:label="#string/title_activity_maps" >
</activity>
<activity
android:name="package"
android:label="#string/title_activity_kontakti" >
</activity>
</application>
</manifest>
Application that I use as library Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package=""
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="12" android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/><!--For connection to server-->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/><!--For RiProfService broadcasting-->
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true"
/>
<application
android:allowBackup="true"
android:icon="#drawable/riiprof_logo"
android:label="#string/app_name"
android:theme="#style/DeviceDefault">
<activity
android:name=""
android:label="#string/app_name"
android:windowSoftInputMode="stateHidden|adjustResize"
android:configChanges="locale|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Thanks in advance.
Best Regards
Remove this part from your library's AndroidManifest:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Its showing 2 launcher icons as both your library manifest and application manifest have following:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
This instructs to enable the activity to be launched by a launcher icon directly. If you remove this from your library manifest. That should fix it. Hope it helps.

Android Manifest not accepting changes

I'm writing a app in android studio 0.8.14(latest) and I am trying to add
<uses-permission android:name="android.permission.GET_TASKS"/>
After adding the permission I clean, rebuild and make the project but I still get error:
E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.SecurityException: Permission Denial: getTasks() from pid=6608, uid=10061 requires android.permission.GET_TASKS
Another peculiar thing is if I remove any of my current permissions(like "android.permission.WR") the app still runs fine like I didn't change a thing
Another permission that isn't working is REORDER_TASKS, but I think it will be fixed once the manifest applies permissions.
This permission doesn't require any special permission as per: https://android.googlesource.com/platform/frameworks/base/+/master/core/res/AndroidManifest.xml
Below is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="*package*" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme2">
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.REORDER_TASKS"/>
<uses-permission android:name="android.permission.WR" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<activity
android:name=".Activity_main"
android:label="#string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Thanks.
Put your uses-permission tag outside application tag
From Documentation:
CONTAINED IN:
<manifest>
Like this.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="*package*" >
<!-- put it here -->
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.REORDER_TASKS"/>
<uses-permission android:name="android.permission.WR" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme2">
<activity
android:name=".Activity_main"
android:label="#string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>

Categories

Resources