April, 2015
now browsing by month
for everyone who is, like me looking for some great reference to javascript.
according to the read me: “Curriculum originally developed by Pamela Fox” i think the classes where free. but i dont know where i get it from.
link to the rar:
https://drive.google.com/file/d/0B2Gltk_LlAG4MllzY2d0ejBVaGc/view?usp=sharing
link to the folder where i will be putting more javascript learning stuff:
does any one know how i get this script to list all the installed apps to work inside LLX.
/*
List apps = getPackageManager().getInstalledPackages(0);
This method returns the list of PackageInfo (which contains overall information about the contents of a package). In other words, the method getInstalledPackages() will return a list containing all the information about all the installed application.
In this example, we will extract just the informations (packageName, appName, versionName, versionCode, and the icon), so we create a bean to store this informations:
*/
public class AppInfo {
private String name;
private String packageName;
private String versionName;
private int versionCode = 0;
private Drawable icon;
public AppInfo() {}
public Intent getLaunchIntent(Context context) {
Intent intentLaunch = context.getPackageManager().getLaunchIntentForPackage(this.packageName);
return intentLaunch;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getVersionName() {
return versionName;
}
public void setVersionName(String versionName) {
this.versionName = versionName;
}
public int getVersionCode() {
return versionCode;
}
public void setVersionCode(int versionCode) {
this.versionCode = versionCode;
}
public Drawable getIcon() {
return icon;
}
public void setIcon(Drawable icon) {
this.icon = icon;
}
}
/*
The last thing is to extract the application’s informations from the list of installed apps and store them in arraylist :
*/
/**
* get the list of all installed applications in the device
*@return ArrayList of installed applications or null
*/
private static ArrayList getListOfInstalledApp(Context context) {
PackageManager packageManager = context.getPackageManager();
List apps = packageManager.getInstalledPackages(PackageManager.SIGNATURE_MATCH);
if (apps != null && !apps.isEmpty()) {
ArrayList installedApps = new ArrayList();
for (int i = 0; i < apps.size(); i++) {
PackageInfo p = apps.get(i);
ApplicationInfo appInfo = null;
try {
appInfo = packageManager.getApplicationInfo(p.packageName, 0);
AppInfo app = new AppInfo();
app.setName(p.applicationInfo.loadLabel(packageManager).toString());
app.setPackageName(p.packageName);
app.setVersionName(p.versionName);
app.setVersionCode(p.versionCode);
app.setIcon(p.applicationInfo.loadIcon(packageManager));
//check if the application is not an application system
Intent launchIntent = app.getLaunchIntent(context);
if(launchIntent != null && (appInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0)
installedApps.add(app);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
}
//sort the list of applications alphabetically
if (installedApps.size() > 0) {
Collections.sort(installedApps, new Comparator() {
@Override
public int compare(final AppInfo app1, final AppInfo app2) {
return app1.getName().toLowerCase(Locale.getDefault()).compareTo(app2.getName().toLowerCase(Locale.getDefault()));
}
});
}
return installedApps;
}
return null;
}
/*
After getting those informations about installed applications, we can display them using ListViewor GridView .
Finally, to launch an installed application directly from your application, all what you need is to retrieve the launch Intent from the appInfo instance and starts the app :
*/
ArrayList installedApps = getListOfInstalledApp(this);
Intent launchIntent = installedApps.get(0).getLaunchIntent(this);
if(launchIntent != null)
startActivity(launchIntent);
]]>v12.4b2 beta
Edit: 12.4b3 to fix major issues, but another beta will follow for sure.
It’s finally here, and it packs a lot of modifications.
The editor has seen a lot of changes with many small and big improvements such as the ability to snap items when resizing them not only when moving, or fully functional item cloning (including folder and all its content), undo/redo, new editor bars for fast access to frequently used features, ability to edit items properties directly in the desktop, reworked menu, and so on.
Also there is a new “Run in” option when selecting a script to be run from elsewhere (Tasker and other compatible apps). This way you can select whether the script is executed for the desktop, the app drawer, the lock screen (not ready yet, will crash, lol) or in background. This last mode will not display the desktop when running a script but it is subject to important limitations. Please read the note about this in http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=working_with_tasker. I don’t know how it will behave in real world use cases. Please let me know how it works (or not) for you.
This versionalso includes the Android Palette API which can be used from scripts to extract color from an image (sample code in the wiki http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_palette). I hope to be able to extend the color picker with this Palette later.
And more smaller goodies can be found in the ChangeLog…
I hope I didn’t broke everything while adding this stuff 😉
Full ChangeLog:
http://www.pierrox.net/cmsms/applications/lightning-launcher/change-log.html
]]>I can’t I have a rather elementary question but the heap Max and free memory readings on the dynamic text, what…
Does anyone have a script for parsing weather data.
What should i do to convert ‘dp’ into ‘pixel’ by script?
I didn’t experience any crash while using lightning launcher and very satisfied but there’s a problem though(I don’t…
I didn’t experience any crash while using lightning launcher and very satisfied but there’s a problem though(I don’t know this is a problem though:D).
When I apply immersive mode (or full screen), there remains space where navigation bar was.
It seems there’s no problem when I remove navigation bar using xposed module or modifying framework-res.apk file.
But when I using custom rom option or application to apply immersive mode, this occurs.
Is there anyone who is experiencing this?
Best. Exception. Ever.
Originally shared by Lutz Linke
Best. Exception. Ever.
“java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack available”
]]>
D5 Creation