I've let user enable 'device administration' with
Code:
new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN)
but after it the user unable to uninstall the pp from "Settings-Apps". Is there a way to uninstall app?
res/xml/device_admin.xml:
<uses-policies>
<disable-camera />
<encrypted-storage />
<expire-password />
<force-lock />
<limit-password />
<reset-password />
<watch-login />
<wipe-data />
</uses-policies>
Click to expand...
Click to collapse
You want the user to be able to uninstall your app, am i getting that right? Well the user must disable your device admin rights via settings->security in order to do that.
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Awesome, thanks Masrepus! I've deactivated the app from Security->Device administrators, and "Unistall" button become active.
Pleasure
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Related
I have problem with emulating basic „Hello World“. I create AVD as Nexus 4, choose project hello World in Run configuration, as target I mark my own AVD and then confirm Run. Virtual device doesn’t start. What’s wrong?
I work on macbook pro early 2011 i5, 4gb 10.6.8
Jdk 7
All packages like Tools or Android 4.4.2(API 19) Installed
You first have to go to avd manager and start your desired emulator there. Then after it is fully booted, run your project
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
You should also try the Genymotion emulator. It works so much faster for android emulation.
Thats right i also prefer genymotion as it gives you a fully, but really fully working avd that is even rooted. So suits every single app testing purpose you could need
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Masrepus said:
Thats right i also prefer genymotion as it gives you a fully, but really fully working avd that is even rooted. So suits every single app testing purpose you could need
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Click to expand...
Click to collapse
Thanks ,I'll try surely, I have no choice
Neozelkova said:
You should also try the Genymotion emulator. It works so much faster for android emulation.
Click to expand...
Click to collapse
Does it work like virtaul machine and on physical android device?
Genymotion is a virtual machine, but you can change some settings so that the internet connection is fully functioning plus you can acces google play through it as well
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
I want to get data from a specific web page at the background of my app. But before one can enter that page, the website pops up a dialog box asking for username and password. Now my question is can i automatically let my app submit the required two strings to that dialog box so that it can then have access to the data displayed on the website afterwards without any interaction of the user himself?
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Masrepus said:
I want to get data from a specific web page at the background of my app. But before one can enter that page, the website pops up a dialog box asking for username and password. Now my question is can i automatically let my app submit the required two strings to that dialog box so that it can then have access to the data displayed on the website afterwards without any interaction of the user himself?
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Click to expand...
Click to collapse
That's determined by the website. You *may* be able to pass the username & password as a http post, but that may not work. Depending on the site, they may have an API for external sites and apps to use for login.
Without knowing what site it is it's impossible to answer.
Mh okay it is my school's website and they dont have any apis or anything that i could use.
So you say i probably have the possibility to post it via http? Can i see that in the site's source code that i get when i use the 'show site source' function in desktop chrome?
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Masrepus said:
Mh okay it is my school's website and they dont have any apis or anything that i could use.
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Click to expand...
Click to collapse
In that case you need to look at the login page and see how that does it. It most likely uses a form that posts data to a url and that redirects you to another page if login is successful. Are you planning on asking the user for the login and password and then using that?
Yep that is what i am planning to do
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Masrepus said:
Yep that is what i am planning to do
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Click to expand...
Click to collapse
Just view the login page source and see how that does it. You can most likely do a http post to the login page and the change url to a signed in page once you get a response (assuming it was a correct response).
If you're not sure how to do that, here's a link I found for a Stack Overflow question that has a good looking answer...
http://stackoverflow.com/questions/4205980/java-sending-http-parameters-via-post-method-easily
Hm i just checked again and i saw that if i just cancel the browsers pop up asking for the username and password, then i get to another page that tells me that authentication is needed and that i either provided wrong credentials 'or your browser doesnt understand how to supply the credentials required'
So i would think that there must be a way to submit those via http or something like that
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
This is the website: app.schyren-gymnasium.de/pw/mrekursiv.php
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Masrepus said:
This is the website: app.schyren-gymnasium.de/pw/mrekursiv.php
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Click to expand...
Click to collapse
That page isn't using http posts to get username & password information. That's server authentication which is a completely different thing, and I'm afraid I have no idea how to pass the information in Java.
Have a look at this and see if it helps...
http://stackoverflow.com/questions/3283234/http-basic-authentication-in-java-using-httpclient
Oh okay that is a pity.. Well thanks very much for your time and efforts!!
Maybe i get it to work, lets see
Because at least i know now what to search for
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
OH MY GOD I JUST SOLVED IT!!
You have to do http://username:[email protected]/pw/mrekursiv.php
I actually was trying to find it out through digging into the aosp browser source, but then by googling up some classname that i found i got the solution xD
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Sir, I am new to android,please help me to fetch data's from database to a sliding menu of the app
aswanthrc said:
Sir, I am new to android,please help me to fetch data's from database to a sliding menu of the app
Click to expand...
Click to collapse
This code snippet assumes you have a getter/setter class for News items. In addition I am using the ActioBarSherlock library so if you aren't using that but you are using fragments then you need to replace instances of "getSherlockActivity()" with just "getActivity()" - if you're just using standard activities then you get replace it with "this"
Code:
List<HashMap<String, String>> newsListItems = new ArrayList<HashMap<String, String>>();
List<News> news = dbhandler.getAllNews();
for (News n : news) {
HashMap<String, String> map = new HashMap<String, String>();
map.put("listTitle", n.getTitle());
map.put("listDate", n.getDate());
newsListItems.add(map);
}
ListAdapter newsListAdapter = new SimpleAdapter(getSherlockActivity(), newsListItems, R.layout.list_news_nav_drawer,
new String[]{"listTitle", "listDate"}, new int[]{R.id.titleNews, R.id.dateNews});
newsListView.setAdapter(newsListAdapter);
The output of this code in my app is shown in this screenshot.
Please let me know if you need any help in understanding the code
Thaq
thaq...
Jonny said:
This code snippet assumes you have a getter/setter class for News items. In addition I am using the ActioBarSherlock library so if you aren't using that but you are using fragments then you need to replace instances of "getSherlockActivity()" with just "getActivity()" - if you're just using standard activities then you get replace it with "this"
Code:
List<HashMap<String, String>> newsListItems = new ArrayList<HashMap<String, String>>();
List<News> news = dbhandler.getAllNews();
for (News n : news) {
HashMap<String, String> map = new HashMap<String, String>();
map.put("listTitle", n.getTitle());
map.put("listDate", n.getDate());
newsListItems.add(map);
}
ListAdapter newsListAdapter = new SimpleAdapter(getSherlockActivity(), newsListItems, R.layout.list_news_nav_drawer,
new String[]{"listTitle", "listDate"}, new int[]{R.id.titleNews, R.id.dateNews});
newsListView.setAdapter(newsListAdapter);
The output of this code in my app is shown in this screenshot.
Please let me know if you need any help in understanding the code
Click to expand...
Click to collapse
what exactly does the ActionBarSherlock do? [emoji16]
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Masrepus said:
what exactly does the ActionBarSherlock do? [emoji16]
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Click to expand...
Click to collapse
http://actionbarsherlock.com/
For the purposes I use it for I guess I could use android.support.v7.app.ActionBarActivity but I started work on the app before the support library was updated (only been working on it off and on during spare time so its taken ages) and I'm way too lazy to go back and refactor/recode the needed bits now when I'm 90% finished
Thanks buddy
Haha okay i see
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
Hi Guys,
I am new to live wallpaper..Can any one explain me how to create live wallpaper in android..:fingers-crossed::fingers-crossed:
Hey man, how about googling for tutorials and then asking SPECIFIC questions -_-
Well but there you are, because i dont want to only be unhelpful... http://www.vogella.com/tutorials/AndroidLiveWallpaper/article.html
---------------------------------
Phone : Nexus 4
OS :
- KitKat 4.4.4 stock
- Xposed: 58(app_process); 54(bridge)
- SU: SuperSU
- no custom recovery
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk
As mentioned above, this isn't very specific. If you wish to create a Live Wallpaper rendered with an OpenGl renderer, this source was of great help for me:
www.learnopengles.com/how-to-use-opengl-es-2-in-an-android-live-wallpaper/
If you have specific questions about using OpenGl in a live wallpaper (supposing that you already implemented something), it could be that I have some answers. Btw. I especially had problems with using both a wallpaper and an app frontend in the same apk. Maybe I could post parts of the Manifest file, if that's what you are interested in.
Hey guys,
am using the actionbar in my application. when rotating the device, one of them is added right next to the first instance of it. performing multiple orientation results in having a bunch of these icons right next to each other.
Do you might know why?
I'm using the navigation drawer and used the official tutorial to do that and a base activity to spread it accross my application. Only the visible icon is multiplied, so none of the ones hidden.
If any additional information is needed, let me know asap! I will post it but I am not sure what it might be, thus not doing it right now.
Bests,
mcmardy
Well what i would do, i would create a different menu.xml for landscape mode which contains one item more than the other one
---------------------------------
Phone : Nexus 4
OS :
- KitKat 4.4.4 stock
- Xposed: 58(app_process); 54(bridge)
- SU: SuperSU
- no custom recovery
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk