Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void GoLL(View V)
- {
- try
- {
- ArrayList<HashMap<String, Object>> items = new ArrayList<HashMap<String, Object>>();
- final PackageManager pm = getPackageManager();
- List<PackageInfo> packs = pm.getInstalledPackages(0);
- for(PackageInfo pi : packs)
- {
- if(pi.packageName.toLowerCase().contains("calculhgchfhf") && pi.packageName.toLowerCase().contains("com."))
- {
- HashMap<String, Object> map = new HashMap<String, Object>();
- map.put("appName", pi.applicationInfo.loadLabel(pm));
- map.put("packageName", pi.packageName);
- items.add(map);
- }
- }
- if(items.size() >= 1)
- {
- String packageName = (String)items.get(0).get("packageName");
- Intent i = pm.getLaunchIntentForPackage(packageName);
- if(i != null) startActivity(i);
- } else
- {
- this.startActivity(new Intent(this, LL.class));
- }
- }
- catch(Exception e)
- {
- Log.e("Erro",e.getMessage());
- Toast.makeText(getApplicationContext(),).show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement